Description:
When installing InfoScale using Ansible it may be required to provide a Patch to support the Operating System version. This can be accomplished by including the patch repository in the playbook.
The following error is displayed when the OS requires a minimum patch.
Error:
check_must_have_patch: Required InfoScale patch: infoscale-rhel8.3_x86_64-Patch-7.4.1.2500
Example playbook tasks with included patch repo list variable.
- name: InfoScale Facters
veritas_infoscale:
module: site_facters
register: facts
- name: 'Install InfoScale'
veritas_infoscale:
module: yum
repository_name: 'InfoScale741'
repository_baseurl: 'http://<server>/7.4.1/dvd1-redhatlinux/rhel8_x86_64/rpms/'
gpgcheck: 0
gpgkey: 'http://<server>/7.4.1/dvd1-redhatlinux/rhel8_x86_64/rpms/RPM-GPG-KEY-veritas-infoscale7'
product: ENTERPRISE
product_version: "7.4.1"
ignore_patchid_check: 0
patch_repo_list: ["http://<server>/7.4.1.2500/rpms/"]
facters: "{{ groups['all'] |map('extract', hostvars, ['facts','infoscale_facts'])| select()|list }}"
state: present
If you receive the following error during the patch install you will need to import the patch GPG key.
Failed to install patches of the following repos:['ansible_patch_repo1']\nAnsbile logs are saved at:/opt/VRTS/install/ansible/logs/ansible_play_20210831063551/
The following task will import the patch GPG key using the rpm_key Ansible module.
- name: 'Import GPG Key for InfoScale Patch'
ansible.builtin.rpm_key:
state: present
key: ' http://<server>/7.4.1.2500/rpms/RPM-GPG-KEY-veritas-infoscale7'
Complete playbook with rpm GPG import
---
- hosts: prod
gather_facts: true
any_errors_fatal: true
tasks:
- name: 'Import GPG Key for InfoScale Patch'
ansible.builtin.rpm_key:
state: present
key: ' http://<server>/7.4.1.2500/rpms/RPM-GPG-KEY-veritas-infoscale7'
- name: InfoScale Facters
veritas_infoscale:
module: site_facters
register: facts
- name: 'Install InfoScale'
veritas_infoscale:
module: yum
repository_name: 'InfoScale741'
repository_baseurl: 'http://<server>/7.4.1/dvd1-redhatlinux/rhel8_x86_64/rpms/'
gpgcheck: 0
gpgkey: 'http://<server>/7.4.1/dvd1-redhatlinux/rhel8_x86_64/rpms/RPM-GPG-KEY-veritas-infoscale7'
product: ENTERPRISE
product_version: "7.4.1"
ignore_patchid_check: 0
patch_repo_list: ["http://<server>/7.4.1.2500/rpms/"]
facters: "{{ groups['all'] |map('extract', hostvars, ['facts','infoscale_facts'])| select()|list }}"
state: present
Additionally, we can install the latest InfoScale patch available in the same playbook using the following two tasks.
- name: InfoScale Facters (II)
veritas_infoscale:
module: site_facters
register: facts
- name: "Patch Upgrade”
veritas_infoscale:
module: patchupgrade
ignore_patchid_check: 1
patch_repo_list: ["http://<server>/7.4.1.2800/rpms/"]
facters: "{{ groups['all'] |map('extract', hostvars, ['facts','infoscale_facts'])| select()|list }}"
state: present