config.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ---
  2. # TODO: need to figure out a plan for setting hostname, currently the default
  3. # is localhost, so no hostname value (or public_hostname) value is getting
  4. # assigned
  5. - name: Populate oo_masters_to_config host group
  6. hosts: localhost
  7. gather_facts: no
  8. vars_files:
  9. - vars.yml
  10. tasks:
  11. - name: Evaluate oo_masters_to_config
  12. add_host:
  13. name: "{{ item }}"
  14. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
  15. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  16. groups: oo_masters_to_config
  17. with_items: groups["tag_env-host-type-{{ cluster_id }}-openshift-master"] | default([])
  18. - name: Evaluate oo_nodes_to_config
  19. add_host:
  20. name: "{{ item }}"
  21. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
  22. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  23. groups: oo_nodes_to_config
  24. with_items: groups["tag_env-host-type-{{ cluster_id }}-openshift-node"] | default([])
  25. - name: Evaluate oo_first_master
  26. add_host:
  27. name: "{{ groups['tag_env-host-type-' ~ cluster_id ~ '-openshift-master'][0] }}"
  28. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
  29. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  30. groups: oo_first_master
  31. when: "'tag_env-host-type-{{ cluster_id }}-openshift-master' in groups"
  32. - include: ../../common/openshift-cluster/config.yml
  33. vars:
  34. openshift_cluster_id: "{{ cluster_id }}"
  35. openshift_debug_level: 4
  36. openshift_deployment_type: "{{ deployment_type }}"
  37. openshift_first_master: "{{ groups.oo_first_master.0 }}"