Read OS dependent vars
This commit is contained in:
parent
6f93842670
commit
dce0c63dcb
|
@ -1,4 +1,15 @@
|
||||||
---
|
---
|
||||||
|
- name: Gather OS specific variables
|
||||||
|
include_vars: "{{ item }}"
|
||||||
|
with_first_found:
|
||||||
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}.yml"
|
||||||
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version }}.yml"
|
||||||
|
- "{{ ansible_distribution|lower }}.yml"
|
||||||
|
- "{{ ansible_lsb.id|default('NotAvailable')|lower }}.yml"
|
||||||
|
- "{{ (ansible_os_family|lower).split(' ')[0] }}.yml"
|
||||||
|
- "default.yml"
|
||||||
|
|
||||||
|
|
||||||
- name: "Set «PermitRootLogin» to «without-password»"
|
- name: "Set «PermitRootLogin» to «without-password»"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/ssh/sshd_config
|
dest: /etc/ssh/sshd_config
|
||||||
|
|
3
vars/debian.yml
Normal file
3
vars/debian.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
ssh_service_name: ssh
|
||||||
|
|
1
vars/devuan.yml
Symbolic link
1
vars/devuan.yml
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
debian.yml
|
3
vars/redhat.yml
Normal file
3
vars/redhat.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
ssh_service_name: sshd
|
||||||
|
|
3
vars/suse.yml
Normal file
3
vars/suse.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
ssh_service_name: sshd
|
||||||
|
|
Loading…
Reference in a new issue