evolinux-base and admin-users are only compatible Debian >=8, declare once in main.yml and that's all
(will be probably generalized to others modules if needed)
This commit is contained in:
parent
606f3a14f5
commit
5226082db0
|
@ -12,6 +12,7 @@ galaxy_info:
|
|||
- name: Debian
|
||||
versions:
|
||||
- jessie
|
||||
- stretch
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line.
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
---
|
||||
|
||||
- fail:
|
||||
msg: only compatible with Debian >= 8
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version | version_compare('8', '<')
|
||||
|
||||
- debug:
|
||||
msg: "Warning: empty 'admin_users' variable, tasks will be skipped!"
|
||||
when: admin_users == {}
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
replace: '\1,{{ user.name }}'
|
||||
validate: '/usr/sbin/visudo -cf %s'
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_release == "jessie"
|
||||
- not copy_sudoers_evolinux.changed
|
||||
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
---
|
||||
|
||||
- fail:
|
||||
msg: only compatible with Debian >= 8
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version | version_compare('8', '<')
|
||||
|
||||
- name: Hostname
|
||||
include: hostname.yml
|
||||
when: evolinux_hostname_include
|
||||
|
|
|
@ -79,7 +79,6 @@
|
|||
- net-tools
|
||||
when:
|
||||
- evolinux_packages_stretch
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version | version_compare('9', '>=')
|
||||
|
||||
- name: Customize logcheck recipient
|
||||
|
@ -111,7 +110,6 @@
|
|||
- { option: "which", value: "both" }
|
||||
when:
|
||||
- evolinux_packages_listchanges
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_release == "jessie"
|
||||
|
||||
- meta: flush_handlers
|
||||
|
|
|
@ -75,8 +75,6 @@
|
|||
regexp: '^#?LogLevel [A-Z]+'
|
||||
replace: "LogLevel VERBOSE"
|
||||
notify: reload sshd
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version | version_compare('9', '>=')
|
||||
when: ansible_distribution_major_version | version_compare('9', '>=')
|
||||
|
||||
- meta: flush_handlers
|
||||
|
|
Loading…
Reference in a new issue