initialize_openshift_version.yml 1007 B

123456789101112131415161718192021222324252627
  1. ---
  2. # NOTE: requires openshift_facts be run
  3. - name: Determine openshift_version to configure on first master
  4. hosts: oo_first_master
  5. roles:
  6. - openshift_version
  7. pre_tasks:
  8. - debug: var=openshift_version
  9. post_tasks:
  10. - debug: var=openshift_version
  11. # NOTE: We set this even on etcd hosts as they may also later run as masters,
  12. # and we don't want to install wrong version of docker and have to downgrade
  13. # later.
  14. - name: Set openshift_version for all hosts
  15. hosts: oo_all_hosts
  16. tasks:
  17. - debug: var=hostvars[groups.oo_first_master.0].openshift_version
  18. - debug: var=openshift.common.version
  19. - debug: var=openshift_version
  20. - set_fact:
  21. openshift_version: "{{ openshift.common.version if openshift.common.version is defined else hostvars[groups.oo_first_master.0].openshift_version }}"
  22. when: inventory_hostname != groups.oo_first_master.0
  23. - debug: var=hostvars[groups.oo_first_master.0].openshift_version
  24. - debug: var=openshift.common.version
  25. - debug: var=openshift_version