This commit is contained in:
2022-06-14 12:04:05 +02:00
parent 3ecd0e3644
commit d1629137c8
8 changed files with 409 additions and 32 deletions

View File

@ -153,7 +153,7 @@
- unattended-upgrades
- name: (basic.yml) activate unattended upgrades
shell: dpkg-reconfigure -plow unattended-upgrades
shell: DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure -plow unattended-upgrades
when: ua_enabled.stat.exists == False
tags:
- unattended-upgrades

View File

@ -28,6 +28,12 @@
- import_tasks: apt.yml
tags: apt
- import_tasks: tor.yml
when: inventory_hostname in groups['mail_server']
tags:
- tor-service
- import_tasks: cron.yml
tags:
- cron

View File

@ -0,0 +1,34 @@
---
- name: (tor.yml) Ensure tor is installed.
apt:
name:
- tor
state: present
when:
- ansible_os_family == "Debian"
tags:
- tor-service
- name: (tor.yml) Ensure tor servive is enabled and started
service:
name: tor
enabled: yes
state: started
tags:
- tor-service
- name: (tor.yml) Adjust configuration /etc/tor/torrc using template torrc.j2
template:
src: etc/tor/torrc.j2
dest: '{{ torrc_path }}'
owner: root
group: root
mode: '0644'
notify: "Restart tor service"
when:
- torrc_path is defined
tags:
- tor-service