Merge pull request #202 from sanatsathaye/main
Fix installation playbooks running on incompatible OSs
This commit is contained in:
commit
d00ab06541
|
@ -65,11 +65,11 @@
|
|||
lemmy_port: "{{ 32767 | random(start=1024) }}"
|
||||
tasks:
|
||||
- name: Ensure target system is >= EL9
|
||||
ansible.builtin.fail:
|
||||
msg: "This playbook requires Enterprise Linux 9 or greater"
|
||||
when:
|
||||
- ansible_distribution not in ['AlmaLinux', 'CentOS', 'RedHat', 'Rocky']
|
||||
- ansible_distribution_major_version | int < 9
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_distribution in ['AlmaLinux', 'CentOS', 'RedHat', 'Rocky']
|
||||
- ansible_distribution_major_version | int >= 9
|
||||
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