-
Notifications
You must be signed in to change notification settings - Fork 2
/
generate_ocp_install_config.yml
68 lines (55 loc) · 1.78 KB
/
generate_ocp_install_config.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
---
- hosts: service
vars_files:
- vars/main.yml
tasks:
- name: Delete dirs
file:
path: "{{ item }}"
state: absent
with_items:
- '/ocp/install'
- '/var/www/html/ignition'
- '/var/www/html/rhcos'
- name: create dirs
file:
path: "{{ item }}"
state: directory
with_items:
- '/ocp/install'
- '/ocp/install/bkup'
- '/ocp/install/bkup/manifests'
- '/var/www/html'
- '/var/www/html/ignition'
- '/var/www/html/rhcos'
- name: copy install-config
template:
src: '{{ templates_dir }}/ocp/install/install-config.yml.j2'
dest: '/ocp/install/install-config.yaml'
- name: backup install-config
copy:
src: /ocp/install/install-config.yaml
dest: /ocp/install/bkup/install-config.yaml
remote_src: yes
- name: Create manifests
shell: /ocp/openshift-install create manifests --dir=/ocp/install --log-level=debug
- name: Backup manifests
shell: 'cp -r /ocp/install/manifests /ocp/install/bkup'
- name: Backup crds
shell: 'cp -r /ocp/install/openshift /ocp/install/bkup'
- name: Create Ignitions
shell: /ocp/openshift-install create ignition-configs --dir=/ocp/install --log-level=debug
- name: copy ignitions
shell: cp -r /ocp/install/*.ign /var/www/html/ignition/
- name: restorecon
shell: restorecon -vR /var/www/html/
- name: Change file ownership, group and permissions
file:
path: /var/www/html/ignition
mode: '0777'
recurse: yes
- name: copy metal
copy:
src: /ocp/downloads/metal.raw.gz
dest: /var/www/html/rhcos/metal.raw.gz
remote_src: yes