algo/deploy.yml

41 lines
1.1 KiB
YAML
Raw Normal View History

2016-08-28 20:04:59 +00:00
- name: Configure the server and install required software
hosts: localhost
2016-08-28 21:05:20 +00:00
tags: algo
2016-08-28 20:04:59 +00:00
vars_files:
- config.cfg
roles:
- { role: cloud-digitalocean, tags: ['digitalocean'] }
- { role: cloud-ec2, tags: ['ec2'] }
- { role: cloud-gce, tags: ['gce'] }
- name: Post-provisioning tasks
hosts: vpn-host
gather_facts: false
2016-08-28 21:05:20 +00:00
tags: algo
2016-08-28 20:04:59 +00:00
become: true
vars_files:
- config.cfg
pre_tasks:
- name: Common pre-tasks
include: playbooks/common.yml
tags: [ 'digitalocean', 'ec2', 'gce' ]
- name: DigitalOcean pre-tasks
include: playbooks/digitalocean.yml
tags: [ 'digitalocean', 'ec2', 'gce' ]
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' ] }
handlers:
- name: reload eth0
2016-08-28 21:05:20 +00:00
shell: sh -c 'ifdown eth0; ip addr flush dev eth0; ifup eth0'