Namdrib / ansible-desktop

Ansible setup for my desktop(s)
MIT License
0 stars 0 forks source link

override os_family when running on nobara #13

Open Namdrib opened 5 months ago

Namdrib commented 5 months ago

Using ansible.builtin.set_fact to override ansible_os_family (which does not affect ansible_facts['os_family'], based on testing

This is because the os_family for Nobara is Nobara, despite it being based on Fedora (ansible_os_family = RedHat). This makes it awkward to run different tasks based on os_family, which is used in multiple locations

Namdrib commented 2 months ago

A workaround for now has been to symlink any RedHat-specific files to an equivalent Nobara file. See: 3f7dbeab4eca9acc7ccd0ba08390ed21353fc81e.

This means I don't need to have any special treatment of the ansible facts / built in variables to handle Nobara.

This also means Nobara is relatively lightweight, as it is just an extra symlink somewhere.

However, this does mean that anything where I want to include Nobara has the added step of making the symlink.

Places where this is used, as of https://github.com/Namdrib/ansible-desktop/commit/142246561adbf1568f3ce557a1647719135bfebd: