Re: [ansible-project] Re: authorized_keys module is deleting too many line when using state: absent

2020-05-28 Thread Dan Idar
I ran some tests created on vagrant some ssh files and created a authorized_keys with duplicates and tried to add/remove a line that is not a duplicate the result is that if there is a line to be added/removed from the authorized_keys files the duplicates are also removed if there are no

[ansible-project] how to execute a handler if a file is found

2020-05-19 Thread Dan Idar
Hello I would like to be able to find the files that are bigger than a certain dize and then restart a service if this happens because it mean the rotation is not working after the configurtion update the find module does not 'change' when the file is found or not and i know i can trigger a

[ansible-project] Re: Create folder using command line

2020-05-18 Thread Dan Idar
Do not use shell when you have native modules ansible can create whole trees using the file module example: --- - hosts: localhost tasks: - name: create dir structure file: path: 'ibm/{{ item }}' state: directory with_items: - it - logisitic