From 5ef1cad64fdf9b5a14ddc29b89ba35abc0b01d38 Mon Sep 17 00:00:00 2001 From: Aditya Putta Date: Sat, 5 Jul 2025 15:45:31 -0500 Subject: [PATCH] Using add_keys_to_agent in ssh_config module (#10337) * Using add_keys_to_agent in ssh_config module * removed white space * Apply suggestion --------- Co-authored-by: Abhijeet Kasurde --- plugins/modules/ssh_config.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/modules/ssh_config.py b/plugins/modules/ssh_config.py index 07637e8003..b4d6ed16bf 100644 --- a/plugins/modules/ssh_config.py +++ b/plugins/modules/ssh_config.py @@ -162,6 +162,15 @@ EXAMPLES = r""" other_options: serveraliveinterval: '30' +- name: Add SSH config with key auto-added to agent + community.general.ssh_config: + user: devops + host: "example.com" + hostname: "staging.example.com" + identity_file: "/home/devops/.ssh/id_rsa" + add_keys_to_agent: true + state: present + - name: Delete a host from the configuration community.general.ssh_config: ssh_config_file: "{{ ssh_config_test }}"