From: Daniel Gomez <da.gomez@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: "kdevops@lists.linux.dev" <kdevops@lists.linux.dev>
Subject: Re: file (/root/.ssh/config) is absent, cannot continue
Date: Mon, 19 May 2025 20:55:28 +0200 [thread overview]
Message-ID: <49a696f8-3909-4cc5-81d5-7b3291090b1a@kernel.org> (raw)
In-Reply-To: <b2fb6337-f737-4ab9-94a5-f6d5d94db749@oracle.com>
On 19/05/2025 20.34, Chuck Lever wrote:
> I updated to the tip of the kdevops branch just now, and
> update_ssh_config_guestfs is suddenly failing:
>
>
> task path:
> /home/cel/src/kdevops/buildbot-configs/playbooks/roles/update_ssh_config_guestfs/tasks/main.yml:73
> fatal: [localhost]: FAILED! => {
> "changed": false,
> "path": "/root/.ssh/config",
> "state": "absent"
> }
>
> MSG:
>
> file (/root/.ssh/config) is absent, cannot continue
Looks weird it's trying to access the ./ssh/config for root instead of cel.
Line 73 points to:
- name: Ensure ~/.ssh/config permissions
become: true
become_flags: 'su - -c'
become_method: ansible.builtin.sudo
ansible.builtin.file:
path: ~/.ssh/config
mode: "0600"
which I think is missing:
when: ssh_config.stat.exists
Added by the change f301c9a ("guestfs: ensure right permissions for ssh
config").
I don't think we need to use sudo in that task either:
become_flags: 'su - -c'
become_method: ansible.builtin.sudo
Can you try adding the when conditional and sudo?
>
>
> Could be commit 5095f06310c0 ("update_ssh_config_guestfs: fix broken
> conditionals") -- I reverted that commit and the issue goes away.
>
This commit just adds | bool to the conditions. That might have been
silently masking the issue.
next prev parent reply other threads:[~2025-05-19 18:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 18:34 file (/root/.ssh/config) is absent, cannot continue Chuck Lever
2025-05-19 18:55 ` Daniel Gomez [this message]
2025-05-19 21:14 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49a696f8-3909-4cc5-81d5-7b3291090b1a@kernel.org \
--to=da.gomez@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox