config.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ---
  2. # TODO: fix firewall related bug with GCE and origin, since GCE is overriding
  3. # /etc/sysconfig/iptables
  4. - name: Populate oo_masters_to_config host group
  5. hosts: localhost
  6. gather_facts: no
  7. vars_files:
  8. - vars.yml
  9. tasks:
  10. - name: Evaluate oo_masters_to_config
  11. add_host:
  12. name: "{{ item }}"
  13. groups: oo_masters_to_config
  14. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
  15. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  16. with_items: groups["tag_env-host-type-{{ cluster_id }}-openshift-master"] | default([])
  17. - name: Evaluate oo_nodes_to_config
  18. add_host:
  19. name: "{{ item }}"
  20. groups: oo_nodes_to_config
  21. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
  22. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  23. with_items: groups["tag_env-host-type-{{ cluster_id }}-openshift-node"] | default([])
  24. - name: Evaluate oo_first_master
  25. add_host:
  26. name: "{{ groups['tag_env-host-type-' ~ cluster_id ~ '-openshift-master'][0] }}"
  27. groups: oo_first_master
  28. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
  29. ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
  30. when: "'tag_env-host-type-{{ cluster_id }}-openshift-master' in groups"
  31. - include: ../../common/openshift-cluster/config.yml
  32. vars:
  33. openshift_cluster_id: "{{ cluster_id }}"
  34. openshift_debug_level: 4
  35. openshift_deployment_type: "{{ deployment_type }}"
  36. openshift_first_master: "{{ groups.oo_first_master.0 }}"
  37. openshift_hostname: "{{ gce_private_ip }}"