guestfs: add the Include directive to ~/.ssh/config
PATCH 1/1 guestfs: add the Include directive to ~/.ssh/config
Add a new playbook that uses the lineinfile: ansible call to ensure that ~/.ssh/config has the proper "Include" line to pull in any config_kdevops ssh files that live in the same directory.
Signed-off-by Jeff Layton <[email protected]>
--- playbooks/roles/update_ssh_config_guestfs/tasks/main.yml | 6 ++++++ playbooks/update_ssh_config_guestfs.yml | 4 ++++ scripts/guestfs.Makefile | 4 ++++ 3 files changed, 14 insertions(+) create mode 100644 playbooks/roles/update_ssh_config_guestfs/tasks/main.yml create mode 100644 playbooks/update_ssh_config_guestfs.yml
playbooks/roles/update_ssh_config_guestfs/tasks/main.yml new file +6 -0
@@ -0,0 +1,6 @@ +- name: Add Include directive to ~/.ssh/config + lineinfile: + path: ~/.ssh/config + line: "Include ~/.ssh/config_kdevops_*" + insertbefore: "BOF" + create: true
playbooks/update_ssh_config_guestfs.yml new file +4 -0
@@ -0,0 +1,4 @@ +--- +- hosts: localhost + roles: + - role: update_ssh_config_guestfs
scripts/guestfs.Makefile +4 -0
@@ -63,6 +63,10 @@ libvirt_pcie_passthrough_permissions: $(KDEVOPS_PROVISIONED_SSH): $(Q)if [[ "$(CONFIG_KDEVOPS_SSH_CONFIG_UPDATE)" == "y" ]]; then \ + ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ + --inventory localhost, \ + playbooks/update_ssh_config_guestfs.yml \ + -e 'ansible_python_interpreter=/usr/bin/python3' ;\ LIBVIRT_DEFAULT_URI=$(CONFIG_LIBVIRT_URI) $(TOPDIR)/scripts/update_ssh_config_guestfs.py; \ fi $(Q)touch $(KDEVOPS_PROVISIONED_SSH)
Signature · 1 line
2.43.2