Re: [ansible-project] What is the best approach to creating a inlude_vars file for my requirement

2020-01-26 Thread Shifa Shaikh
Dick Hi, My requirement is not about configuring a webserver. It is to maintain a check on a set of files. If the file changes by checksum or permissions I wish to trigger an alert. Thus, my ansible will stat the file and then compare the checksum and mode that was previously stored in the

Re: [ansible-project] Basic beginner question

2020-01-26 Thread Waqar Khan
Brilliant - thank you On Sunday, January 26, 2020 at 1:15:40 PM UTC, Kai Stian Olstad wrote: > > On 26.01.2020 13:50, Waqar Khan wrote: > > Starting out with ansible and trying to configure sshd config. Here is > > what > > I have, it works but is there a better way to do with for future > >

Re: [ansible-project] Basic beginner question

2020-01-26 Thread Jean-Yves LENHOF
Hi, You probably looking for ansible_os_family which is RedHat for these distributions : RedHat EL, CentOS, Amazon, etc... You should probably test the major version (between 6 and 7, there's service and systemctl which are kind different for example, I suppose you're not modifying only ssh

Re: [ansible-project] Basic beginner question

2020-01-26 Thread Kai Stian Olstad
On 26.01.2020 13:50, Waqar Khan wrote: Starting out with ansible and trying to configure sshd config. Here is what I have, it works but is there a better way to do with for future reference. e.g. if I have many different distributions it looks like a lot of copying. Can I combine the 2 tasks?

[ansible-project] Basic beginner question

2020-01-26 Thread Waqar Khan
Starting out with ansible and trying to configure sshd config. Here is what I have, it works but is there a better way to do with for future reference. e.g. if I have many different distributions it looks like a lot of copying. Can I combine the 2 tasks? - name: sshd Amazon lineinfile: state: