mirror of
https://github.com/pigmonkey/spark.git
synced 2026-07-28 18:22:15 +00:00
only perform tor tasks when tor variable is defined
This commit is contained in:
parent
1db8763ca0
commit
948b2a3b9f
2 changed files with 5 additions and 5 deletions
|
|
@ -19,7 +19,7 @@
|
|||
- { role: macchiato, tags: ['macchiato'] }
|
||||
- { role: ntp, tags: ['ntp'] }
|
||||
- { role: firejail, tags: ['firejail'] }
|
||||
- { role: tor, tags: ['tor'] }
|
||||
- { role: tor, tags: ['tor'], when: "tor is defined" }
|
||||
- { role: unbound, tags: ['unbound'] }
|
||||
- { role: editors, tags: ['editors'] }
|
||||
- { role: filesystems, tags: ['filesystems'] }
|
||||
|
|
|
|||
|
|
@ -19,20 +19,20 @@
|
|||
|
||||
- name: Enable and start Tor
|
||||
service: name=tor enabled=yes state=started
|
||||
when: tor is defined and tor.run_on == "all"
|
||||
when: tor.run_on == "all"
|
||||
|
||||
- name: Remove Tor from trusted unit list
|
||||
lineinfile: dest=/usr/local/etc/trusted_units
|
||||
state=absent
|
||||
line=tor.service
|
||||
when: tor is defined and tor.run_on == "all"
|
||||
when: tor.run_on == "all"
|
||||
|
||||
- name: Disable Tor
|
||||
service: name=tor enabled=no
|
||||
when: tor is defined and tor.run_on == "trusted"
|
||||
when: tor.run_on == "trusted"
|
||||
|
||||
- name: Add Tor to trusted unit list
|
||||
lineinfile: dest=/usr/local/etc/trusted_units
|
||||
state=present
|
||||
line=tor.service
|
||||
when: tor is defined and tor.run_on == "trusted"
|
||||
when: tor.run_on == "trusted"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue