Replace only the word not the whole line. Also increase timeout of clone.

This commit is contained in:
2018-03-21 08:07:52 -04:00
parent 62cb665bb1
commit 5776417314
2 changed files with 6 additions and 5 deletions

View File

@@ -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

View File

@@ -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