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
|
- 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
|
|
||||||
|
|
Reference in New Issue