join_node.yml 1.9 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. tasks:
  10. - name: Evaluate oo_hosts_to_update
  11. add_host:
  12. name: "{{ node_ip }}"
  13. groups: oo_hosts_to_update
  14. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
  15. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  16. - include: ../../common/openshift-cluster/update_repos_and_packages.yml
  17. - name: Populate oo_masters_to_config host group
  18. hosts: localhost
  19. connection: local
  20. become: no
  21. gather_facts: no
  22. vars_files:
  23. - vars.yml
  24. tasks:
  25. - name: Evaluate oo_nodes_to_config
  26. add_host:
  27. name: "{{ node_ip }}"
  28. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
  29. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  30. groups: oo_nodes_to_config
  31. - name: Evaluate oo_first_master
  32. add_host:
  33. name: "{{ groups['tag_env-host-type-' ~ cluster_id ~ '-openshift-master'][0] }}"
  34. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
  35. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  36. groups: oo_first_master
  37. when: "'tag_env-host-type-{{ cluster_id }}-openshift-master' in groups"
  38. #- include: config.yml
  39. - include: ../../common/openshift-node/config.yml
  40. vars:
  41. openshift_cluster_id: "{{ cluster_id }}"
  42. openshift_debug_level: 4
  43. openshift_deployment_type: "{{ deployment_type }}"
  44. openshift_hostname: "{{ ansible_default_ipv4.address }}"
  45. openshift_use_openshift_sdn: true
  46. openshift_node_labels: "{{ lookup('oo_option', 'openshift_node_labels') }} "
  47. os_sdn_network_plugin_name: "redhat/openshift-ovs-subnet"
  48. osn_cluster_dns_domain: "{{ hostvars[groups.oo_first_master.0].openshift.dns.domain }}"
  49. osn_cluster_dns_ip: "{{ hostvars[groups.oo_first_master.0].cluster_dns_ip }}"