Replace only the word not the whole line. Also increase timeout of clone.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
target: '{{ hypervisor }}'
|
||||
storage: 'SSD1'
|
||||
format: 'qcow2'
|
||||
timeout: 3000
|
||||
timeout: 6000
|
||||
register: cloned
|
||||
|
||||
- name: Wait 10 seconds for proxmox to register the new node
|
||||
|
||||
@@ -178,7 +178,8 @@
|
||||
name: '{{ inventory_hostname }}'
|
||||
|
||||
- name: Fix hosts file
|
||||
lineinfile: dest=/etc/hosts
|
||||
regexp="ubuntu"
|
||||
state=present
|
||||
line="{{ inventory_hostname }}"
|
||||
replace:
|
||||
path: /etc/hosts
|
||||
regexp: '(\s+)ubuntu(\s+.*)?$'
|
||||
replace: '\1{{ inventory_hostname }}\2'
|
||||
backup: yes
|
||||
|
||||
Reference in New Issue
Block a user