mirror of
https://github.com/iiab/iiab.git
synced 2025-02-14 20:22:08 +00:00
attempt to change ip from console without requiring a reboot
This commit is contained in:
parent
298414537d
commit
14c7499cdc
2 changed files with 14 additions and 5 deletions
|
@ -33,16 +33,20 @@
|
|||
template: dest=/etc/network/interfaces
|
||||
src=network/interfaces.j2
|
||||
|
||||
- name: Supply our own dhcpcd.conf
|
||||
template: dest=/etc/dhcpcd.conf
|
||||
src=network/dhcpcd.conf
|
||||
register: ipchange
|
||||
|
||||
- name: restart if the ip changed
|
||||
service: name=dhcpcd state=restarted enabled=True
|
||||
when: ipchage.changed
|
||||
|
||||
- name: Copy the bridge script
|
||||
template: dest=/etc/network/interfaces.d/iiab
|
||||
src=network/iiab.j2
|
||||
register: interface
|
||||
|
||||
- name: start up the dhcpcd service
|
||||
service: name=dhcpcd
|
||||
enabled=True
|
||||
state=started
|
||||
|
||||
- name: If this was a change, things need to shift
|
||||
service: name=hostapd state=stopped
|
||||
when: interface.changed
|
||||
|
|
|
@ -34,6 +34,11 @@
|
|||
- name: Supply our own dhcpcd.conf
|
||||
template: dest=/etc/dhcpcd.conf
|
||||
src=network/dhcpcd.conf
|
||||
register: ipchange
|
||||
|
||||
- name: restart if the ip changed
|
||||
service: name=dhcpcd state=restarted
|
||||
when: ipchage.changed
|
||||
|
||||
- name: Copy the network config script
|
||||
template: dest=/etc/network/interfaces.d/iiab
|
||||
|
|
Loading…
Reference in a new issue