main.yml 921 B

1234567891011121314151617181920212223242526272829
  1. ---
  2. - name: Verify Ansible version is greater than 1.8.0 and not 1.9.0 and not 1.9.0.1
  3. assert:
  4. that:
  5. - ansible_version | version_compare('1.8.0', 'ge')
  6. - ansible_version | version_compare('1.9.0', 'ne')
  7. - ansible_version | version_compare('1.9.0.1', 'ne')
  8. - name: Detecting Operating System
  9. shell: ls /run/ostree-booted
  10. ignore_errors: yes
  11. failed_when: false
  12. register: ostree_output
  13. # Locally setup containerized facts for now
  14. - set_fact:
  15. l_is_atomic: "{{ ostree_output.rc == 0 }}"
  16. - set_fact:
  17. l_is_containerized: "{{ l_is_atomic or containerized | default(false) | bool }}"
  18. - name: Ensure PyYaml is installed
  19. action: "{{ ansible_pkg_mgr }} name=PyYAML state=present"
  20. when: not l_is_atomic | bool
  21. - name: Gather Cluster facts and set is_containerized if needed
  22. openshift_facts:
  23. role: common
  24. local_facts:
  25. is_containerized: "{{ containerized | default(None) }}"