Browse Source

regex_replace typo fixed

Grega Bremec 3 years ago
parent
commit
2d3b40c8f9
1 changed files with 3 additions and 2 deletions
  1. 3 2
      roles/deploy-infra/tasks/main.yml

+ 3 - 2
roles/deploy-infra/tasks/main.yml

@@ -38,6 +38,7 @@
     state: present
     state: present
   register: zoneupdate
   register: zoneupdate
 
 
+# TODO
 #- name: Extract the serial if rzone was updated
 #- name: Extract the serial if rzone was updated
 #- name: Bump up the serial if rzone was updated
 #- name: Bump up the serial if rzone was updated
 
 
@@ -55,8 +56,8 @@
   lineinfile:
   lineinfile:
     path: /etc/dhcp/dhcpd.conf
     path: /etc/dhcp/dhcpd.conf
     insertafter: "^# BEGIN ANSIBLE MANAGED DHCP CONFIG$"
     insertafter: "^# BEGIN ANSIBLE MANAGED DHCP CONFIG$"
-    regexp: "hardware ethernet {{ node.mac | regex_replace('^01-', '') | regex_replace_all('-', ':') }}"
-    line: 'host {{ node.name }}-{{ node.cluster }} { hardware ethernet {{ node.mac | regex_replace("^01-", "") | regex_replace_all("-", ":") }}; fixed-address {{ node.ip }}; option host-name "{{ node.name }}.{{ node.cluster }}.example.com."; }'
+    regexp: "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
     state: present
   notify: restart_dhcpd
   notify: restart_dhcpd
 ...
 ...