join_node.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ---
  2. - name: Populate oo_hosts_to_update group
  3. hosts: localhost
  4. connection: local
  5. become: no
  6. gather_facts: no
  7. vars_files:
  8. - vars.yml
  9. - cluster_hosts.yml
  10. tasks:
  11. - name: Evaluate oo_hosts_to_update
  12. add_host:
  13. name: "{{ node_ip }}"
  14. groups: oo_hosts_to_update
  15. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
  16. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  17. - include: ../../common/openshift-cluster/update_repos_and_packages.yml
  18. - name: Populate oo_masters_to_config host group
  19. hosts: localhost
  20. connection: local
  21. become: no
  22. gather_facts: no
  23. vars_files:
  24. - vars.yml
  25. - cluster_hosts.yml
  26. tasks:
  27. - name: Evaluate oo_nodes_to_config
  28. add_host:
  29. name: "{{ node_ip }}"
  30. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
  31. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  32. groups: oo_nodes_to_config
  33. - name: Evaluate oo_first_master
  34. add_host:
  35. name: "{{ master_hosts | first }}"
  36. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
  37. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  38. groups: oo_first_master
  39. when: master_hosts is defined and master_hosts|length > 0
  40. #- include: config.yml
  41. - include: ../../common/openshift-node/config.yml
  42. vars:
  43. openshift_cluster_id: "{{ cluster_id }}"
  44. openshift_debug_level: 4
  45. openshift_deployment_type: "{{ deployment_type }}"
  46. openshift_hostname: "{{ ansible_default_ipv4.address }}"
  47. openshift_use_openshift_sdn: true
  48. openshift_node_labels: "{{ lookup('oo_option', 'openshift_node_labels') }} "
  49. os_sdn_network_plugin_name: "redhat/openshift-ovs-subnet"