additional_config.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ---
  2. - name: create additional node network plugin groups
  3. hosts: "{{ openshift_node_scale_up_group | default('oo_nodes_to_config') }}"
  4. tasks:
  5. # Creating these node groups will prevent a ton of skipped tasks.
  6. # Create group for flannel nodes
  7. - group_by:
  8. key: oo_nodes_use_{{ (openshift_use_flannel | default(False)) | ternary('flannel','nothing') }}
  9. changed_when: False
  10. # Create group for calico nodes
  11. - group_by:
  12. key: oo_nodes_use_{{ (openshift_use_calico | default(False)) | ternary('calico','nothing') }}
  13. changed_when: False
  14. # Create group for nuage nodes
  15. - group_by:
  16. key: oo_nodes_use_{{ (openshift_use_nuage | default(False)) | ternary('nuage','nothing') }}
  17. changed_when: False
  18. # Create group for contiv nodes
  19. - group_by:
  20. key: oo_nodes_use_{{ (openshift_use_contiv | default(False)) | ternary('contiv','nothing') }}
  21. changed_when: False
  22. # Create group for kuryr nodes
  23. - group_by:
  24. key: oo_nodes_use_{{ (openshift_use_kuryr | default(False)) | ternary('kuryr','nothing') }}
  25. changed_when: False
  26. - import_playbook: etcd_client_config.yml
  27. vars:
  28. openshift_node_scale_up_group: "oo_nodes_use_flannel:oo_nodes_use_calico:oo_nodes_use_contiv:oo_nodes_use_kuryr"
  29. - name: Additional node config
  30. hosts: oo_nodes_use_flannel
  31. roles:
  32. - role: flannel
  33. etcd_urls: "{{ hostvars[groups.oo_first_master.0].openshift_master_etcd_urls }}"
  34. when: openshift_use_flannel | default(false) | bool
  35. - name: Additional node config
  36. hosts: oo_nodes_use_calico
  37. roles:
  38. - role: calico
  39. when: openshift_use_calico | default(false) | bool
  40. - name: Additional node config
  41. hosts: oo_nodes_use_nuage
  42. roles:
  43. - role: nuage_node
  44. when: openshift_use_nuage | default(false) | bool
  45. - name: Configure Contiv masters
  46. hosts: oo_masters_to_config
  47. roles:
  48. - role: contiv
  49. contiv_master: true
  50. when: openshift_use_contiv | default(false) | bool
  51. - name: Configure rest of Contiv nodes
  52. hosts: "{{ groups.oo_nodes_use_contiv | default([]) | difference(groups.oo_masters_to_config) }}"
  53. roles:
  54. - role: contiv
  55. when: openshift_use_contiv | default(false) | bool
  56. - name: Configure Kuryr node
  57. hosts: oo_nodes_use_kuryr
  58. tasks:
  59. - import_role:
  60. name: kuryr
  61. tasks_from: node
  62. when: openshift_use_kuryr | default(false) | bool