ansible-roles/admin-users/tasks/main.yml
Gregory Colpart 5226082db0 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)
2017-08-22 01:37:04 +02:00

18 lines
399 B
YAML

---
- 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 == {}
- include: admin_user.yml
vars:
user: "{{ item.value }}"
with_dict: "{{ admin_users }}"
when: admin_users != {}