Skip to content

Commit

Permalink
Merge pull request #55 from marcelmamula/awsdns
Browse files Browse the repository at this point in the history
sap_vm_provision: Add optional AWS DNS overwrite
  • Loading branch information
marcelmamula authored Aug 22, 2024
2 parents b26f267 + 57019f6 commit 1f3f68d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
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

0 comments on commit 1f3f68d

Please sign in to comment.