Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Commit

Permalink
temp commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alimakki committed Sep 23, 2018
1 parent 6f73f6f commit 7b125c6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
10 changes: 0 additions & 10 deletions playbooks/roles/tinyproxy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
apt:
name: tinyproxy

- name: Stop (init.d's) tinyproxy
systemd:
name: tinyproxy.service
state: stopped

- name: Create the tinyproxy config directory
file:
path: "{{ tinyproxy_conf_dir }}"
Expand Down Expand Up @@ -40,11 +35,6 @@
group: root
mode: 0644

#- name: Clean up the installed-by-default tinyproxy configuration file
# file:
# path: /etc/tinyproxy.conf
# state: absent

- name: Enable and restart the tinyproxy service
systemd:
daemon_reload: yes
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/tinyproxy/templates/tinyproxy.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ StatFile "/usr/share/tinyproxy/stats.html"
# and enable the Syslog directive. These directives are mutually
# exclusive.
#
Logfile "/var/log/tinyproxy/tinyproxy.log"
# Logfile "{{ tinyproxy_log_file }}"

#
# LogLevel:
Expand Down
4 changes: 2 additions & 2 deletions playbooks/roles/tinyproxy/templates/tinyproxy.service.j2
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[Unit]
Description=tinyproxy - a light-weight HTTP/HTTPS proxy daemon for POSIX operating systems
After=network-online.target sshd.service
After=network.target sshd.service
Documentation=man:tinyproxy(8)
Documentation=https://www.banu.com/tinyproxy/

[Service]
Type=forking
PIDFile={{ tinyproxy_pid_file }}
ExecStart=/usr/sbin/tinyproxy -c {{ tinyproxy_conf_file }}
ExecStop=/usr/bin/killall -9 tinyproxy
ExecReload=/bin/kill -HUP $MAINPID
PrivateTmp=true
PrivateDevices=yes
RestartSec=5s
Restart=on-failure

Expand Down
1 change: 1 addition & 0 deletions playbooks/roles/tinyproxy/templates/tinyproxytmp.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
# tinyproxy to write its PID file
# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
d {{ tinyproxy_pid_dir }} 0755 nobody nogroup -
d {{ tinyproxy_log_dir }} 0755 nobody nogroup -
3 changes: 3 additions & 0 deletions playbooks/roles/tinyproxy/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ tinyproxy_port: 8888
tinyproxy_listen_address: "127.0.0.1"
tinyproxy_log_level: "Critical"

tinyproxy_log_dir: "/var/log/tinyproxy"
tinyproxy_log_file: "{{ tinyproxy_log_dir }}/tinyproxy.log"

tinyproxy_pid_dir: "/var/run/tinyproxy"
tinyproxy_pid_file: "{{ tinyproxy_pid_dir }}/tinyproxy.pid"

Expand Down

0 comments on commit 7b125c6

Please sign in to comment.