3 changed files with 52 additions and 0 deletions
@ -0,0 +1 @@ |
|||
# BLA BLA BLA |
|||
@ -0,0 +1,27 @@ |
|||
[masters] |
|||
ose3-master[1:3].test.example.com |
|||
|
|||
[etcd] |
|||
ose3-master[1:3].test.example.com |
|||
|
|||
[nodes] |
|||
ose3-master[1:3].test.example.com |
|||
ose3-infra[1:2].test.example.com openshift_node_labels="{'region': 'infra', 'zone': 'default'}" |
|||
ose3-node[1:2].test.example.com openshift_node_labels="{'region': 'primary', 'zone': 'default'}" |
|||
|
|||
[nfs] |
|||
ose3-master1.test.example.com |
|||
|
|||
[lb] |
|||
ose3-lb.test.example.com |
|||
|
|||
# Create an OSEv3 group that contains the masters and nodes groups |
|||
[OSEv3:children] |
|||
masters |
|||
nodes |
|||
etcd |
|||
lb |
|||
nfs |
|||
|
|||
[OSEv3:vars] |
|||
# BLA BLA BLA |
|||
@ -0,0 +1,24 @@ |
|||
- hosts: localhost |
|||
tasks: |
|||
- name: Add conf haproxy for infra node |
|||
blockinfile: |
|||
path: '{{ playbook_dir }}/haproxy.cfg' |
|||
marker: "# {mark} Add haproxy conf" |
|||
insertafter: "EOF" |
|||
content: | |
|||
frontend atomic-openshift-web |
|||
bind *:80 |
|||
bind *:443 |
|||
default_backend atomic-openshift-web |
|||
mode tcp |
|||
option tcplog |
|||
|
|||
backend atomic-openshift-web |
|||
balance source |
|||
mode tcp |
|||
{% for item in groups['nodes'] -%} |
|||
{%- set node_labels = hostvars[item]['openshift_node_labels']|default({}) -%} |
|||
{%- if 'region' in node_labels and node_labels['region'] == "infra" %} |
|||
server {{ hostvars[item]['inventory_hostname_short'] }} {{ hostvars[item]['inventory_hostname'] }} |
|||
{% endif -%} |
|||
{%- endfor -%} |
|||
Loading…
Reference in new issue