[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:
patchback[bot] 2025-07-06 13:34:05 +02:00 committed by GitHub
parent 8c02531c56
commit b4eb8e5e22
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 }}"