fix variables

This commit is contained in:
2025-03-23 01:32:22 -05:00
parent 4b0dd8f56a
commit 84fe9bdd7b
5 changed files with 26 additions and 17 deletions

View File

@@ -16,8 +16,8 @@
- name: Add host reservation to dnsmasq
ansible.builtin.lineinfile:
path: /etc/dnsmasq.d/hosts.conf
regexp: "^dhcp-host={{ mac_address }}"
line: "dhcp-host={{ mac_address }},{{ ip_address }} #{{ hostname }}"
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