From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0D2E510E4 for ; Wed, 16 Jul 2025 00:11:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752624681; cv=none; b=AGuu14sThTb6aE1RlFhWuRLqQWHNBgeeLB5IioYCtieqWmLs1JWZpl5wOQARCmHx+DOn7T3vjzSMpZFo3jDrHNdfLhmL5fpRa0pX3eK6vjKABMjhRPfPoPWiiB571v/eRgaS6EKtgO2zd4pDaoy/Wdp639v/jCHtoSRGbmxeKEU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752624681; c=relaxed/simple; bh=dKlpQhNY1PoFz4hTe8DgqMYBHMZRZvFTpYM6DirYtp0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WwYOjeg1XMYgQcjI1GbV0csde8xX8Nwrczi3uLkLGeXXI2o9CkdQTRYZYdSXPfzmMuu/PtDzBvFTzthWwe3GWSoiKk5LFL/ENZS+1JLf/iBgDbQWFS/+VLJ4iTAg47IsvjwBu1xTtGj232jt3+ZCRzEYY+hmrGKrdZII8QcluYc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gD/nbFhY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gD/nbFhY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CBE9C4CEF1; Wed, 16 Jul 2025 00:11:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752624680; bh=dKlpQhNY1PoFz4hTe8DgqMYBHMZRZvFTpYM6DirYtp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gD/nbFhYXxcu/BJkJ0h+cqP5v+E9EGlTOWgaU8B6hD9ndmT/r2PouG9b5pJRJiyOC U+AG45b0J0aQOK6TxRku2L4y6HsLty89cuJoU9YfjAVEj++d8hN0y8GcVT82B2u4LF ZHTOEAPfCE9LOUVnFA9k18Tf8d60B94J08rdWmtZ1DhB/y+UL8FbcwdizlmICcD50L rTzw+MDQtw2y52Oytc/UrRTzgaiHfp/xd6+L3FSbFehhWtPatNpY/pB2i4NstnKu1r 01O6fWSE7hcNJm7dp1vYvgjKtSyTP+MPwWcxNK4GVJB00H19m8vkUjeRtpLdjWNkXZ xfcohxxHB0qOw== From: Chuck Lever To: Cc: Daniel Gomez , Chuck Lever Subject: [RFC PATCH 2/2] ansible.cfg: Explicitly set the ssh user Date: Tue, 15 Jul 2025 20:11:17 -0400 Message-ID: <20250716001117.1125930-2-cel@kernel.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250716001117.1125930-1-cel@kernel.org> References: <20250716001117.1125930-1-cel@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 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 f71033b2c88f..60525506335c 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 ssh_config_user is defined %} +remote_user = {{ ssh_config_user }} +{% else %} +remote_user = kdevops +{% endif %} {% if ansible_facts['distribution'] == 'openSUSE' %} [connection] retries = {{ ansible_cfg_reconnection_retries }} -- 2.50.0