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

22 lines
846 B
YAML
Raw Normal View History

2023-11-02 19:51:54 +01:00
---
- name: Set facts
2023-11-02 19:51:54 +01:00
ansible.builtin.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
2023-11-02 19:51:54 +01:00
ansible.builtin.set_fact:
2021-12-02 16:55:55 +01:00
debian_based: "{{ debian or ubuntu }}"
can_chown: "{{ not junest }}"
has_systemd: "{{ not junest }}"
tags:
- always
# TODO Make this a real Ansible fact maybe?