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

2020-05-19 Thread Dick Visser
On Tue, 19 May 2020 at 21:29, Dan Idar wrote: > > 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 Ansible would also be a great tool to

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

2020-05-19 Thread Matt Martz
Maybe something like this: - name: find files find: path: /var/log patterns: '*.log' size: 100m register: bigfiles changed_when: bigfiles.files != [] notify: start service On Tue, May 19, 2020 at 2:29 PM Dan Idar wrote: > Hello > I

[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