mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 10:25:39 +00:00
start macchiato in handler
If we start it in the task, it can temporarily bring down the network as it assigns a new address, causing future network tasks (like installing packages) to fail. Starting it in a handler postpones it till the very end.
This commit is contained in:
parent
62e20808b0
commit
f94a402ef2
2 changed files with 7 additions and 1 deletions
4
roles/macchiato/handlers/main.yml
Normal file
4
roles/macchiato/handlers/main.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- name: start macchiato
|
||||
service: name=macchiato.service state=started
|
||||
when: network.spoof_mac == True
|
||||
|
|
@ -8,9 +8,11 @@
|
|||
copy: src=macchiato_default.sh dest=/etc/macchiato.d/{{ item }}.sh
|
||||
with_items: "{{ ansible_interfaces }}"
|
||||
|
||||
- name: Enable and start macchiato
|
||||
- name: Enable macchiato
|
||||
service: name=macchiato.service enabled=yes state=started
|
||||
when: network.spoof_mac == True
|
||||
notify:
|
||||
- start macchiato
|
||||
|
||||
- name: Disable and stop macchiato
|
||||
service: name=macchiato.service enabled=no state=stopped
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue