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