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: allow Private DNS Records for hosts to be overwritten #2

Open
marcelmamula opened this issue Feb 23, 2024 · 2 comments

Comments

@marcelmamula
Copy link
Contributor

marcelmamula commented Feb 23, 2024

sap_vm_provision: Add overwrite: true to Ansible AWS Route53 DNS Records for hosts

@sean-freeman Current implementation works great idempotently but gets stopped on route53 step because it will not overwrite by default.

TASK [community.sap_infrastructure.sap_vm_provision : Ansible AWS Route53 DNS Records for hosts] *********************************************
fatal: [nw750abaphdb -> localhost]: FAILED! => {"changed": false, "msg": "Record already exists with different value. Set 'overwrite' to replace it"}

@sean-freeman sean-freeman changed the title sap_vm_provision: Add overwrite: true to Ansible AWS Route53 DNS Records for hosts sap_vm_provision: allow Private DNS Records for hosts to be overwritten Apr 16, 2024
@sean-freeman
Copy link
Member

sean-freeman commented Apr 16, 2024

Will need to implement a new default variable sap_vm_provision_aws_private_dns_overwrite: false to this PR (use common var name pattern _private_dns because new vars have been requested for MS Azure Private DNS also).

This will also require:

  • sap_vm_provision_gcp_private_dns_overwrite
  • sap_vm_provision_ibmcloud_private_dns_overwrite
  • sap_vm_provision_msazure_private_dns_overwrite

@sean-freeman
Copy link
Member

sean-freeman commented Apr 20, 2024

OK so the default action of Ansible if there is a conflict, is not to enact a change. Appending any 'destructive' behaviour (i.e. destroy this DNS Record with the same name, and create the DNS Record with new values) would be an optional choice through a variable.

I have looked through the Ansible Modules called by sap_vm_provision and whether this additional variable is possible while retaining homogeneity:

As not all vendors allow this capability, we cannot introduce an _overwrite boolean. Execution behaviour should be equal on this, and personally I don't believe in any destruction of DNS Records in case an end-user has made a mistake.

Change not approved, and this GH Issue should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants