Commit Graph

5 Commits (b4f5b419e17de9cc56014597e2b51ab52436e87d)

Author SHA1 Message Date
Dustin cbc4d29bd6 r/base: Install python3-libdnf5
Fedora 41 uses _dnf5_ by default.  Being written in C, its Python API is
an optional feature that needs to be installed separately.
2025-01-31 18:55:58 -06:00
Dustin bc4c7edbad r/base: Clear facts after installing python-selinux
If the Python bindings for SELinux policy management are not installed
when Ansible gathers host facts, no SELinux-related facts will be set.
Thus, any tasks that are conditional based on these facts will not run.
Typically, such tasks are required for SELinux-enabled hosts, but must
not be performed for non-SELinux hosts.  If they are not run when they
should, the deployment may fail or applications may experience issues at
runtime.

To avoid these potential issues, the *base* role now forces Ansible to
gather facts again if it installed the Python SELinux bindings.

Note: one might suggest using `meta: clear_facts` instead of `setup` and
letting Ansible decide if and when to gather facts again. Unfortunately,
this for some reason doesn't work; the `clear_facts` meta task just
causes Ansible to crash with a "shared connection to {host} closed."
2022-12-23 08:44:30 -06:00
Dustin d6fff04985 r/base: Set SSH authorized keys for root
To ensure all machines have the same keys to allow root to log in via
SSH (in case Active Directory is unavailable or something).
2021-10-16 15:39:19 -05:00
Dustin 815240983f r/base: Set root password
The *base* role will now set the password for the *root* user, if the
`root_password_hash` variable is defined.  This ensures that there is a
way to log into machines directly, even if other authentication
mechanisms like Active Directory are unavailable.
2021-10-16 15:20:49 -05:00
Dustin b870daff58 roles/base: Basic config management support
The *base* role performs the basic tasks needed to manage a node using
Ansible. Specifically, it installs the necessary packages for
manipulating SELinux policy.
2018-01-29 15:02:10 -06:00