chore(yggdrasil): consistently use ansible os family in [..] for matching OSs

This commit is contained in:
Jan Christian Grünhage 2024-08-19 17:22:34 +02:00
parent f29fb79cf9
commit a49cf83672
No known key found for this signature in database
GPG key ID: EEC1170CE56FA2ED
3 changed files with 8 additions and 8 deletions

View file

@ -4,7 +4,7 @@
name: yggdrasil
enabled: true
state: restarted
when: ansible_lsb.id != "Void"
when: ansible_os_family in ["Debian", "RedHat", "Archlinux"]
listen: "restart_yggdrasil"
- name: Restart yggdrasil using community.general.runit
@ -12,5 +12,5 @@
name: yggdrasil
enabled: true
state: restarted
when: ansible_lsb.id == "Void"
when: ansible_os_family in ["Void"]
listen: "restart_yggdrasil"

View file

@ -4,7 +4,7 @@
name: yggdrasil
enabled: true
state: started
when: ansible_lsb.id != "Void"
when: ansible_os_family in ["Debian", "RedHat", "Archlinux"]
# This separate entry here is needed because
# the service module does not support runit
@ -13,4 +13,4 @@
name: yggdrasil
enabled: true
state: started
when: ansible_lsb.id == "Void"
when: ansible_os_family in ["Void"]

View file

@ -1,18 +1,18 @@
---
- name: Import void linux tasks
ansible.builtin.import_tasks: install/void.yml
when: ansible_os_family == "void"
when: ansible_os_family in ["Void"]
- name: Import fedora tasks
ansible.builtin.import_tasks: install/fedora.yml
when: ansible_os_family == "RedHat"
when: ansible_os_family in ["RedHat"]
- name: Import debian tasks
ansible.builtin.import_tasks: install/debian.yml
when: ansible_os_family == "Debian"
when: ansible_os_family in ["Debian"]
- name: Import arch tasks
ansible.builtin.import_tasks: install/arch.yml
when: ansible_os_family == "Archlinux"
when: ansible_os_family in ["Archlinux"]
# TODO: Support more distros (and maybe even Windows one day)