Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions software/install-ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ Additionally it is possible to request a specific version other than the latest/
- `data:install_ansible.version` - if this variable is defined then a specific version will be installed

Note that the system in question must have a `pipx` package available through the default package manager as well as python installed which should come along as a dependency of `pipx`.

On Red Hat based systems, Ansible is installed with `dnf` instead of `pipx`.
The minimal install uses the `ansible-core` package from the default repositories.
The full install uses the `ansible` package, which requires the EPEL repository to be enabled.
15 changes: 13 additions & 2 deletions software/install-ansible/install-ansible.cf
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,27 @@ bundle agent install_ansible_main
if => not(isvariable("data:install_ansible.version"));

data:ansible_minimal_install::
"package" string => "ansible-core";
"base_command" string => "pipx install --global ansible-core";

data:ansible_full_install|(!data:ansible_full_install.!data:ansible_minimal_install)::
"package" string => "ansible";
"base_command" string => "pipx install --global --include-deps ansible";

packages:
"pipx" classes => if_ok("pipx_installed");
# Use the distro packages on Red Hat, as recommended by Ansible
redhat::
"${package}"
version => "${data:install_ansible.version}",
if => isvariable("data:install_ansible.version");

"${package}" if => not(isvariable("data:install_ansible.version"));

!redhat::
"pipx" classes => if_ok("pipx_installed");

commands:
pipx_installed.!ansible_installed::
!redhat.pipx_installed.!ansible_installed::
"${install_ansible_command}"
contain => in_shell_umask(022),
comment => "The default umask of 077 would create /opt/pipx/venvs/ansible which is inaccessible to everyone but root, so use 022 instead.";
Expand Down
Loading