blob: d9ccf87bc10b440f0721b89f63dbd885197686ca (
plain)
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
|
---
- fail:
msg: Flannel can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use flannel
when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_flannel | default(false) | bool
- fail:
msg: Nuage sdn can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use nuage
when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_nuage | default(false) | bool
- fail:
msg: Nuage sdn can not be used with flannel
when: openshift_use_flannel | default(false) | bool and openshift_use_nuage | default(false) | bool
- fail:
msg: Contiv can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use contiv
when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_contiv | default(false) | bool
- fail:
msg: Contiv can not be used with flannel
when: openshift_use_flannel | default(false) | bool and openshift_use_contiv | default(false) | bool
- fail:
msg: Contiv can not be used with nuage
when: openshift_use_nuage | default(false) | bool and openshift_use_contiv | default(false) | bool
- fail:
msg: Calico can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use Calico
when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_calico | default(false) | bool
- fail:
msg: Calico cannot currently be used with Flannel in Openshift. Set either openshift_use_calico or openshift_use_flannel, but not both
when: openshift_use_calico | default(false) | bool and openshift_use_flannel | default(false) | bool
- fail:
msg: openshift_hostname must be 64 characters or less
when: openshift_hostname is defined and openshift_hostname | length > 64
- name: Set common Cluster facts
openshift_facts:
role: common
local_facts:
install_examples: "{{ openshift_install_examples | default(True) }}"
use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}"
sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}"
use_flannel: "{{ openshift_use_flannel | default(None) }}"
use_calico: "{{openshift_use_calico | default(None) }}"
use_nuage: "{{ openshift_use_nuage | default(None) }}"
use_contiv: "{{ openshift_use_contiv | default(None) }}"
use_manageiq: "{{ openshift_use_manageiq | default(None) }}"
data_dir: "{{ openshift_data_dir | default(None) }}"
use_dnsmasq: "{{ openshift_use_dnsmasq | default(None) }}"
- name: Install the base package for versioning
package:
name: "{{ openshift.common.service_type }}{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }}"
state: present
when: not openshift.common.is_containerized | bool
- name: Set version facts
openshift_facts:
# For enterprise versions < 3.1 and origin versions < 1.1 we want to set the
# hostname by default.
- set_fact:
set_hostname_default: "{{ not openshift.common.version_gte_3_1_or_1_1 }}"
- name: Set hostname
command: >
hostnamectl set-hostname {{ openshift.common.hostname }}
when: openshift_set_hostname | default(set_hostname_default) | bool
|