algo/cloud.yml
2023-08-26 15:12:49 +00:00

22 lines
596 B
YAML

---
- name: Provision the server
hosts: localhost
tags: always
become: false
vars_files:
- config.cfg
tasks:
- name: Play cloud
block:
- name: Local pre-tasks
ansible.builtin.import_tasks: tasks/cloud-pre.yml
- name: Include a provisioning role
ansible.builtin.include_role:
name: "{{ 'local' if algo_provider == 'local' else 'cloud-' + algo_provider }}"
- name: Local post-tasks
ansible.builtin.import_tasks: tasks/cloud-post.yml
rescue:
- ansible.builtin.include_tasks: tasks/rescue.yml