Move ansible to it's own directory structure

This commit is contained in:
2025-07-30 12:41:18 -05:00
parent 0764cc8bd7
commit 48b8548528
66 changed files with 0 additions and 6 deletions

View File

@@ -0,0 +1,10 @@
---
- name: Add DHCP entry for {{ inventory_hostname }}
delegate_to: "{{ dhcp_server }}"
become: true
ansible.builtin.lineinfile:
path: /etc/dnsmasq.d/hosts.conf
regexp: "# {{ inventory_hostname }}$"
line: "dhcp-host={{ host_mac_address | lower }},{{ host_ip_address }} # {{ inventory_hostname }}"
state: present
notify: Restart dnsmasq

View File

@@ -0,0 +1,11 @@
---
- name: "Create DNS record for {{ dns_name | default(inventory_hostname) }}"
delegate_to: "{{ dns_server }}"
freeipa.ansible_freeipa.ipadnsrecord:
ipaapi_context: "server"
ipaadmin_password: "{{ vault_freeipa_password }}"
name: "{{ dns_name | default(inventory_hostname) }}"
zone_name: "{{ base_domain }}"
record_type: "A"
record_value: "{{ dns_address | default(host_ip_address) }}"
record_ttl: 60