mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-07 07:33:52 +02:00
linting
This commit is contained in:
parent
69e7f1e5dc
commit
4d731580b7
7 changed files with 17 additions and 95 deletions
18
deploy.yml
18
deploy.yml
|
@ -3,26 +3,26 @@
|
||||||
tags: algo
|
tags: algo
|
||||||
vars_files:
|
vars_files:
|
||||||
- config.cfg
|
- config.cfg
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- { role: cloud-digitalocean, tags: ['digitalocean'] }
|
- { role: cloud-digitalocean, tags: ['digitalocean'] }
|
||||||
- { role: cloud-ec2, tags: ['ec2'] }
|
- { role: cloud-ec2, tags: ['ec2'] }
|
||||||
- { role: cloud-gce, tags: ['gce'] }
|
- { role: cloud-gce, tags: ['gce'] }
|
||||||
- { role: local, tags: ['local'] }
|
- { role: local, tags: ['local'] }
|
||||||
|
|
||||||
- name: Post-provisioning tasks
|
- name: Post-provisioning tasks
|
||||||
hosts: vpn-host
|
hosts: vpn-host
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tags: algo
|
tags: algo
|
||||||
become: true
|
become: true
|
||||||
vars_files:
|
vars_files:
|
||||||
- config.cfg
|
- config.cfg
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Common pre-tasks
|
- name: Common pre-tasks
|
||||||
include: playbooks/common.yml
|
include: playbooks/common.yml
|
||||||
tags: [ 'digitalocean', 'ec2', 'gce', 'pre' ]
|
tags: [ 'digitalocean', 'ec2', 'gce', 'pre' ]
|
||||||
|
|
||||||
- name: DigitalOcean pre-tasks
|
- name: DigitalOcean pre-tasks
|
||||||
include: playbooks/digitalocean.yml
|
include: playbooks/digitalocean.yml
|
||||||
tags: [ 'digitalocean' ]
|
tags: [ 'digitalocean' ]
|
||||||
|
@ -33,9 +33,9 @@
|
||||||
- { role: dns_adblocking, tags: ['dns', 'adblock' ] }
|
- { role: dns_adblocking, tags: ['dns', 'adblock' ] }
|
||||||
- { role: logging, tags: [ 'logging' ] }
|
- { role: logging, tags: [ 'logging' ] }
|
||||||
- { role: ssh_tunneling, tags: [ 'ssh_tunneling' ] }
|
- { role: ssh_tunneling, tags: [ 'ssh_tunneling' ] }
|
||||||
- { role: vpn, tags: [ 'vpn' ] }
|
- { role: vpn, tags: [ 'vpn' ] }
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: reload eth0
|
- name: reload eth0
|
||||||
shell: sh -c 'ifdown eth0; ip addr flush dev eth0; ifup eth0'
|
shell: sh -c 'ifdown eth0; ip addr flush dev eth0; ifup eth0'
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- name: Install prerequisites
|
- name: Install prerequisites
|
||||||
raw: sudo apt-get update -qq && sudo apt-get install -qq -y python2.7
|
raw: sudo apt-get update -qq && sudo apt-get install -qq -y python2.7
|
||||||
|
|
||||||
- name: Configure defaults
|
- name: Configure defaults
|
||||||
raw: sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
|
raw: sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
|
||||||
|
|
|
@ -1,81 +1,3 @@
|
||||||
#vars:
|
|
||||||
#regions:
|
|
||||||
#"1": "ams2"
|
|
||||||
#"2": "ams3"
|
|
||||||
#"3": "fra1"
|
|
||||||
#"4": "lon1"
|
|
||||||
#"5": "nyc1"
|
|
||||||
#"6": "nyc2"
|
|
||||||
#"7": "nyc3"
|
|
||||||
#"8": "sfo1"
|
|
||||||
#"9": "sfo2"
|
|
||||||
#"10": "sgp1"
|
|
||||||
#"11": "tor1"
|
|
||||||
#"12": "blr1"
|
|
||||||
|
|
||||||
#vars_prompt:
|
|
||||||
#- name: "do_access_token"
|
|
||||||
#prompt: "Enter your API Token (https://cloud.digitalocean.com/settings/api/tokens):\n"
|
|
||||||
#private: yes
|
|
||||||
|
|
||||||
#- name: "do_ssh_name"
|
|
||||||
#prompt: "Enter a valid SSH key name (https://cloud.digitalocean.com/settings/security):\n"
|
|
||||||
#private: no
|
|
||||||
|
|
||||||
#- name: "do_region"
|
|
||||||
#prompt: >
|
|
||||||
#What region should the server be located in?
|
|
||||||
#1. Amsterdam (Datacenter 2)
|
|
||||||
#2. Amsterdam (Datacenter 3)
|
|
||||||
#3. Frankfurt
|
|
||||||
#4. London
|
|
||||||
#5. New York (Datacenter 1)
|
|
||||||
#6. New York (Datacenter 2)
|
|
||||||
#7. New York (Datacenter 3)
|
|
||||||
#8. San Francisco (Datacenter 1)
|
|
||||||
#9. San Francisco (Datacenter 2)
|
|
||||||
#10. Singapore
|
|
||||||
#11. Toronto
|
|
||||||
#12. Bangalore
|
|
||||||
#Enter the number of your desired region:
|
|
||||||
#default: "7"
|
|
||||||
#private: no
|
|
||||||
|
|
||||||
#- name: "do_server_name"
|
|
||||||
#prompt: "Name the vpn server:\n"
|
|
||||||
#default: "algo.local"
|
|
||||||
#private: no
|
|
||||||
|
|
||||||
#- name: "dns_enabled"
|
|
||||||
#prompt: "Do you want to install a local DNS resolver to block ads while surfing? (y/n):\n"
|
|
||||||
#default: "y"
|
|
||||||
#private: no
|
|
||||||
|
|
||||||
#- name: "proxy_enabled"
|
|
||||||
#prompt: "Do you want to install an HTTP proxy to block ads and decrease traffic usage while surfing? (y/n):\n"
|
|
||||||
#default: "y"
|
|
||||||
#private: no
|
|
||||||
|
|
||||||
#- name: "auditd_enabled"
|
|
||||||
#prompt: "Do you want to use auditd for security monitoring (see config.cfg)? (y/n):\n"
|
|
||||||
#default: "y"
|
|
||||||
#private: no
|
|
||||||
|
|
||||||
#- name: "ssh_tunneling_enabled"
|
|
||||||
#prompt: "Do you want each user to have their own account for SSH tunneling? (y/n):\n"
|
|
||||||
#default: "y"
|
|
||||||
#private: no
|
|
||||||
|
|
||||||
#- name: "security_enabled"
|
|
||||||
#prompt: "Do you want to enable the security role? (y/n):\n"
|
|
||||||
#default: "y"
|
|
||||||
#private: no
|
|
||||||
|
|
||||||
#- name: "easyrsa_p12_export_password"
|
|
||||||
#prompt: "Enter a password for p12 certificates and SSH private keys: (minimum five characters)\n"
|
|
||||||
#default: "vpnpw"
|
|
||||||
#private: yes
|
|
||||||
|
|
||||||
- name: Enable IPv6 on the droplet
|
- name: Enable IPv6 on the droplet
|
||||||
uri:
|
uri:
|
||||||
url: "https://api.digitalocean.com/v2/droplets/{{ do_droplet_id }}/actions"
|
url: "https://api.digitalocean.com/v2/droplets/{{ do_droplet_id }}/actions"
|
||||||
|
@ -111,4 +33,4 @@
|
||||||
|
|
||||||
- name: Wait for SSH to become available
|
- name: Wait for SSH to become available
|
||||||
local_action: "wait_for port=22 host={{ inventory_hostname }} timeout=320"
|
local_action: "wait_for port=22 host={{ inventory_hostname }} timeout=320"
|
||||||
become: false
|
become: false
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
- name: Enable services
|
- name: Enable services
|
||||||
service: name=auditd enabled=yes
|
service: name=auditd enabled=yes
|
||||||
|
|
||||||
# Rsyslog
|
# Rsyslog
|
||||||
|
|
||||||
- name: Rsyslog configured
|
- name: Rsyslog configured
|
||||||
|
@ -29,4 +29,4 @@
|
||||||
- restart rsyslog
|
- restart rsyslog
|
||||||
|
|
||||||
- name: Enable services
|
- name: Enable services
|
||||||
service: name=rsyslog enabled=yes
|
service: name=rsyslog enabled=yes
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
apt: name="{{ item }}" state=latest
|
apt: name="{{ item }}" state=latest
|
||||||
with_items:
|
with_items:
|
||||||
- unattended-upgrades
|
- unattended-upgrades
|
||||||
|
|
||||||
- name: Configure unattended-upgrades
|
- name: Configure unattended-upgrades
|
||||||
template: src=50unattended-upgrades.j2 dest=/etc/apt/apt.conf.d/50unattended-upgrades owner=root group=root mode=0644
|
template: src=50unattended-upgrades.j2 dest=/etc/apt/apt.conf.d/50unattended-upgrades owner=root group=root mode=0644
|
||||||
|
|
||||||
- name: Periodic upgrades configured
|
- name: Periodic upgrades configured
|
||||||
template: src=10periodic.j2 dest=/etc/apt/apt.conf.d/10periodic owner=root group=root mode=0644
|
template: src=10periodic.j2 dest=/etc/apt/apt.conf.d/10periodic owner=root group=root mode=0644
|
||||||
|
|
||||||
- name: Find directories for minimizing access
|
- name: Find directories for minimizing access
|
||||||
stat:
|
stat:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
- name: restart apparmor
|
- name: restart apparmor
|
||||||
service: name=apparmor state=restarted
|
service: name=apparmor state=restarted
|
||||||
|
|
||||||
- name: save iptables
|
- name: save iptables
|
||||||
shell: service netfilter-persistent save
|
shell: service netfilter-persistent save
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- { role: common }
|
- { role: common }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue