Fix bug.
This commit is contained in:
parent
78fca84cb7
commit
1997355967
@ -70,6 +70,7 @@
|
||||
- 127.0.0.1
|
||||
type: ethernet
|
||||
state: present
|
||||
register: nmcli_conf
|
||||
become: true
|
||||
|
||||
- name: Remove /etc/NetworkManager/conf.d/99-cloud-init.conf
|
||||
@ -79,9 +80,13 @@
|
||||
register: cloud_init_removal
|
||||
become: true
|
||||
|
||||
- name: Check resolv.conf content
|
||||
command: egrep "^nameserver\s*127\.0\.0\.1" /etc/resolv.conf
|
||||
register: resolv_conf_test
|
||||
|
||||
- name: Restarting NetworkManager
|
||||
service:
|
||||
name: NetworkManager
|
||||
state: restarted
|
||||
become: true
|
||||
when: cloud_init_removal is changed
|
||||
when: cloud_init_removal is changed or nmcli_conf is changed or resolv_conf_test.rc != 0
|
||||
|
Loading…
Reference in New Issue
Block a user