From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 511FB5CDF1 for ; Mon, 28 Jul 2025 00:18:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753661886; cv=none; b=B9Hg31LYFZS+4HrAz8E7N376hvdCJmqcY7hEG33OoBCjEID4CsvK3YHg0lzgkIKOISqUaSP3y/0N7pr00wJ90S0OWTnZ7WttJjdhVQYjLWBgYgOZq5Df/1bQYST3FOAUuUZu3FxELxci6RFw9a22joCUMq+7AXMYZtMCKYEHhiY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753661886; c=relaxed/simple; bh=RTCxcLm3wOV0FF+KabzzqobCep8vVQRF1zJKt/wQWkw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fUdxYFO8KmlXxyf5j0c+yVIUCGUr2sf8FgkVPQS62tONfHtub59yz2slJNEN75HJ5Wq387Jcvk9pclwwj9OVPdJ4gRmyBv0zDMonbcbvDUqr7RPHbr/7w+tIydzrgbZyNgO15RTqsuzP3lNAw2oG3ljal428TLZFPnNWyVnJFMw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=HZnUnVeK; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="HZnUnVeK" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=SagG3XMxqC5+DG4NbDyvwd3QGboM6ki7CkcFhuaK9ng=; b=HZnUnVeKHznEJmKPKGfEO/lXgb XjN/HKswXv96d0IZxRlvYYArNJddpHtJZjQFNj6gM27cmmGd4si21nrviqGREGkqNUz7tz/78tM6t CnjYM2xjU7VKTa6WLCqGgZRfpnDAxwNfn+Q1HMzEhKQCHtwGxlkr3r3iq4/yMeDiF21FNVMc9OZsx mzqspeNQ/EFp1kP8qSKS/9PetCy2AQpv7yrhr+IiWtTAVkoyQ5A2JVtpLcugiJiEGILhshZPwWaiU OqEgykZhf7SLm9vyfYTrcJHEbQxEthGz/F6sddpqyYbjQDzySFBqON+LM8wYURzFqhz3aVmVFRMUN bokHo7lQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1ugBZ4-0000000DNW7-0q6I; Mon, 28 Jul 2025 00:18:02 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Chuck Lever Subject: [PATCH 09/40] ansible.cfg: Explicitly set the ssh user Date: Sun, 27 Jul 2025 17:17:28 -0700 Message-ID: <20250728001800.3188617-10-mcgrof@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250728001800.3188617-1-mcgrof@kernel.org> References: <20250728001800.3188617-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain From: Chuck Lever I've been seeing tasks that are marked "become: true" fail with this message: Timeout (12s): waiting for privilege escalation promt: This appears to be a common failure mode, but it is due to a broad variety of causes. I think I've nailed this one with this addition to ansible.cfg. It changes "ESTABLISHING SSH SESSION FOR: NONE" to "... FOR: " where is always a user that is allowed to use sudo. The current Terraform Kconfig menu sets this user, but guestfs does not -- the Ansible ssh user for guestfs is always "kdevops". The ansible.cfg.j2 file reflects this. Signed-off-by: Chuck Lever --- playbooks/roles/ansible_cfg/templates/ansible.cfg.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/playbooks/roles/ansible_cfg/templates/ansible.cfg.j2 b/playbooks/roles/ansible_cfg/templates/ansible.cfg.j2 index f71033b2..b292d196 100644 --- a/playbooks/roles/ansible_cfg/templates/ansible.cfg.j2 +++ b/playbooks/roles/ansible_cfg/templates/ansible.cfg.j2 @@ -11,6 +11,11 @@ show_task_path_on_failure = {{ ansible_cfg_callback_plugin_show_task_path_on_fai interpreter_python = {{ ansible_cfg_interpreter_python_string }} forks = {{ ansible_cfg_forks }} enable_task_debugger = {{ ansible_cfg_task_debugger }} +{% if kdevops_terraform_ssh_config_user is defined %} +remote_user = {{ kdevops_terraform_ssh_config_user }} +{% else %} +remote_user = kdevops +{% endif %} {% if ansible_facts['distribution'] == 'openSUSE' %} [connection] retries = {{ ansible_cfg_reconnection_retries }} -- 2.47.2