- name: SATELLITE 6 | Set Satellite server CA as a fact set_fact: rhsm_katello_ca: "{{ lookup('url', rhsm_satellite_url ~ '/pub/katello-server-ca.crt', validate_certs=False, split_lines=False) }}" - block: - name: Ensure appropriate version of subscription-manager is installed assert: fail_msg: The installed version of subscription-manager is too old. that: - packages['subscription-manager'][0]['version'] is version_compare('1.10', '>=') rescue: - name: Attempt to update subscription-manager yum: name: subscription-manager state: latest - name: Ensure appropriate version of subscription-manager is installed assert: fail_msg: The installed version of subscription-manager is too old. that: - packages['subscription-manager'][0]['version'] is version_compare('1.10', '>=') - name: Configure yum plugins ini_file: path: /etc/yum/pluginconf.d/{{ item.file }} section: "{{ item.section | default('main') }}" option: "{{ item.option }}" value: "{{ item.value }}" loop: "{{ rhsm_yum_plugins }}" - name: SATELLITE 6 | Install katello-ca-consumer yum: name: "{{ rhsm_satellite_url }}/pub/katello-ca-consumer-latest.noarch.rpm" state: present validate_certs: no disable_gpg_check: yes register: katello_rpm # This script is provided by katello-ca-consumer and takes care of deploying # the katello certificates and prepare the config in RHSM. - name: SATELLITE 6 | Execute katello-rhsm-consumer shell: katello-rhsm-consumer when: katello_rpm.changed