You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
algo/gce.yml

89 lines
2.5 KiB
YAML

8 years ago
- name: Configure the server and install required software
hosts: localhost
gather_facts: false
vars:
zones:
"1": "us-central1-a"
"2": "us-central1-b"
"3": "us-central1-c"
"4": "us-central1-f"
"5": "us-east1-b"
"6": "us-east1-c"
"7": "us-east1-d"
"8": "europe-west1-b"
"9": "europe-west1-c"
"10": "europe-west1-d"
"11": "asia-east1-a"
"12": "asia-east1-b"
"13": "asia-east1-c"
8 years ago
vars_prompt:
- name: "credentials_file"
prompt: "Enter the local path to your credentials JSON file [ex: ~/gogle_cloud.json] (https://support.google.com/cloud/answer/6158849?hl=en&ref_topic=6262490#serviceaccounts):\n"
private: no
8 years ago
- name: "ssh_public_key"
prompt: "Enter the local path to your SSH public key:\n"
default: "~/.ssh/id_rsa.pub"
8 years ago
private: no
8 years ago
- name: "zone"
prompt: >
What zone should the server be located in?
1. Central US (Iowa A)
2. Central US (Iowa B)
3. Central US (Iowa C)
4. Central US (Iowa F)
5. Eastern US (South Carolina B)
6. Eastern US (South Carolina C)
7. Eastern US (South Carolina D)
8. Western Europe (Belgium B)
9. Western Europe (Belgium C)
10. Western Europe (Belgium D)
11. East Asia (Taiwan A)
12. East Asia (Taiwan B)
13. East Asia (Taiwan C)
Please choose the number of your zone. Press enter for default (#8) zone.
default: "8"
private: no
8 years ago
- name: "server_name"
prompt: "Name the vpn server:\n"
default: "algo"
private: no
8 years ago
- 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
8 years ago
- name: "auditd_enabled"
prompt: "Do you want to use auditd ? (Y or N):\n"
default: "Y"
private: no
8 years ago
8 years ago
roles:
- cloud-gce
8 years ago
- name: Post-provisioning tasks
hosts: vpn-host
gather_facts: false
become: true
vars_files:
- config.cfg
8 years ago
8 years ago
pre_tasks:
- name: Install prerequisites
raw: sudo apt-get update -qq && sudo apt-get install -qq -y python2.7
- name: Configure defaults
8 years ago
raw: sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
8 years ago
roles:
- common
- security
- proxy
8 years ago
- vpn
- { role: dns_adblocking , when: dns_enabled is defined and dns_enabled == "Y" }
8 years ago
- { role: logging, when: auditd_enabled is defined and auditd_enabled == 'Y' }