Use included functions and move vars to group for merging

This commit is contained in:
Alex 2020-05-16 23:02:33 +02:00
parent ecc6fc928d
commit 8cc540e1d3
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
2 changed files with 6 additions and 33 deletions

View File

@ -1,10 +0,0 @@
- name: Enable tor
systemd:
name: 'tor@default'
enabled: yes
state: restarted
daemon_reload: yes
- name: Restart tor
systemd:
name: 'tor@default'
state: restarted

View File

@ -1,27 +1,10 @@
- name: Create configuration directory
file:
path: '/etc/tor'
state: directory
tags:
- setup
- configs
- name: Copy configuration files - name: Copy configuration files
loop:
- { src: 'torrc.j2', dest: '/etc/tor/torrc' }
template: template:
follow: yes follow: yes
src: 'torrc.j2' src: '{{ item.src }}'
dest: '/etc/tor/torrc' dest: '{{ item.dest }}'
notify: Restart tor notify: Run service actions
tags: tags:
- update - config
- configs
- name: Install tor
apt:
install_recommends: no
name:
- tor
state: present
cache_valid_time: 3600
tags:
- setup
- packages
notify: Enable tor