-
Notifications
You must be signed in to change notification settings - Fork 148
Expand file tree
/
Copy path01-bootstrap.yml
More file actions
75 lines (68 loc) · 2.08 KB
/
01-bootstrap.yml
File metadata and controls
75 lines (68 loc) · 2.08 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
#
# NOTE: Playbook migrated to: cifmw_setup/tasks/bootstrap.yml.
# DO NOT EDIT THIS PLAYBOOK. IT WILL BE REMOVED IN NEAR FUTURE.
#
- name: Bootstrap playbook
hosts: "{{ cifmw_target_host | default('localhost') }}"
gather_facts: true
tasks:
- name: Set custom cifmw PATH reusable fact
tags:
- always
when:
- cifmw_path is not defined
ansible.builtin.set_fact:
cifmw_path: "{{ ansible_user_dir }}/.crc/bin:{{ ansible_user_dir }}/.crc/bin/oc:{{ ansible_user_dir }}/bin:{{ ansible_env.PATH }}"
cacheable: true
- name: Get customized parameters
tags:
- always
ansible.builtin.set_fact:
ci_framework_params: >-
{{
hostvars[inventory_hostname] |
dict2items |
selectattr("key", "match",
"^(cifmw|pre|post)_(?!install_yamls|openshift_token|openshift_login|openshift_kubeconfig).*") |
list | items2dict
}}
- name: Install custom CAs as soon as possible
tags:
- bootstrap
- packages
ansible.builtin.import_role:
name: install_ca
- name: Run repo_setup
tags:
- bootstrap
- packages
ansible.builtin.import_role:
name: repo_setup
- name: Run ci_setup role
tags:
- bootstrap
ansible.builtin.import_role:
role: ci_setup
- name: Prepare install_yamls make targets
when:
- cifmw_architecture_scenario is undefined
tags:
- bootstrap
ansible.builtin.include_role:
name: install_yamls
apply:
tags:
- bootstrap
- name: Get latest image for future reference
tags:
- bootstrap
ansible.builtin.import_role:
role: discover_latest_image
- name: Create artifacts with custom params
tags:
- always
ansible.builtin.copy:
mode: "0644"
dest: "{{ cifmw_basedir|default(ansible_user_dir ~ '/ci-framework-data') }}/artifacts/parameters/custom-params.yml"
content: "{{ ci_framework_params | to_nice_yaml }}"