roles/networking: fix more issues
This commit is contained in:
parent
0288cea768
commit
c6978b61ae
@ -52,6 +52,13 @@
|
|||||||
template:
|
template:
|
||||||
src: dns_servers.conf.j2
|
src: dns_servers.conf.j2
|
||||||
dest: /etc/systemd/resolved.conf.d/50-dns_servers.conf
|
dest: /etc/systemd/resolved.conf.d/50-dns_servers.conf
|
||||||
|
register: set_dns
|
||||||
|
|
||||||
|
- name: Restart resolved
|
||||||
|
systemd:
|
||||||
|
name: systemd-resolved
|
||||||
|
state: restarted
|
||||||
|
when: set_dns.changed
|
||||||
|
|
||||||
- name: Create NetworkManager connection
|
- name: Create NetworkManager connection
|
||||||
community.general.nmcli:
|
community.general.nmcli:
|
||||||
@ -69,11 +76,17 @@
|
|||||||
poll: 0
|
poll: 0
|
||||||
async: 1000
|
async: 1000
|
||||||
|
|
||||||
|
- name: Reset Ansible connection params
|
||||||
|
set_fact:
|
||||||
|
ansible_host: "{{ local_ip }}"
|
||||||
|
when: nmcli_conf.changed or rmconn.changed
|
||||||
|
|
||||||
- name: Attempt to reconnect
|
- name: Attempt to reconnect
|
||||||
wait_for_connection:
|
wait_for_connection:
|
||||||
timeout: 240
|
timeout: 240
|
||||||
when: nmcli_conf.changed or rmconn.changed
|
when: nmcli_conf.changed or rmconn.changed
|
||||||
|
|
||||||
|
|
||||||
- name: Remove rmconn task at every minute
|
- name: Remove rmconn task at every minute
|
||||||
cron:
|
cron:
|
||||||
name: "Ensure eth0 is not externally managed (temporary)"
|
name: "Ensure eth0 is not externally managed (temporary)"
|
||||||
|
Loading…
Reference in New Issue
Block a user