mirror of
https://github.com/trailofbits/algo.git
synced 2025-04-25 02:32:43 +02:00
* Draft works with ECDSA RSA support for Windows * update-users with local_openssl_tasks * move prompts to the algo script * additional directory for SSH keys * move easyrsa_p12_export_password to pre_tasks * update-users testing * Fix hardcoded vars * Delete the CA key * Hardcoded IP. Fixes #219 * Some fixes
80 lines
2 KiB
YAML
80 lines
2 KiB
YAML
- name: Configure the server
|
|
hosts: localhost
|
|
tags: algo
|
|
vars_files:
|
|
- config.cfg
|
|
|
|
pre_tasks:
|
|
- name: Local pre-tasks
|
|
include: playbooks/local.yml
|
|
tags: [ 'always' ]
|
|
|
|
roles:
|
|
- { role: cloud-digitalocean, tags: ['digitalocean'] }
|
|
- { role: cloud-ec2, tags: ['ec2'] }
|
|
- { role: cloud-gce, tags: ['gce'] }
|
|
- { role: cloud-azure, tags: ['azure'] }
|
|
- { role: local, tags: ['local'] }
|
|
|
|
post_tasks:
|
|
- name: Wait until SSH becomes ready...
|
|
local_action:
|
|
module: wait_for
|
|
port: 22
|
|
host: "{{ cloud_instance_ip }}"
|
|
search_regex: "OpenSSH"
|
|
delay: 10
|
|
timeout: 320
|
|
state: present
|
|
become: false
|
|
tags:
|
|
- cloud
|
|
|
|
- name: A short pause, in order to be sure the instance is ready
|
|
pause:
|
|
seconds: 10
|
|
tags:
|
|
- cloud
|
|
|
|
- name: Configure the server and install required software
|
|
hosts: vpn-host
|
|
gather_facts: false
|
|
tags: algo
|
|
become: true
|
|
vars_files:
|
|
- config.cfg
|
|
|
|
pre_tasks:
|
|
- name: Common pre-tasks
|
|
include: playbooks/common.yml
|
|
tags: [ 'digitalocean', 'ec2', 'gce', 'azure', 'local', 'pre' ]
|
|
|
|
roles:
|
|
- { role: security, tags: [ 'security' ] }
|
|
- { role: proxy, tags: [ 'proxy', 'adblock' ] }
|
|
- { role: dns_adblocking, tags: ['dns', 'adblock' ] }
|
|
- { role: logging, tags: [ 'logging' ] }
|
|
- { role: ssh_tunneling, tags: [ 'ssh_tunneling' ] }
|
|
- { role: vpn, tags: [ 'vpn' ] }
|
|
|
|
post_tasks:
|
|
- debug: msg="{{ congrats.split('\n') }}"
|
|
tags: always
|
|
|
|
- debug: msg="{{ additional_information.split('\n') }}"
|
|
tags: cloud
|
|
|
|
- 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"
|