public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: kdevops@lists.linux.dev
Subject: Re: [PATCH v2 07/12] update_ssh_config: make Include directive follow ssh config directory
Date: Thu, 6 Feb 2025 14:58:17 -0500	[thread overview]
Message-ID: <c65eae63-7367-4bbf-96e8-dc46ec875c44@oracle.com> (raw)
In-Reply-To: <20250205155252.1317763-8-cel@kernel.org>

On 2/5/25 10:52 AM, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> The file containing the kdevops target node entries needs to be
> placed in the same directory as the controller's .ssh/config.
> Usually that's ~/.ssh/config, but there is a Kconfig setting that
> can change that.
> 
> XXX: Actually, to make this work 100% correctly, "make mrproper"
> should remove the ssh Include directive. That way a user can modify
> the ssh config via "make menuconfig", then do a "make" to get the
> updated include path added into her .ssh/config.
> 
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>  .../roles/update_ssh_config/tasks/main.yml     | 18 +++---------------
>  1 file changed, 3 insertions(+), 15 deletions(-)
> 
> diff --git a/playbooks/roles/update_ssh_config/tasks/main.yml b/playbooks/roles/update_ssh_config/tasks/main.yml
> index 417781936f7f..72c5f2e365f5 100644
> --- a/playbooks/roles/update_ssh_config/tasks/main.yml
> +++ b/playbooks/roles/update_ssh_config/tasks/main.yml
> @@ -5,18 +5,7 @@
>      path: "{{ sshconfig }}"
>    register: ssh_config
>  
> -- name: Check that the kdevops Include directive is present
> -  tags: deps
> -  ansible.builtin.lineinfile:
> -    path: "{{ sshconfig }}"
> -    regexp: "Include ~/.ssh/config_kdevops_*"
> -    state: absent
> -  check_mode: true
> -  changed_when: false
> -  register: kdevops_ssh_include
> -  when: ssh_config.stat.exists
> -
> -- name: Check that the Include directive has a kdevops_version comment
> +- name: Check for a kdevops_version comment

One minor misbehavior I noticed while working on this series is that if
I use "make defconfig-yada", it doesn't populate the kdevops_version
variable. Looks like the defconfig-* target does not build
include/config/project.release , so kdevops_version is an empty string
in that case.

"make defconfig-yada menuconfig" works fine, though.


>    tags: deps
>    ansible.builtin.lineinfile:
>      path: "{{ sshconfig }}"
> @@ -34,10 +23,9 @@
>    ansible.builtin.meta: end_play
>    when:
>      - ssh_config.stat.exists
> -    - kdevops_ssh_include.found
>      - fixed_ssh_entry.found
>  
> -- name: Remove the stale Include directive
> +- name: Remove any stale Include directives
>    tags: deps
>    ansible.builtin.lineinfile:
>      path: "{{ sshconfig }}"
> @@ -73,4 +61,4 @@
>      create: true
>      mode: "u=rw,g=r,o=r"
>      block: |
> -      Include ~/.ssh/config_kdevops_*
> +      Include {{ sshdir }}/config_kdevops_*


-- 
Chuck Lever

  reply	other threads:[~2025-02-06 19:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 15:52 [PATCH v2 00/12] Replace terraform update_ssh_config module cel
2025-02-05 15:52 ` [PATCH v2 01/12] guestfs: Rename the update_ssh_config_guestfs role cel
2025-02-05 15:52 ` [PATCH v2 02/12] update_ssh_config: Use {{ sshconfig }} instead of raw path cel
2025-02-05 15:52 ` [PATCH v2 03/12] update_ssh_config: Fix ansible-lint nits cel
2025-02-05 15:52 ` [PATCH v2 04/12] update_ssh_config: Run update_ssh_config during "make deps" cel
2025-02-05 15:52 ` [PATCH v2 05/12] update_ssh_config: Add tags to steps cel
2025-02-05 15:52 ` [PATCH v2 06/12] ssh.Makefile: Generate an sshdir variable cel
2025-02-05 15:52 ` [PATCH v2 07/12] update_ssh_config: make Include directive follow ssh config directory cel
2025-02-06 19:58   ` Chuck Lever [this message]
2025-02-05 15:52 ` [PATCH v2 08/12] ssh.Makefile: Define a kdevops_ssh_config variable cel
2025-02-05 17:42   ` Luis Chamberlain
2025-02-06  2:36     ` Chuck Lever
2025-02-05 15:52 ` [PATCH v2 09/12] update_ssh_config: Add always-run ssh clean-up steps cel
2025-02-05 15:52 ` [PATCH v2 10/12] terraform: Add ssh hosts to ~/.ssh/config_kdevops_{{ sha1sum }} cel
2025-02-05 15:52 ` [PATCH v2 11/12] terraform: "make mrproper" should remove terraform/*/.terraform cel
2025-02-05 15:52 ` [PATCH v2 12/12] terraform: Remove the terrraform update_ssh_config module cel
2025-02-05 17:44 ` [PATCH v2 00/12] Replace terraform " Luis Chamberlain

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=c65eae63-7367-4bbf-96e8-dc46ec875c44@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=kdevops@lists.linux.dev \
    --cc=mcgrof@kernel.org \
    /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