2016-12-13 19:08:05 +00:00
|
|
|
- name: Configure the server
|
2016-08-28 20:04:59 +00:00
|
|
|
hosts: localhost
|
2016-08-28 21:05:20 +00:00
|
|
|
tags: algo
|
2016-08-28 20:04:59 +00:00
|
|
|
vars_files:
|
|
|
|
- config.cfg
|
2016-09-19 17:18:27 +00:00
|
|
|
|
2016-12-12 19:02:45 +00:00
|
|
|
pre_tasks:
|
|
|
|
- name: Local pre-tasks
|
|
|
|
include: playbooks/local.yml
|
2017-01-14 16:37:47 +00:00
|
|
|
tags: [ 'always' ]
|
2016-12-12 19:02:45 +00:00
|
|
|
|
2017-02-28 17:05:22 +00:00
|
|
|
- name: Local pre-tasks
|
|
|
|
include: playbooks/local_ssh.yml
|
|
|
|
become: false
|
|
|
|
when: Deployed_By_Algo is defined and Deployed_By_Algo == "Y"
|
2017-03-04 20:05:02 +00:00
|
|
|
tags: [ 'local' ]
|
2017-02-28 17:05:22 +00:00
|
|
|
|
2016-08-28 20:04:59 +00:00
|
|
|
roles:
|
|
|
|
- { role: cloud-digitalocean, tags: ['digitalocean'] }
|
2016-09-19 17:18:27 +00:00
|
|
|
- { role: cloud-ec2, tags: ['ec2'] }
|
|
|
|
- { role: cloud-gce, tags: ['gce'] }
|
2016-12-10 18:09:34 +00:00
|
|
|
- { role: cloud-azure, tags: ['azure'] }
|
2016-09-19 16:54:45 +00:00
|
|
|
- { role: local, tags: ['local'] }
|
2016-09-19 17:18:27 +00:00
|
|
|
|
2016-12-13 18:58:45 +00:00
|
|
|
post_tasks:
|
2017-04-01 04:19:10 +00:00
|
|
|
- name: Local post-tasks
|
2017-02-28 17:05:22 +00:00
|
|
|
include: playbooks/post.yml
|
2016-12-13 18:58:45 +00:00
|
|
|
become: false
|
2017-02-28 17:05:22 +00:00
|
|
|
tags: [ 'cloud' ]
|
2016-12-13 19:05:55 +00:00
|
|
|
|
2016-12-13 19:08:05 +00:00
|
|
|
- name: Configure the server and install required software
|
2016-08-28 20:04:59 +00:00
|
|
|
hosts: vpn-host
|
|
|
|
gather_facts: false
|
2016-09-19 17:18:27 +00:00
|
|
|
tags: algo
|
2016-08-28 20:04:59 +00:00
|
|
|
become: true
|
|
|
|
vars_files:
|
|
|
|
- config.cfg
|
|
|
|
|
2016-09-19 17:18:27 +00:00
|
|
|
pre_tasks:
|
2016-08-28 20:04:59 +00:00
|
|
|
- name: Common pre-tasks
|
|
|
|
include: playbooks/common.yml
|
2016-12-12 15:04:51 +00:00
|
|
|
tags: [ 'digitalocean', 'ec2', 'gce', 'azure', 'local', 'pre' ]
|
2016-09-19 17:18:27 +00:00
|
|
|
|
2016-08-28 20:04:59 +00:00
|
|
|
roles:
|
|
|
|
- { role: security, tags: [ 'security' ] }
|
|
|
|
- { role: dns_adblocking, tags: ['dns', 'adblock' ] }
|
|
|
|
- { role: ssh_tunneling, tags: [ 'ssh_tunneling' ] }
|
2016-09-19 17:18:27 +00:00
|
|
|
- { role: vpn, tags: [ 'vpn' ] }
|
2016-08-28 20:04:59 +00:00
|
|
|
|
2016-11-26 18:05:06 +00:00
|
|
|
post_tasks:
|
2017-02-14 17:25:56 +00:00
|
|
|
- debug:
|
|
|
|
msg:
|
|
|
|
- "{{ congrats.common.split('\n') }}"
|
|
|
|
- " {{ congrats.p12_pass }}"
|
|
|
|
- " {% if Store_CAKEY is defined and Store_CAKEY == 'N' %}{% else %}{{ congrats.ca_key_pass }}{% endif %}"
|
|
|
|
- " {% if cloud_deployment is defined %}{{ congrats.ssh_access }}{% endif %}"
|
2016-11-26 18:05:06 +00:00
|
|
|
tags: always
|
2017-01-11 17:55:07 +00:00
|
|
|
|
2017-02-03 19:24:02 +00:00
|
|
|
- name: Save the CA key password
|
|
|
|
local_action: >
|
|
|
|
shell echo "{{ easyrsa_CA_password }}" > /tmp/ca_password
|
|
|
|
become: no
|
|
|
|
tags: tests
|
|
|
|
|
|
|
|
- name: Delete the CA key
|
|
|
|
local_action:
|
|
|
|
module: file
|
|
|
|
path: "configs/{{ IP_subject_alt_name }}/pki/private/cakey.pem"
|
|
|
|
state: absent
|
|
|
|
become: no
|
|
|
|
tags: always
|
|
|
|
when: Store_CAKEY is defined and Store_CAKEY == "N"
|