mirror of
https://github.com/trailofbits/algo
synced 2024-11-13 19:12:06 +00:00
100 lines
2.6 KiB
YAML
100 lines
2.6 KiB
YAML
- name: Configure the server and install required software
|
|
hosts: localhost
|
|
gather_facts: false
|
|
|
|
vars:
|
|
regions:
|
|
"1": "East US"
|
|
"2": "West US"
|
|
"3": "South Central US"
|
|
"4": "North Europe"
|
|
"5": "East Asia"
|
|
"6": "Japan East"
|
|
"7": "West Europe"
|
|
"8": "Southeast Asia"
|
|
"9": "Japan West"
|
|
"10": "North Central US"
|
|
"11": "Central US"
|
|
"12": "Brazil South"
|
|
"13": "East US 2"
|
|
"14": "Australia Southeast"
|
|
"15": "Australia East"
|
|
|
|
#vars_prompt:
|
|
#- name: "azure_subscription_id"
|
|
#prompt: "Enter your subscription ID (https://blogs.msdn.microsoft.com/mschray/2015/05/13/getting-your-azure-guid-subscription-id/):\n"
|
|
#private: yes
|
|
|
|
#- name: "management_cert_path"
|
|
#prompt: "Enter the local path to your management cert [ex: ~/.ssh/id_rsa.pub] (https://azure.microsoft.com/en-us/documentation/articles/azure-api-management-certs/):\n"
|
|
#private: no
|
|
|
|
#- name: "ssh_public_key"
|
|
#prompt: "Enter the local path to your SSH public key [ex: ~/.ssh/id_rsa.pub] :\n"
|
|
#private: no
|
|
|
|
#- name: "region"
|
|
#prompt: >
|
|
#What region should the server be located in?
|
|
#1. East US
|
|
#2. West US
|
|
#3. South Central US
|
|
#4. North Europe
|
|
#5. East Asia
|
|
#6. Japan East
|
|
#7. West Europe
|
|
#8. Southeast Asia
|
|
#9. Japan West
|
|
#10. North Central US
|
|
#11. Central US
|
|
#12. Brazil South
|
|
#13. East US 2
|
|
#14. Australia Southeast
|
|
#15. Australia East
|
|
#Enter the number of your desired region:
|
|
#default: "7"
|
|
#private: no
|
|
|
|
#- name: "azure_server_name"
|
|
#prompt: "Name the vpn server:\n"
|
|
#default: "algo.local"
|
|
#private: no
|
|
|
|
#- name: "dns_enabled"
|
|
#prompt: "Do you want to use a local DNS resolver to block ads while surfing? (Y or N):\n"
|
|
#default: "Y"
|
|
#private: no
|
|
|
|
#- name: "auditd_enabled"
|
|
#prompt: "Do you want to use auditd ? (Y or N):\n"
|
|
#default: "Y"
|
|
#private: no
|
|
|
|
roles:
|
|
- azure
|
|
|
|
- name: Post-provisioning tasks
|
|
hosts: vpn-host
|
|
gather_facts: false
|
|
become: true
|
|
vars_files:
|
|
- config.cfg
|
|
|
|
pre_tasks:
|
|
- name: Install prerequisites
|
|
raw: sudo apt-get update -qq && sudo apt-get install -qq -y python2.7
|
|
- name: Configure defaults
|
|
raw: sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
|
|
|
|
roles:
|
|
- common
|
|
- security
|
|
- features
|
|
- vpn
|
|
- { role: logging, when: auditd_enabled is defined and auditd_enabled == 'Y' }
|
|
|
|
|
|
|
|
|
|
|