mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-12 16:10:49 -07:00
[PR #10337/5ef1cad6 backport][stable-10] Using add_keys_to_agent in ssh_config module (#10351)
Using add_keys_to_agent in ssh_config module (#10337)
* Using add_keys_to_agent in ssh_config module
* removed white space
* Apply suggestion
---------
(cherry picked from commit 5ef1cad64f
)
Co-authored-by: Aditya Putta <puttaa@yahoo.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
8c02531c56
commit
b4eb8e5e22
1 changed files with 9 additions and 0 deletions
|
@ -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 }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue