Changed DNS record creation to Ansible

This commit is contained in:
2025-07-08 23:27:46 -05:00
parent 2bce9c3f29
commit 8212a69802
8 changed files with 150 additions and 92 deletions

View File

@@ -0,0 +1,17 @@
---
- name: Add entry to DNS
hosts: all
gather_facts: false
tasks:
- name: Create DNS entry for {{ inventory_hostname }} #on {{ groups['ipa_servers'][0] }}
delegate_to: "{{ groups['ipaserver'][0] }}"
freeipa.ansible_freeipa.ipadnsrecord:
ipaapi_context: "server"
ipaadmin_password: "{{ vault_freeipa_password }}"
name: "{{ inventory_hostname }}"
zone_name: "{{ base_domain }}"
record_type: "A"
record_value: "{{ ip_address }}"
record_ttl: 60
#create_reverse: yes