iac_modules/ansible/playbooks/roles/vhosts/common/tasks/setup-privoxy.yml

25 lines
541 B
YAML

---
- name: Install privoxy (Debian)
apt:
name: privoxy
state: present
when: ansible_os_family == 'Debian'
- name: Install privoxy (RedHat)
yum:
name: privoxy
state: present
when: ansible_os_family == 'RedHat'
- name: Ensure SOCKS5 forwarding is configured in privoxy
lineinfile:
path: /etc/privoxy/config
line: "forward-socks5t / {{ proxy.socks5_host }}:{{ proxcy.socks5_port }} ."
state: present
- name: Restart and enable privoxy
systemd:
name: privoxy
state: restarted
enabled: yes