Skip to content

Commit

Permalink
BZ#2100578 - enable the satellite module for el8
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni authored and ekohl committed Jun 24, 2022
1 parent f6f0778 commit cb0457f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
1 change: 1 addition & 0 deletions roles/satellite-clone/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
backup_dir: /backup
satellite_installer_cmd: satellite-installer
satellite_package: satellite
satellite_module: satellite
satellite_scenario: satellite
config_files_path: "{{ backup_dir }}/config_files.tar.gz"
disable_firewall: False
Expand Down
30 changes: 8 additions & 22 deletions roles/satellite-clone/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,29 +116,15 @@

# Install Satellite packages

- when:
- name: Enable {{ satellite_module }}:el8 module
command: dnf module enable -y {{ satellite_module }}:el8
# can't use the `dnf` module for modules without a default stream
# https://github.com/ansible/ansible/issues/56504
# https://github.com/ansible/ansible/issues/64852
args:
creates: /etc/dnf/modules.d/{{ satellite_module }}.module
when:
- ansible_distribution_major_version == '8'
block:
- name: Enable ruby:2.7 module
dnf:
name: '@ruby:2.7'
state: present

- name: Enable postgresql:12 module
dnf:
name: '@postgresql:12'
state: present

- name: Get pki-core module info
command: dnf module list --enabled
register: enabled_modules
changed_when: false

# The dnf module can't enable a module that has no default profile
# See https://github.com/ansible/ansible/issues/56504 for details
- name: Enable pki-core module
command: dnf module enable pki-core -y
when: "'pki-core' not in enabled_modules.stdout"

- name: Install Satellite packages
yum:
Expand Down

0 comments on commit cb0457f

Please sign in to comment.