| | |
| | | containerized=false |
| | | openshift_disable_check="disk_availability,memory_availability,docker_image_availability" |
| | | |
| | | {% if container_runtime == "cri-o" %} |
| | | openshift_use_crio=True |
| | | openshift_crio_enable_docker_gc=True |
| | | {% endif %} |
| | | |
| | | # default project node selector |
| | | osm_default_node_selector='env=users' |
| | | openshift_hosted_infra_selector="env=infra" |
| | |
| | | [nodes] |
| | | ## These are the masters |
| | | {% for host in groups['masters'] %} |
| | | {{ hostvars[host].internaldns }} openshift_hostname={{ hostvars[host].internaldns }} openshift_node_labels="{'logging':'true','openshift_schedulable':'False','cluster': '{{guid}}', 'zone': '{{hostvars[host]['placement']}}'}" |
| | | {{ hostvars[host].internaldns }} openshift_hostname={{ hostvars[host].internaldns }} openshift_node_labels="{'logging':'true','openshift_schedulable':'False','cluster': '{{guid}}', 'zone': '{{hostvars[host]['placement']}}', 'runtime': '{{container_runtime}}'}" |
| | | {% endfor %} |
| | | |
| | | ## These are infranodes |
| | | {% for host in groups['infranodes'] %} |
| | | {{ hostvars[host].internaldns }} openshift_hostname={{ hostvars[host].internaldns }} openshift_node_labels="{'logging':'true','cluster': '{{guid}}', 'env':'infra', 'zone': '{{hostvars[host]['placement']}}'}" |
| | | {{ hostvars[host].internaldns }} openshift_hostname={{ hostvars[host].internaldns }} openshift_node_labels="{'logging':'true','cluster': '{{guid}}', 'env':'infra', 'zone': '{{hostvars[host]['placement']}}', 'runtime': '{{container_runtime}}'}" |
| | | {% endfor %} |
| | | |
| | | ## These are regular nodes |
| | |
| | | if host not in groups['newnodes']|d([]) |
| | | and host not in groups['glusterfs']|d([]) |
| | | %} |
| | | {{ hostvars[host].internaldns }} openshift_hostname={{ hostvars[host].internaldns }} openshift_node_labels="{'logging':'true','cluster': '{{guid}}', 'env':'users', 'zone': '{{hostvars[host]['placement']}}'}" |
| | | {{ hostvars[host].internaldns }} openshift_hostname={{ hostvars[host].internaldns }} openshift_node_labels="{'logging':'true','cluster': '{{guid}}', 'env':'users', 'zone': '{{hostvars[host]['placement']}}', 'runtime': '{{container_runtime}}'}" |
| | | {% endfor %} |
| | | |
| | | {% if groups['glusterfs']|d([])|length > 0 %} |
| | | ## These are glusterfs nodes |
| | | {% for host in groups['glusterfs'] %} |
| | | {{ hostvars[host].internaldns }} openshift_hostname={{ hostvars[host].internaldns }} openshift_node_labels="{'logging':'true','cluster': '{{guid}}', 'env':'glusterfs', 'zone': '{{hostvars[host]['placement']}}'}" |
| | | {{ hostvars[host].internaldns }} openshift_hostname={{ hostvars[host].internaldns }} openshift_node_labels="{'logging':'true','cluster': '{{guid}}', 'env':'glusterfs', 'zone': '{{hostvars[host]['placement']}}', 'runtime': '{{container_runtime}}'}" |
| | | {% endfor %} |
| | | {% endif %} |
| | | |
| | |
| | | # https://docs.openshift.com/container-platform/3.7/install_config/adding_hosts_to_existing_cluster.html |
| | | [new_nodes] |
| | | {% for host in groups['newnodes'] %} |
| | | {{ hostvars[host].internaldns }} openshift_hostname={{ hostvars[host].internaldns }} ansible_ssh_user={{remote_user}} ansible_ssh_private_key_file=~/.ssh/{{key_name}}.pem openshift_node_labels="{'logging':'true','cluster': '{{guid}}', 'env':'users', 'zone': '{{hostvars[host]['placement']}}'}" |
| | | {{ hostvars[host].internaldns }} openshift_hostname={{ hostvars[host].internaldns }} ansible_ssh_user={{remote_user}} ansible_ssh_private_key_file=~/.ssh/{{key_name}}.pem openshift_node_labels="{'logging':'true','cluster': '{{guid}}', 'env':'users', 'zone': '{{hostvars[host]['placement']}}', 'runtime': '{{container_runtime}}'}" |
| | | {% endfor %} |
| | | {% endif %} |
| | | |