Thank you, Dick!
On Tuesday, May 21, 2024 at 4:07:19 PM UTC-4 Dick Visser wrote:
> I would use the dedicated find task. Apply a depth filter just in case.
> Something like this should do the trick:
>
>
> - name: known hosts script play
> hosts: all
> become: true
> gather_facts: false
>
>
I would use the dedicated find task. Apply a depth filter just in case.
Something like this should do the trick:
- name: known hosts script play
hosts: all
become: true
gather_facts: false
tasks:
- name: Find known hosts
ansible.builtin.find:
paths:
- /root
Good day.
I need to make changes in the know_hosts files of users on various hosts.
I'll use a script to do the actual changes in known_hosts. I have the
following simple playbook, so far. It identifies users with known_host
files:
* hosts: all gather_facts: false become: ye