Unable To Install 7.4.1 On RedHat 8.0 Using Ansible Or Yum

book

Article ID: 100051187

calendar_today

Updated On:

Description

Error Message

 Ansible Error

fatal: [server101]: FAILED! => {"changed": 0, "msg": "\n        check_release_compatibility: Passed\n        check_installed_product: No product installed.\n        check_prod_prerequisite: The following required OS lib(s) installed found on the system:\n        check_disk_space: Passed\n        check_prod_basic: Passed\n        check_must_have_patch: Passed\nYum Repo created\nError occurred while installing: ENTERPRI$E741\nError:Updating Subscription Management repositories.\nUnable to read consumer identity\nThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.\nLas$ metadata expiration check: 0:00:04 ago on Fri Aug 20 12:47:06 2021. ERR:Main config did not have a group_command attr. before setopt\nMain config did not have a protected_multilib attr. before setopt\nReposito$y 'RedHat_8_BaseOS' is missing name in configuration, using id.\nMain config did not have a group_command attr. before setopt\nMain config did not have a protected_multilib attr. before setopt\nWarning: Module $r Group 'ENTERPRISE741' does not exist.\nError: Nothing to do.\nAnsbile logs are saved at:/opt/VRTS/install/ansible/logs/ansible_play_20210820124703/", "rc": 1}
 

Excerpt from the ansible_play log. 

 

Warning: Module or Group 'ENTERPRISE741' does not exist.
Error: Nothing to do.

 

Cause

The repository for RedHat 8 did not include the required group xml files

This can be verified using yum grouplist. 

# /usr/bin/yum --disablerepo="*" --enablerepo="InfoScale741" grouplist


Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Repository 'RedHat_8_BaseOS' is missing name in configuration, using id.
Last metadata expiration check: 0:00:33 ago on Fri 20 Aug 2021 12:38:01 PM PDT.
Error: No group data available for configured repositories.

 

Resolution

Update the rhel8 repository group xml files. 

 #cd 7.4.1/dvd1-redhatlinux/rhel8_x86_64/rpms
 #mv repodata repodat.orig
 #rm -rf info
 #7.4.1/dvd1-redhatlinux/rhel8_x86_64/installer -yumgroupxml 7.4.1/dvd1-redhatlinux/rhel8_x86_64/rpms
 #createrepo -g 7.4.1/dvd1-redhatlinux/rhel8_x86_64/rpms/comps_all_741.xml 7.4.1/dvd1-redhatlinux/rhel8_x86_64/rpms

 

Verify the groups for InfoScale are listed

# /usr/bin/yum --disablerepo="*" --enablerepo="InfoScale741" grouplist
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Repository 'RedHat_8_BaseOS' is missing name in configuration, using id.
Last metadata expiration check: 0:00:06 ago on Fri 20 Aug 2021 12:53:36 PM PDT.
Available Groups:
   AVAILABILITY741
   ENTERPRISE741
   FOUNDATION741
   STORAGE741

 

Once the yum repo lists the InfoScale groups, Ansible will be able to complete the install. 

playbook excerpt for the install 
 

  - name: Install InfoScale
    veritas_infoscale:
     module: yum
     repository_name: '{{ repository_name }}'
     repository_baseurl: '{{ repository_baseurl }}'
     gpgcheck: 0
     gpgkey: '{{ repository_baseurl }}/RPM-GPG-KEY-veritas-infoscale7'
     product: ENTERPRISE
     product_version: "{{ product_version }}"
     ignore_patchid_check: 1
     facters: "{{ groups['all'] |map('extract', hostvars, ['facts','infoscale_facts'])| select()|list }}"
     state: present

Issue/Introduction

Unable to install InfoScale 7.4.1 using Ansible