12345678910111213141516171819202122232425262728293031323334 |
- ---
- - name: Add node instances to node group
- add_host:
- name: "{{ hostvars[item].gce_name }}"
- groups: nodes, new_nodes
- openshift_node_group_name: "{{ openshift_gcp_node_group_mapping['compute'] }}"
- with_items: "{{ groups['tag_ocp-node'] | default([]) | difference(groups['tag_ocp-bootstrap'] | default([])) }}"
- - name: Add bootstrap node instances as nodes
- add_host:
- name: "{{ item }}"
- groups: nodes, new_nodes
- with_items: "{{ groups['tag_ocp-bootstrap'] | default([]) }}"
- when: all_nodes | default(False)
- - name: Add non-bootstrapping master node instances to node group
- add_host:
- name: "{{ hostvars[item].gce_name }}"
- groups: nodes
- with_items: "{{ groups['tag_ocp-master'] | default([]) | difference(groups['tag_ocp-bootstrap'] | default([])) }}"
- - name: Add infra node instances to node group
- add_host:
- name: "{{ hostvars[item].gce_name }}"
- groups: nodes, new_nodes
- openshift_node_group_name: "{{ openshift_gcp_node_group_mapping['infra'] }}"
- with_items: "{{ groups['tag_ocp-infra-node'] | default([]) | difference(groups['tag_ocp-bootstrap'] | default([])) }}"
- - name: Add masters to requisite groups
- add_host:
- name: "{{ hostvars[item].gce_name }}"
- groups: masters, etcd
- openshift_node_group_name: "{{ openshift_gcp_node_group_mapping['masters'] }}"
- with_items: "{{ groups['tag_ocp-master'] }}"
|