From 5a5ddde48dc15cc451452ee23069e4c6a5d95fd8 Mon Sep 17 00:00:00 2001 From: Craig Gilbertson Date: Wed, 20 Dec 2023 11:14:24 +0000 Subject: [PATCH 1/2] Removed outdated patching roles --- .../group_vars/server_type_ncr_bip_cmc.yml | 34 +++++++++---------- ansible/roles/ncr-bip-cmc/tasks/get_facts.yml | 12 +++---- .../ncr-bip-cmc/tasks/install_bip_cmc.yml | 6 ---- .../ncr-bip-cmc/tasks/update_bip_cmc.yml | 19 +++++++++++ 4 files changed, 42 insertions(+), 29 deletions(-) create mode 100644 ansible/roles/ncr-bip-cmc/tasks/update_bip_cmc.yml diff --git a/ansible/group_vars/server_type_ncr_bip_cmc.yml b/ansible/group_vars/server_type_ncr_bip_cmc.yml index 6dd184219..b2cf6b851 100644 --- a/ansible/group_vars/server_type_ncr_bip_cmc.yml +++ b/ansible/group_vars/server_type_ncr_bip_cmc.yml @@ -14,23 +14,23 @@ users_and_groups_system: - sapsys server_type_roles_list: - # - users-and-groups - # - sudoers - # - get-ec2-facts - # - set-ec2-hostname - # - domain-search - # - disable-ipv6 - # - disable-firewall - # - time - # - packages - # - message-of-the-day - # - amazon-ssm-agent - # - amazon-cli - # - ansible-script - # - epel - # - disks - # - oracle-19c-client - # - oracle-tns-entries + - users-and-groups + - sudoers + - get-ec2-facts + - set-ec2-hostname + - domain-search + - disable-ipv6 + - disable-firewall + - time + - packages + - message-of-the-day + - amazon-ssm-agent + - amazon-cli + - ansible-script + - epel + - disks + - oracle-19c-client + - oracle-tns-entries - ncr-bip-cmc - collectd - amazon-cloudwatch-agent diff --git a/ansible/roles/ncr-bip-cmc/tasks/get_facts.yml b/ansible/roles/ncr-bip-cmc/tasks/get_facts.yml index 54a0e33aa..c9d56da93 100644 --- a/ansible/roles/ncr-bip-cmc/tasks/get_facts.yml +++ b/ansible/roles/ncr-bip-cmc/tasks/get_facts.yml @@ -7,12 +7,12 @@ - name: Set password facts set_fact: - cms_cluster_key: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords[cms_cluster_key] }}" - cms_admin_password: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords[cms_admin_password] }}" - cms_db_password: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords[cms_db_password] }}" - lcm_password: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords[lcm_password] }}" - product_key: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords[product_key] }}" - auditing_db_password: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords[auditing_db_password] }}" + cms_cluster_key: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords['cms_cluster_key'] }}" + cms_admin_password: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords['cms_admin_password'] }}" + cms_db_password: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords['cms_db_password'] }}" + lcm_password: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords['lcm_password'] }}" + product_key: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords['product_key'] }}" + auditing_db_password: "{{ secretsmanager_passwords_dict['bip_cmc'].passwords['auditing_db_password'] }}" - name: Check all SSM parameters and tags are set set_fact: diff --git a/ansible/roles/ncr-bip-cmc/tasks/install_bip_cmc.yml b/ansible/roles/ncr-bip-cmc/tasks/install_bip_cmc.yml index 369b2add9..104629b2c 100644 --- a/ansible/roles/ncr-bip-cmc/tasks/install_bip_cmc.yml +++ b/ansible/roles/ncr-bip-cmc/tasks/install_bip_cmc.yml @@ -9,11 +9,6 @@ path: /u01/app/bobj/BIP4/sap_bobj/init/setupinit.sh register: bip_init_file_check -- name: Check if init has been run - stat: - path: /etc/init.d/SAPBOBJEnterpriseXI40 - register: setupinit_folder_check - - name: Install BIP block: - name: Perform pre-requesite checks @@ -40,4 +35,3 @@ ansible.builtin.shell: /u01/app/bobj/BIP4/sap_bobj/init/setupinit.sh when: - bip_init_file_check.stat.exists - - not setupinit_folder_check.stat.exists diff --git a/ansible/roles/ncr-bip-cmc/tasks/update_bip_cmc.yml b/ansible/roles/ncr-bip-cmc/tasks/update_bip_cmc.yml new file mode 100644 index 000000000..e968e225d --- /dev/null +++ b/ansible/roles/ncr-bip-cmc/tasks/update_bip_cmc.yml @@ -0,0 +1,19 @@ +--- +- name: Check if product is installed + stat: + path: /u01/app/bobj/BIP4/sap_bobj + register: bip_installed_check + +- name: Check if init file exists + stat: + path: /u01/app/bobj/BIP4/sap_bobj/init/setupinit.sh + register: bip_init_file_check + +- name: Update BIP + block: + - name: Run Silent Installation + become_user: bobj + ansible.builtin.shell: | + . ~/.bash_profile + /u02/software/BIP_4_3_SP1/setup.sh -InstallDir /u01/app/bobj/BIP4/ -r /u02/software/BIP_4_3_SP1/cmc_response.ini + when: bip_installed_check.stat.exists \ No newline at end of file From 630f02e9a5e113893abb35c5a0068761c6900060 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Dec 2023 11:18:00 +0000 Subject: [PATCH 2/2] Commit changes made by code formatters --- ansible/roles/ncr-bip-cmc/tasks/update_bip_cmc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/ncr-bip-cmc/tasks/update_bip_cmc.yml b/ansible/roles/ncr-bip-cmc/tasks/update_bip_cmc.yml index e968e225d..4c3e79494 100644 --- a/ansible/roles/ncr-bip-cmc/tasks/update_bip_cmc.yml +++ b/ansible/roles/ncr-bip-cmc/tasks/update_bip_cmc.yml @@ -16,4 +16,4 @@ ansible.builtin.shell: | . ~/.bash_profile /u02/software/BIP_4_3_SP1/setup.sh -InstallDir /u01/app/bobj/BIP4/ -r /u02/software/BIP_4_3_SP1/cmc_response.ini - when: bip_installed_check.stat.exists \ No newline at end of file + when: bip_installed_check.stat.exists