21 lines
510 B
YAML
21 lines
510 B
YAML
- include_tasks: setup_user.yml
|
|
loop: "{{ users }}"
|
|
|
|
- stat:
|
|
path: "/var/lib/tor/{{ item.name }}/hostname"
|
|
loop: "{{ users }}"
|
|
register: onion_exists
|
|
changed_when: not onion_exists.stat.exists
|
|
|
|
- name: Redémarrer le démon tor pour générer les onions
|
|
service:
|
|
name: tor
|
|
state: restarted
|
|
when: onion_exists.changed
|
|
|
|
- name: Attendre que les onion perso soient générés
|
|
wait_for:
|
|
path: "/var/lib/tor/{{ item.name }}/hostname"
|
|
loop: "{{ users }}"
|
|
when: onion_exists.changed
|