2018-08-27 14:05:45 +00:00
|
|
|
---
|
|
|
|
- name: Provision the server
|
|
|
|
hosts: localhost
|
2018-09-27 08:18:12 +00:00
|
|
|
tags: always
|
2019-04-08 20:20:34 +00:00
|
|
|
become: false
|
2018-08-27 14:05:45 +00:00
|
|
|
vars_files:
|
|
|
|
- config.cfg
|
|
|
|
|
2019-04-08 20:20:34 +00:00
|
|
|
tasks:
|
2018-08-27 14:05:45 +00:00
|
|
|
- block:
|
|
|
|
- name: Local pre-tasks
|
|
|
|
import_tasks: playbooks/cloud-pre.yml
|
|
|
|
|
2019-04-08 20:20:34 +00:00
|
|
|
- name: Include a provisioning role
|
|
|
|
include_role:
|
|
|
|
name: "{{ 'local' if algo_provider == 'local' else 'cloud-' + algo_provider }}"
|
2018-08-27 14:05:45 +00:00
|
|
|
|
|
|
|
- name: Local post-tasks
|
|
|
|
import_tasks: playbooks/cloud-post.yml
|
|
|
|
rescue:
|
2019-04-08 20:20:34 +00:00
|
|
|
- include_tasks: playbooks/rescue.yml
|