Erik M Jacobs
2018-11-08 aa20d8eb63bcf55642ff6922725bc89ca53609af
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#
# /etc/ansible/hosts file for OpenShift Container Platform 3.11.16
#
 
[OSEv3:vars]
 
###########################################################################
### Ansible Vars
###########################################################################
timeout=60
ansible_user={{ansible_ssh_user}}
ansible_become=yes
log_path=/root
 
###########################################################################
### OpenShift Basic Vars
###########################################################################
 
openshift_deployment_type=openshift-enterprise
 
openshift_disable_check="disk_availability,memory_availability,docker_image_availability"
 
openshift_image_tag=v{{ osrelease }}
openshift_pgk_version=v{{ osrelease }}
openshift_release={{ osrelease }}
 
{% if container_runtime == "cri-o" %}
openshift_use_crio=True
openshift_crio_enable_docker_gc=True
openshift_crio_docker_gc_node_selector={'runtime': 'cri-o'}
{% endif %}
 
openshift_node_groups=[{'name': 'node-config-all-in-one', 'labels': ['node-role.kubernetes.io/master=true', 'node-role.kubernetes.io/infra=true', 'node-role.kubernetes.io/compute=true']}]
 
# Configure logrotate scripts
# See: https://github.com/nickhammond/ansible-logrotate
logrotate_scripts=[{"name": "syslog", "path": "/var/log/cron\n/var/log/maillog\n/var/log/messages\n/var/log/secure\n/var/log/spooler\n", "options": ["daily", "rotate 7","size 500M", "compress", "sharedscripts", "missingok"], "scripts": {"postrotate": "/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true"}}]
 
# Deploy Operator Lifecycle Management Tech Preview
openshift_enable_olm=false
##########################################################################
### OpenShift Registries Locations
###########################################################################
 
oreg_url=registry.redhat.io/openshift3/ose-${component}:${version}
oreg_auth_user={{ redhat_registry_user }}
oreg_auth_password={{ redhat_registry_password }}
 
# For Operator Framework Images
openshift_additional_registry_credentials=[{'host':'registry.connect.redhat.com','user':'{{ redhat_registry_user}}','password':'{{ redhat_registry_password }}','test_image':'mongodb/enterprise-operator:0.3.2'}]
 
openshift_examples_modify_imagestreams=true
 
#{% if install_glusterfs|bool %}
############################################################################
#### OpenShift Container Storage
############################################################################
#
#openshift_master_dynamic_provisioning_enabled=false
#
## CNS storage cluster
## From https://github.com/red-hat-storage/openshift-cic
#openshift_storage_glusterfs_namespace=openshift-storage
#openshift_storage_glusterfs_storageclass=true
#openshift_storage_glusterfs_storageclass_default=true
#
#openshift_storage_glusterfs_block_deploy=true
#openshift_storage_glusterfs_block_host_vol_create=true
#openshift_storage_glusterfs_block_host_vol_size=200
#openshift_storage_glusterfs_block_storageclass=true
#openshift_storage_glusterfs_block_storageclass_default=false
#
## Container image to use for glusterfs pods
#openshift_storage_glusterfs_image="registry.access.redhat.com/rhgs3/rhgs-server-rhel7:{{ glusterfs_image_tag }}"
#
## Container image to use for glusterblock-provisioner pod
#openshift_storage_glusterfs_block_image="registry.access.redhat.com/rhgs3/rhgs-gluster-block-prov-rhel7:{{ glusterfs_image_tag }}"
#
## Container image to use for heketi pods
#openshift_storage_glusterfs_heketi_image="registry.access.redhat.com/rhgs3/rhgs-volmanager-rhel7:{{ glusterfs_image_tag }}"
#{% endif %}
 
#{% if install_nfs|bool %}
## Set this line to enable NFS
#openshift_enable_unsupported_configurations=True
#{% endif %}
 
###########################################################################
### OpenShift Cockpit Vars
###########################################################################
 
# Enable cockpit
osm_use_cockpit=false
osm_cockpit_plugins=['cockpit-kubernetes']
 
###########################################################################
### OpenShift Master Vars
###########################################################################
 
openshift_master_api_port={{master_api_port}}
openshift_master_console_port={{master_api_port}}
 
openshift_master_cluster_method=native
openshift_master_cluster_hostname={{master_lb_dns}}
openshift_master_cluster_public_hostname={{master_lb_dns}}
openshift_master_default_subdomain={{cloudapps_suffix}}
openshift_master_overwrite_named_certificates={{openshift_master_overwrite_named_certificates}}
 
{% if install_lets_encrypt_certificates|bool %}
openshift_master_named_certificates={{lets_encrypt_openshift_master_named_certificates|to_json}}
{% endif %}
 
openshift_set_hostname=True
openshift_clock_enabled=True
 
###########################################################################
### OpenShift Network Vars
###########################################################################
 
osm_cluster_network_cidr=10.1.0.0/16
openshift_portal_net=172.30.0.0/16
 
#os_sdn_network_plugin_name='redhat/openshift-ovs-multitenant'
{{multi_tenant_setting}}
 
###########################################################################
### OpenShift Authentication Vars
###########################################################################
 
{% if install_idm == "ldap" or 'ldap' in install_idms|d([]) %}
{{openshift_master_ldap_ca_file}}
{% endif %}
 
{% if install_idm == "htpasswd" or 'htpasswd' in install_idms|d([]) %}
openshift_master_htpasswd_file=/root/htpasswd.openshift
{% endif %}
 
openshift_master_identity_providers={{identity_providers|to_json}}
 
{% if admission_plugin_config is defined %}
###########################################################################
### OpenShift admission plugin config
###########################################################################
 
openshift_master_admission_plugin_config={{admission_plugin_config|to_json}}
{% endif %}
 
###########################################################################
### OpenShift Metrics and Logging Vars
###########################################################################
 
####################
# Prometheus Metrics
####################
 
openshift_cluster_monitoring_operator_install=false
 
#################
# Cluster metrics
#################
openshift_metrics_install_metrics={{install_metrics}}
 
#################
# Cluster logging
#################
openshift_logging_install_logging={{ install_logging }}
openshift_logging_install_eventrouter={{ install_logging }}
 
###########################################################################
### OpenShift Router and Registry Vars
###########################################################################
 
#openshift_hosted_router_replicas={{infranode_instance_count}}
 
{% if install_lets_encrypt_certificates|bool %}
openshift_hosted_router_certificate={{lets_encrypt_openshift_hosted_router_certificate|to_json}}
{% endif %}
 
{% if s3user_access_key is defined %}
# Registry AWS S3
# S3 bucket must already exist.
openshift_hosted_registry_storage_kind=object
openshift_hosted_registry_storage_provider=s3
openshift_hosted_registry_storage_s3_accesskey={{ s3user_access_key }}
openshift_hosted_registry_storage_s3_secretkey={{ s3user_secret_access_key }}
openshift_hosted_registry_storage_s3_bucket={{ project_tag }}
openshift_hosted_registry_storage_s3_region={{ aws_region_final|d(aws_region) }}
openshift_hosted_registry_storage_s3_chunksize=26214400
openshift_hosted_registry_storage_s3_rootdirectory=/registry
{% endif %}
openshift_hosted_registry_replicas=1
openshift_hosted_registry_pullthrough=true
openshift_hosted_registry_acceptschema2=true
openshift_hosted_registry_enforcequota=true
 
###########################################################################
### OpenShift Service Catalog Vars
###########################################################################
 
openshift_enable_service_catalog=false
 
template_service_broker_install=false
openshift_template_service_broker_namespaces=['openshift']
 
ansible_service_broker_install=false
ansible_service_broker_local_registry_whitelist=['.*-apb$']
 
###########################################################################
### OpenShift Hosts
###########################################################################
[OSEv3:children]
masters
etcd
nodes
 
[masters]
{% for host in groups['bastions'] %}
{{ hostvars[host].internaldns }} 
{% endfor %}
 
[etcd]
{% for host in groups['bastions'] %}
{{ hostvars[host].internaldns }} 
{% endfor %}
 
[nodes]
## These are the masters
{% for host in groups['bastions'] %}
{{ hostvars[host].internaldns }} host_zone={{hostvars[host]['placement']}} openshift_hostname={{ hostvars[host].internaldns }} openshift_node_group_name="node-config-all-in-one"
{% endfor %}