Skip to content

Commit 5ef1cad

Browse files
theputtaAkasurde
andauthored
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 <[email protected]>
1 parent 7959d97 commit 5ef1cad

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

plugins/modules/ssh_config.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,15 @@
162162
other_options:
163163
serveraliveinterval: '30'
164164
165+
- name: Add SSH config with key auto-added to agent
166+
community.general.ssh_config:
167+
user: devops
168+
host: "example.com"
169+
hostname: "staging.example.com"
170+
identity_file: "/home/devops/.ssh/id_rsa"
171+
add_keys_to_agent: true
172+
state: present
173+
165174
- name: Delete a host from the configuration
166175
community.general.ssh_config:
167176
ssh_config_file: "{{ ssh_config_test }}"

0 commit comments

Comments
 (0)