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: p