Sfoglia il codice sorgente

making macaddr match case-insensitive

Grega Bremec 3 anni fa
parent
commit
c8483fd547
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      roles/deploy-infra/tasks/main.yml

+ 1 - 1
roles/deploy-infra/tasks/main.yml

@@ -56,7 +56,7 @@
   lineinfile:
     path: /etc/dhcp/dhcpd.conf
     insertafter: "^# BEGIN ANSIBLE MANAGED DHCP CONFIG$"
-    regexp: "hardware ethernet {{ node.mac | regex_replace('^01-', '') | regex_replace('-', ':') }}"
+    regexp: "(?i)hardware ethernet {{ node.mac | regex_replace('^01-', '') | regex_replace('-', ':') }}"
     line: 'host {{ node.name }}-{{ node.cluster }} { hardware ethernet {{ node.mac | regex_replace("^01-", "") | regex_replace("-", ":") }}; fixed-address {{ node.ip }}; option host-name "{{ node.name }}.{{ node.cluster }}.example.com."; }'
     state: present
   notify: restart_dhcpd