Use included functions and move vars to group for merging
This commit is contained in:
parent
ecc6fc928d
commit
8cc540e1d3
|
@ -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
|
|
@ -1,27 +1,10 @@
|
|||
- name: Create configuration directory
|
||||
file:
|
||||
path: '/etc/tor'
|
||||
state: directory
|
||||
tags:
|
||||
- setup
|
||||
- configs
|
||||
- name: Copy configuration files
|
||||
loop:
|
||||
- { src: 'torrc.j2', dest: '/etc/tor/torrc' }
|
||||
template:
|
||||
follow: yes
|
||||
src: 'torrc.j2'
|
||||
dest: '/etc/tor/torrc'
|
||||
notify: Restart tor
|
||||
src: '{{ item.src }}'
|
||||
dest: '{{ item.dest }}'
|
||||
notify: Run service actions
|
||||
tags:
|
||||
- update
|
||||
- configs
|
||||
- name: Install tor
|
||||
apt:
|
||||
install_recommends: no
|
||||
name:
|
||||
- tor
|
||||
state: present
|
||||
cache_valid_time: 3600
|
||||
tags:
|
||||
- setup
|
||||
- packages
|
||||
notify: Enable tor
|
||||
- config
|
||||
|
|
Reference in New Issue