Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sap_vm_provision: Add optional AWS DNS overwrite #55

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions roles/sap_vm_provision/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ sap_vm_provision_aws_placement_strategy_spread: false
# Example for HANA HA: "HA-Role-Pacemaker-{{ sap_system_hana_db_sid }}"
sap_vm_provision_aws_ha_iam_role: "HA-Role-Pacemaker"
sap_vm_provision_aws_ha_iam_instance_profile: "HA-Instance-Profile-Pacemaker-Cluster"
# Enable to overwrite existing DNS record.
# AWS Route53 module fails when DNS record already exists.
sap_vm_provision_aws_dns_overwrite: false

# Google Cloud
sap_vm_provision_gcp_credentials_json: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
wait: true
access_key: "{{ sap_vm_provision_aws_access_key }}"
secret_key: "{{ sap_vm_provision_aws_secret_access_key }}"
overwrite: "{{ sap_vm_provision_aws_dns_overwrite if sap_vm_provision_aws_dns_overwrite | bool else false }}"

rescue:
# This requires no_log set on each Ansible Task, and not set on the Ansible Task Block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
wait: true
access_key: "{{ sap_vm_provision_aws_access_key }}"
secret_key: "{{ sap_vm_provision_aws_secret_access_key }}"
overwrite: "{{ sap_vm_provision_aws_dns_overwrite if sap_vm_provision_aws_dns_overwrite | bool else false }}"
loop: "{{ (groups['hana_primary'] | default([])) }}"
loop_control:
loop_var: host_node
Expand Down Expand Up @@ -92,6 +93,7 @@
wait: true
access_key: "{{ sap_vm_provision_aws_access_key }}"
secret_key: "{{ sap_vm_provision_aws_secret_access_key }}"
overwrite: "{{ sap_vm_provision_aws_dns_overwrite if sap_vm_provision_aws_dns_overwrite | bool else false }}"
loop: "{{ (groups['anydb_primary'] | default([])) }}"
loop_control:
loop_var: host_node
Expand Down Expand Up @@ -133,6 +135,7 @@
wait: true
access_key: "{{ sap_vm_provision_aws_access_key }}"
secret_key: "{{ sap_vm_provision_aws_secret_access_key }}"
overwrite: "{{ sap_vm_provision_aws_dns_overwrite if sap_vm_provision_aws_dns_overwrite | bool else false }}"
loop: "{{ (groups['nwas_ascs'] | default([])) }}"
loop_control:
loop_var: host_node
Expand Down Expand Up @@ -174,6 +177,7 @@
wait: true
access_key: "{{ sap_vm_provision_aws_access_key }}"
secret_key: "{{ sap_vm_provision_aws_secret_access_key }}"
overwrite: "{{ sap_vm_provision_aws_dns_overwrite if sap_vm_provision_aws_dns_overwrite | bool else false }}"
loop: "{{ (groups['nwas_ers'] | default([])) }}"
loop_control:
loop_var: host_node
Expand Down