dotfiles/config/automatrop/roles/facts/tasks/main.yml

21 lines
810 B
YAML
Raw Normal View History

- name: Set facts
set_fact:
arch_based: "{{ ansible_distribution == 'Archlinux' }}"
arch: "{{ ansible_lsb.id == 'Arch' }}"
manjaro: "{{ ansible_lsb.id == 'Manjaro' or ansible_lsb.id == 'Manjaro-ARM' }}"
termux: "{{ ansible_distribution == 'OtherLinux' and ansible_python.executable == '/data/data/com.termux/files/usr/bin/python' }}"
debian: "{{ ansible_distribution == 'Debian' }}"
ubuntu: "{{ ansible_distribution == 'Ubuntu' }}"
2021-12-02 16:55:55 +01:00
junest: "{{ ansible_distribution == 'Archlinux' and ansible_is_chroot }}" # TODO Check if /etc/junest exists
tags:
- always
- name: Set composed facts
set_fact:
debian_based: "{{ debian or ubuntu }}"
can_chown: "{{ not junest }}"
has_systemd: "{{ not junest }}"
tags:
- always
# TODO Make this a real Ansible fact maybe?