mirror of https://github.com/trailofbits/algo
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.
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
---
|
|
- name: Provision the server
|
|
hosts: localhost
|
|
tags: algo
|
|
vars_files:
|
|
- config.cfg
|
|
|
|
pre_tasks:
|
|
- block:
|
|
- name: Local pre-tasks
|
|
import_tasks: playbooks/cloud-pre.yml
|
|
tags: always
|
|
rescue:
|
|
- debug: var=fail_hint
|
|
tags: always
|
|
- fail:
|
|
tags: always
|
|
|
|
roles:
|
|
- role: cloud-digitalocean
|
|
when: algo_provider == "digitalocean"
|
|
- role: cloud-ec2
|
|
when: algo_provider == "ec2"
|
|
- role: cloud-vultr
|
|
when: algo_provider == "vultr"
|
|
- role: cloud-gce
|
|
when: algo_provider == "gce"
|
|
- role: cloud-azure
|
|
when: algo_provider == "azure"
|
|
- role: cloud-lightsail
|
|
when: algo_provider == "lightsail"
|
|
- role: cloud-scaleway
|
|
when: algo_provider == "scaleway"
|
|
- role: cloud-openstack
|
|
when: algo_provider == "openstack"
|
|
- role: local
|
|
when: algo_provider == "local"
|
|
|
|
post_tasks:
|
|
- block:
|
|
- name: Local post-tasks
|
|
import_tasks: playbooks/cloud-post.yml
|
|
become: false
|
|
tags: cloud
|
|
rescue:
|
|
- debug: var=fail_hint
|
|
tags: always
|
|
- fail:
|
|
tags: always
|