Skip to content

Commit

Permalink
Remove prereq and add setup task to get facts instead
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelmamula committed Sep 26, 2024
1 parent ee0d67a commit fa058db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 3 additions & 4 deletions roles/sap_vm_temp_vip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ This role does not update `/etc/hosts` or DNS records, as these steps are perfor
## Prerequisites
<!-- BEGIN Prerequisites -->
Environment:
1. Execute role with `gather_facts: true`, as it uses `ansible_default_ipv4` facts.
2. Assign hosts to correct groups, which are also used in other roles in our project
- Supported cluster groups: `hana_primary, hana_secondary, anydb_primary, anydb_secondary, nwas_ascs, nwas_ers`
- Assign hosts to correct groups, which are also used in other roles in our project
- Supported cluster groups: `hana_primary, hana_secondary, anydb_primary, anydb_secondary, nwas_ascs, nwas_ers`

Role dependency:
1. [sap_vm_provision](https://github.com/sap-linuxlab/community.sap_infrastructure/tree/main/roles/sap_vm_provision), for creating the following required resources: DNS, Load Balancers and Health Checks.
- [sap_vm_provision](https://github.com/sap-linuxlab/community.sap_infrastructure/tree/main/roles/sap_vm_provision), for creating required resources: DNS, Load Balancers and Health Checks.
<!-- END Prerequisites -->

## Execution
Expand Down
6 changes: 6 additions & 0 deletions roles/sap_vm_temp_vip/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
# Ansible role to setup temporary Virtual IP (VIP)

- name: Collect Ansible facts for required subsets - Hardware and Network Interfaces
ansible.builtin.setup:
gather_subset:
- hardware
- interfaces

- name: Assert that sap_vm_temp_vip_default_ip is defined
ansible.builtin.assert:
that: sap_vm_temp_vip_default_ip is defined and sap_vm_temp_vip_default_ip | length > 0
Expand Down

0 comments on commit fa058db

Please sign in to comment.