ansible/roles/tinyproxy/tasks/main.yml

41 lines
827 B
YAML
Raw Normal View History

2022-08-31 18:30:53 +02:00
# note: test with
# * curl icanhazip.com
# * http_proxy=caladan:8888 curl icanhazip.com
2022-09-04 17:25:14 +02:00
---
2022-08-31 18:30:53 +02:00
- name: install tinyproxy
apk:
name: tinyproxy
when: ansible_distribution == "Alpine"
- name: copy tinyproxy config
copy:
src: tinyproxy.conf
dest: /etc/tinyproxy/tinyproxy.conf
owner: root
group: root
mode: '0644'
- name: enable tinyproxy
service:
name: tinyproxy
state: started
2022-09-04 17:25:14 +02:00
enabled: true
2022-08-31 18:30:53 +02:00
when: ansible_distribution == "Alpine"
- name: set awall firewall rule
copy:
src: awall/tinyproxy.json
dest: /etc/awall/optional/tinyproxy.json
owner: root
group: root
mode: '0644'
when: ansible_distribution == "Alpine"
- name: enable tinyproxy awall rule
awall:
name: tinyproxy
state: enabled
2022-09-04 17:25:14 +02:00
activate: true
2022-08-31 18:30:53 +02:00
when: ansible_distribution == "Alpine"