Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable selinux deps installation from custom file server #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
1 change: 0 additions & 1 deletion tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@
when:
- ansible_version.full is version_compare('2.4', '>=')
- ansible_selinux.status == "enabled"
ignore_errors: yes
11 changes: 11 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
with_items: "{{ node_exporter_dependencies }}"
ignore_errors: yes

- name: Install dependencies [offline or from local file server]
package:
name: "{{ item }}"
state: present
register: _offline_install_dep_packages
until: _offline_install_dep_packages is success
retries: 5
delay: 2
with_items: "{{ offline_dependencies }}"
when: _install_dep_packages is failed and offline_dependencies is defined

- name: Create the node_exporter group
group:
name: "{{ node_exporter_system_group }}"
Expand Down
14 changes: 14 additions & 0 deletions vars/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,17 @@
node_exporter_dependencies:
- libselinux-python
- policycoreutils-python

## If internet is not available to install the above mentioned dependencies, then fetch them (and their dependencies) from the hosted file server
offline_dependencies:
- "{{ file_server }}/libselinux-python-2.5-14.1.el7.x86_64.rpm"
- "{{ file_server }}/audit-libs-python-2.8.4-4.el7.x86_64.rpm"
- "{{ file_server }}/checkpolicy-2.5-8.el7.x86_64.rpm"
- "{{ file_server }}/libcgroup-0.41-20.el7.x86_64.rpm"
- "{{ file_server }}/libselinux-python-2.5-14.1.el7.x86_64.rpm"
- "{{ file_server }}/libsemanage-2.5-14.el7.x86_64.rpm"
- "{{ file_server }}/libsemanage-python-2.5-14.el7.x86_64.rpm"
- "{{ file_server }}/python-IPy-0.75-6.el7.noarch.rpm"
- "{{ file_server }}/setools-libs-3.3.8-4.el7.x86_64.rpm"
- "{{ file_server }}/policycoreutils-python-2.5-29.el7_6.1.x86_64.rpm"
- "{{ file_server }}/policycoreutils-python-2.5-29.el7.x86_64.rpm"