Thanks to all, i wasn't searching for authorized_key module but as Dick said - check is the option i prefer. Also thanks for the hint about authorized_keys - still found some servers where users added their key in that file.
regards Stefan Am Mittwoch, 6. September 2017 12:43:21 UTC+2 schrieb Ask 21: > > Hi everybody, > > does anybody know what will be the best approach to read and validate a > remote-files content? > > background: I'm managing linux servers with ansible and have to validate > on hundrets of linux servers if any user with sudo permission has changed > the content of /root/.ssh/authorized_keys2. > There shouldn't be any public keys inside, just two which are known and > are allowed login as root. > > I didn't created a playbook yet because i don't know which way/module will > be best - is there any option like using a "negotiate" lineinfile operation > or maybe using shell/fetch and doing a diff with a template > authorized_keys2 file? > > What do you think - how will you challenge this? > > Thanks > Stefan > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a9c39f7e-aa7e-4698-8329-07d1c0201397%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
