Fix debian playbook running on non-debian system
This commit is contained in:
parent
0232df1562
commit
1178eed471
|
@ -69,7 +69,7 @@
|
|||
that:
|
||||
- ansible_distribution in ['AlmaLinux', 'CentOS', 'RedHat', 'Rocky']
|
||||
- ansible_distribution_major_version | int >= 9
|
||||
fail_msg: "This playbook requires Enterprise Linux 9 or greater"
|
||||
fail_msg: "This playbook requires Enterprise Linux 9 or greater on the target server"
|
||||
tags:
|
||||
- always
|
||||
|
||||
|
|
|
@ -69,6 +69,12 @@
|
|||
name: nginx
|
||||
state: reloaded
|
||||
tasks:
|
||||
- name: Ensure target system is Debian or Ubuntu
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_distribution in ['Debian', 'Ubuntu']
|
||||
fail_msg: "This playbook requires Debian or Ubuntu on the target server"
|
||||
|
||||
- name: Install aptitude
|
||||
ansible.builtin.apt:
|
||||
name: aptitude
|
||||
|
|
Loading…
Reference in a new issue