sync repo to git

This commit is contained in:
2025-07-25 10:36:32 -05:00
parent c625e48dee
commit 0f4d2dcb7c
39 changed files with 461 additions and 304 deletions

View File

@@ -0,0 +1 @@
# Add/modify entry in DNSmasq

View File

@@ -0,0 +1,28 @@
---
- name: Ensure dnsmasq is installed
ansible.builtin.apt:
name: dnsmasq
state: present
become: true
when: ansible_os_family == "Debian"
- name: Ensure dnsmasq is installed
ansible.builtin.dnf:
name: dnsmasq
state: present
become: true
when: ansible_os_family == "RedHat"
- name: Add host reservation to dnsmasq
ansible.builtin.lineinfile:
path: /etc/dnsmasq.d/hosts.conf
regexp: "^dhcp-host={{ hostvars['ocp-hub'].mac_address }}"
line: "dhcp-host={{ hostvars['ocp-hub'].mac_address }},{{ hostvars['ocp-hub'].ip_address }} #{{ hostvars['ocp-hub'].hostname }}"
state: present
become: true
- name: Restart dnsmasq service
ansible.builtin.service:
name: dnsmasq
state: restarted
become: true