infra/roles/.common/tasks/users/main.yml

21 lines
457 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: common-users-tor-reload
service:
name: tor
state: restarted
when: onion_exists.changed
- name: common-users-tor-wait
wait_for:
path: "/var/lib/tor/{{ item.name }}/hostname"
loop: "{{ users }}"
when: onion_exists.changed