Using add_keys_to_agent in ssh_config module (#10337)
Some checks failed
EOL CI / EOL Sanity (Ⓐ2.16) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Has been cancelled
nox / Run extra sanity tests (push) Has been cancelled

* Using add_keys_to_agent in ssh_config module

* removed white space

* Apply suggestion

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Aditya Putta 2025-07-05 15:45:31 -05:00 committed by GitHub
commit 5ef1cad64f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 }}"