-
Notifications
You must be signed in to change notification settings - Fork 2
/
prepare_utility_host.yml
111 lines (98 loc) · 3.25 KB
/
prepare_utility_host.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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
- hosts: utility
gather_facts: true
become: true
tasks:
- name: Install utility host packages
package:
name: "{{item}}"
state: installed
with_items: "{{utility_host_packages}}"
- name: Enable and start utility host services
service:
name: "{{item}}"
state: started
enabled: yes
with_items: "{{utility_host_services}}"
- name: Create local bin directory
file:
dest: "{{bin_dir}}"
state: directory
- name: Create local build directory
file:
dest: "{{bin_dir}}"
state: directory
- name: Run prep tasks for firmware update methods
ansible.builtin.include_tasks: "include/firmware/{{ fw_module }}/utility_host_prep.yaml"
loop: "{{ enabled_firmware_modules }}"
loop_control:
loop_var: fw_module
- name: Fetch openshift-install binary
get_url:
url: "{{source_urls['installer']}}"
dest: "{{base_dir}}/openshift-install-linux.tar.gz"
environment:
http_proxy: "{{proxy_url|default(omit)}}"
https_proxy: "{{proxy_url|default(omit)}}"
- name: Fetch openshift client binaries
get_url:
url: "{{source_urls['client']}}"
dest: "{{base_dir}}/openshift-client-linux.tar.gz"
environment:
http_proxy: "{{proxy_url|default(omit)}}"
https_proxy: "{{proxy_url|default(omit)}}"
- name: Extract openshift-install
unarchive:
creates: "{{bin_dir}}/openshift-install"
dest: "{{bin_dir}}"
exclude: README.md
remote_src: yes
src: "{{base_dir}}/openshift-install-linux.tar.gz"
- name: Extract openshift clients
unarchive:
creates: "{{bin_dir}}/oc"
dest: "{{bin_dir}}"
exclude: README.md
remote_src: yes
src: "{{base_dir}}/openshift-client-linux.tar.gz"
- name: Remove tarballs
file:
path: "{{base_dir}}/{{item}}"
state: absent
loop:
- "openshift-client-linux.tar.gz"
- "openshift-install-linux.tar.gz"
- name: Pull coreos-installer image (Docker)
docker_image:
source: pull
name: "{{coreos_installer_image}}"
state: present
when: utility_host_container_runtime == "docker"
environment:
http_proxy: "{{proxy_url|default(omit)}}"
https_proxy: "{{proxy_url|default(omit)}}"
- name: Pull coreos-installer image (Podman)
podman_image:
name: "{{coreos_installer_image}}"
state: present
when: utility_host_container_runtime == "podman"
environment:
http_proxy: "{{proxy_url|default(omit)}}"
https_proxy: "{{proxy_url|default(omit)}}"
- name: Pull fcct image (Docker)
docker_image:
source: pull
name: "{{fcct_image}}"
state: present
when: utility_host_container_runtime == "docker"
environment:
http_proxy: "{{proxy_url|default(omit)}}"
https_proxy: "{{proxy_url|default(omit)}}"
- name: Pull fcct image (Podman)
podman_image:
name: "{{fcct_image}}"
state: present
when: utility_host_container_runtime == "podman"
environment:
http_proxy: "{{proxy_url|default(omit)}}"
https_proxy: "{{proxy_url|default(omit)}}"