connection: move rmconn cronjob to _after_ creating connection
This commit is contained in:
parent
ef472d04f9
commit
a11de10423
@ -21,28 +21,6 @@
|
|||||||
mode: 700
|
mode: 700
|
||||||
register: rmconn
|
register: rmconn
|
||||||
|
|
||||||
- name: Run rmconn every 30 minutes
|
|
||||||
cron:
|
|
||||||
name: "Ensure eth0 is not externally managed"
|
|
||||||
minute: "*/30"
|
|
||||||
job: "/root/rmconn.sh"
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Run rmconn every minute (temporarily)
|
|
||||||
cron:
|
|
||||||
name: "Ensure eth0 is not externally managed (temporary)"
|
|
||||||
minute: "*"
|
|
||||||
job: "/root/rmconn.sh"
|
|
||||||
state: present
|
|
||||||
when: rmconn.changed
|
|
||||||
|
|
||||||
- name: Run rmconn at boot
|
|
||||||
cron:
|
|
||||||
name: "Ensure eth0 is not externally managed (at reboot)"
|
|
||||||
special_time: reboot
|
|
||||||
job: "/root/rmconn.sh"
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Disable DHCP DNS
|
- name: Disable DHCP DNS
|
||||||
template:
|
template:
|
||||||
src: nodns.network.j2
|
src: nodns.network.j2
|
||||||
@ -85,6 +63,28 @@
|
|||||||
poll: 0
|
poll: 0
|
||||||
async: 1000
|
async: 1000
|
||||||
|
|
||||||
|
- name: Run rmconn every 30 minutes
|
||||||
|
cron:
|
||||||
|
name: "Ensure eth0 is not externally managed"
|
||||||
|
minute: "*/30"
|
||||||
|
job: "/root/rmconn.sh"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Run rmconn every minute (temporarily)
|
||||||
|
cron:
|
||||||
|
name: "Ensure eth0 is not externally managed (temporary)"
|
||||||
|
minute: "*"
|
||||||
|
job: "/root/rmconn.sh"
|
||||||
|
state: present
|
||||||
|
when: rmconn.changed
|
||||||
|
|
||||||
|
- name: Run rmconn at boot
|
||||||
|
cron:
|
||||||
|
name: "Ensure eth0 is not externally managed (at reboot)"
|
||||||
|
special_time: reboot
|
||||||
|
job: "/root/rmconn.sh"
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Reset Ansible connection params
|
- name: Reset Ansible connection params
|
||||||
set_fact:
|
set_fact:
|
||||||
ansible_host: "{{ local_ip }}"
|
ansible_host: "{{ local_ip }}"
|
||||||
@ -95,7 +95,6 @@
|
|||||||
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