-
Notifications
You must be signed in to change notification settings - Fork 7
/
main.yml
31 lines (28 loc) · 998 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- name: "Initialize the environment"
hosts: localhost
connection: local
become: false
gather_facts: false
vars_files:
- "./vars/builder_vars.yml"
- "~/agof_vault.yml"
tasks:
- name: "Assert that we have a valid target platform"
ansible.builtin.assert:
that:
- agof_bootstrap_target | length > 0
- agof_bootstrap_target in bootstrap_allowable_values
fail_msg: "{{ agof_bootstrap_target }} is not a supported bootstrap target"
success_msg: "Assertion passed: bootstrapping on {{ agof_bootstrap_target }}"
- name: "Set our target bootstrap platform"
ansible.builtin.set_fact:
bootstrap_target: "{{ agof_bootstrap_target }}"
- name: "Build the image"
ansible.builtin.import_playbook: "./buildimage/main.yml"
tags:
- tags_buildimage
- name: "Initialize the environment on aws"
ansible.builtin.import_playbook: "./aws/main.yml"
tags:
- tags_aws_init_env
when: agof_bootstrap_target == "aws"