summaryrefslogtreecommitdiffstats
path: root/roles/torrelay/tasks/main.yml
blob: 8a8fddae08067d85b7fb49d64b389602aa5f5ee4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
- name: Installation du paquet Tor depuis torproject.org
  yum: name=https://deb.torproject.org/torproject.org/rpm/el/{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/tor-{{ versionupstream }}-tor.2.rh6_5.{{ ansible_architecture }}.rpm state=present
  when: ansible_distribution == "CentOS" and ansible_distribution_major_version|int == 6

- name: Installation du paquet Tor depuis le dépôt
  yum: name=tor state=present
  when: ansible_distribution == "Fedora"

- name: Configuration du service
  template: src=torrc dest=/etc/tor/torrc
            owner=root
            group=root
            mode=644
  notify: restart tor

- name: Activation et démarrage du relai Tor
  service: name=tor state=started enabled=yes