This repository has been archived by the owner on Nov 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
/
pre-install.yml
85 lines (81 loc) · 2.6 KB
/
pre-install.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
---
###############################
# OpenShift Pre-Requisites
# Ensure the 'docker_storage_block_device' is correctly populated for all nodes
# if not yet defined
- hosts: nodes
tasks:
- set_fact:
docker_storage_block_device: "{{ hostvars['localhost'].docker_storage_block_device }}"
when: docker_storage_block_device is undefined
#
# - subscribe hosts
# - prepare docker
# - other prep (install additional packages, etc.)
#
- hosts: OSEv3
pre_tasks:
- import_tasks: prep-inventory.yml
tasks:
- import_role:
name: ../../galaxy/infra-ansible/roles/rhsm
vars:
ansible_become: True
when:
- rhsm_register
- import_role:
name: ../../galaxy/infra-ansible/roles/manage-server-ca-cert
# NOTE: This shall be before the container storage, so the next step
# can use all the remaining storage.
- import_role:
name: ../../galaxy/infra-ansible/roles/config-lvm
vars:
ansible_become: True
when: lvm_entries is defined
# NOTE: this "openstack" role is generic and can be used across all cloud
# providers. We should work with the `openshift-ansible` team to get
# this corrected - i.e.: made generic.
- import_role:
name: container-storage-setup
vars:
ansible_become: True
- import_role:
name: ../../galaxy/infra-ansible/roles/config-versionlock
vars:
ansible_become: True
when:
- versionlock_packages is defined
- import_role:
name: ../../galaxy/infra-ansible/roles/config-packages
vars:
ansible_become: True
- import_role:
name: ../../galaxy/infra-ansible/roles/config-selinux
vars:
ansible_become: True
target_state: enforcing
- import_role:
name: ../../galaxy/infra-ansible/roles/update-host
tasks_from: update-host
vars:
ansible_become: True
pkg_update: "{{ update_cluster_hosts | default('True') }}"
- import_role:
name: ../../galaxy/infra-ansible/roles/update-host
tasks_from: reboot-host
vars:
ansible_become: True
- import_role:
name: ../../galaxy/infra-ansible/roles/update-host
tasks_from: wait-for-host
- service:
name: docker
state: started
enabled: yes
# Ensure the CNS / glusterFS facts are correctly populated for all CNS nodes
- hosts: glusterfs
tasks:
- set_fact:
glusterfs_devices:
- "{{ hostvars['localhost'].cns_node_glusterfs_volume }}"
when: glusterfs_devices is not defined or (glusterfs_devices | default([]) | length == 0)