Explorar o código

making macaddr match case-insensitive

Grega Bremec %!s(int64=3) %!d(string=hai) anos
pai
achega
c8483fd547
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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