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

Commit

Permalink
somewhat cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
alimakki committed Sep 30, 2018
1 parent 17a4e89 commit c987e62
Show file tree
Hide file tree
Showing 15 changed files with 261 additions and 80 deletions.
4 changes: 2 additions & 2 deletions global_vars/vars.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
upstream_dns_servers:
- 8.8.8.8
- 8.8.4.4
- 1.1.1.1
- 1.0.0.1

streisand_client_test: no

Expand Down
2 changes: 0 additions & 2 deletions playbooks/roles/common/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ streisand_common_packages:
- apt-transport-https
# Used to perform a system upgrade
- aptitude
# Used to compile Libreswan and OpenConnect Server (ocserv)
#- build-essential
# Used to perform API requests, including the version check for
# the Tor Browser Bundle
- curl
Expand Down
10 changes: 7 additions & 3 deletions playbooks/roles/dnsmasq/templates/dnsmasq.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ bogus-priv
# uncomment this.
no-resolv

{% for item in upstream_dns_servers %}
server={{ item }}
{% endfor %}
bind-interfaces

server=127.0.0.53

#{% for item in upstream_dns_servers %}
#server={{ item }}
#{% endfor %}
3 changes: 0 additions & 3 deletions playbooks/roles/gpg/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@
- name: "Start a new dirmngr with our config changes"
command: "gpgconf --launch dirmngr"

- name: "Start the gpg-agent"
command: "gpg-agent --daemon --write-env-file {{ root_gpg_dir }}"

- name: "Wait for the GPG agent and dirmngr control sockets"
wait_for:
path: "{{ root_gpg_dir }}/{{ item }}"
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/openvpn/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
dependencies:
# OpenVPN needs to be added to the firewall
- { role: ufw }
# - { role: dnsmasq }
- { role: dnsmasq }
- { role: ip-forwarding }
12 changes: 6 additions & 6 deletions playbooks/roles/openvpn/tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
#- name: "Add the official OpenVPN APT key; hiding 25 lines of log..."
# apt_key:
# id: E158C569
# data: "{{ item }}"
# with_file: openvpn_signing.key
# no_log: True
- name: "Add the official OpenVPN APT key; hiding 25 lines of log..."
apt_key:
id: E158C569
data: "{{ item }}"
with_file: openvpn_signing.key
no_log: True

#- name: Add the official OpenVPN repository
# apt_repository:
Expand Down
10 changes: 5 additions & 5 deletions playbooks/roles/openvpn/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# Add the apt key and install OpenVPN
- import_tasks: install.yml

#- name: "Configure DNSMasq to listen on {{ dnsmasq_openvpn_tcp_ip }}:53 and {{ dnsmasq_openvpn_udp_ip }}:53"
# template:
# src: openvpn_dnsmasq.conf.j2
# dest: /etc/dnsmasq.d/openvpn.conf
# notify: Restart dnsmasq
- name: "Configure DNSMasq to listen on {{ dnsmasq_openvpn_tcp_ip }}:53 and {{ dnsmasq_openvpn_udp_ip }}:53"
template:
src: openvpn_dnsmasq.conf.j2
dest: /etc/dnsmasq.d/openvpn.conf
notify: Restart dnsmasq

- include_role:
name: certificates
Expand Down
5 changes: 0 additions & 5 deletions playbooks/roles/stunnel/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
name: stunnel4.service
state: stopped

- name: Remove the stunnel init.d script
file:
state: absent
path: "/etc/init.d/stunnel4"

- name: Copy the stunnel system unit file
template:
src: stunnel.service.j2
Expand Down
1 change: 0 additions & 1 deletion playbooks/roles/stunnel/templates/stunnel-remote.conf.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cert = {{ stunnel_cert }}
key = {{ stunnel_key }}
debug = 4
options = NO_SSLv2
options = NO_SSLv3
options = NO_TLSv1
options = NO_TLSv1.1
Expand Down
61 changes: 33 additions & 28 deletions playbooks/roles/tinyproxy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,42 @@
apt:
name: tinyproxy

- name: Create the tinyproxy config directory
file:
path: "{{ tinyproxy_conf_dir }}"
state: directory
owner: nobody
group: nogroup
mode: 0755
#- name: Create the tinyproxy config directory
# file:
# path: "{{ tinyproxy_conf_dir }}"
# state: directory
# owner: nobody
# group: nogroup
# mode: 0755

- name: Generate the tinyproxy configuration file
template:
src: tinyproxy.conf.j2
dest: "{{ tinyproxy_conf_file }}"
owner: root
group: root
mode: 0644
#- name: Generate the tinyproxy configuration file
# template:
# src: tinyproxy.conf.j2
# dest: "{{ tinyproxy_conf_file }}"
# owner: root
# group: root
# mode: 0644

- name: Generate the tinyproxy system unit file
template:
src: tinyproxy.service.j2
dest: /etc/systemd/system/tinyproxy.service
owner: root
group: root
mode: 0644
#- name: Create the tinyproxy systemd drop-in configuration directory
# file:
# path: "{{ tinyproxy_systemd_service_path }}"
# state: directory

- name: Generate the systemd tmpfile for tinyproxy
template:
src: tinyproxytmp.conf.j2
dest: /etc/tmpfiles.d/tinyproxy.conf
owner: root
group: root
mode: 0644
#- name: Generate the tinyproxy systemd drop-in service file
# template:
# src: tinyproxy.service.j2
# dest: "{{ tinyproxy_systemd_service_path }}/10-restart-failure.service"
# owner: root
# group: root
# mode: 0644

#- name: Generate the systemd tmpfile for tinyproxy
# template:
# src: tinyproxytmp.conf.j2
# dest: /etc/tmpfiles.d/tinyproxy.conf
# owner: root
# group: root
# mode: 0644

- name: Enable and restart the tinyproxy service
systemd:
Expand Down
Loading

0 comments on commit c987e62

Please sign in to comment.