Skip to content

Commit

Permalink
Merge pull request #202 from sanatsathaye/main
Browse files Browse the repository at this point in the history
Fix installation playbooks running on incompatible OSs
  • Loading branch information
codyro authored Dec 4, 2023
2 parents 144b414 + 1178eed commit d00ab06
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lemmy-almalinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions lemmy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d00ab06

Please sign in to comment.