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

21 lines
457 B
YAML
Raw Normal View History

- include_tasks: setup_user.yml
loop: "{{ users }}"
2020-04-15 21:31:28 +00:00
- 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
2020-04-15 21:31:28 +00:00
when: onion_exists.changed
- name: common-users-tor-wait
wait_for:
path: "/var/lib/tor/{{ item.name }}/hostname"
loop: "{{ users }}"
2020-04-15 21:31:28 +00:00
when: onion_exists.changed