diff options
author | Scott Dodson <sdodson@redhat.com> | 2015-12-07 10:24:20 -0500 |
---|---|---|
committer | Scott Dodson <sdodson@redhat.com> | 2015-12-15 17:07:17 -0500 |
commit | afe0064e01d3f6f33f323ffea7aae0eaf00b9ac2 (patch) | |
tree | 1ab5236c3948197cb8976cac91305937f45bb727 /roles/openshift_facts/tasks | |
parent | 3f2be7d987ccef8c4e157163dd9394ba6492a88c (diff) | |
download | openshift-afe0064e01d3f6f33f323ffea7aae0eaf00b9ac2.tar.gz openshift-afe0064e01d3f6f33f323ffea7aae0eaf00b9ac2.tar.bz2 openshift-afe0064e01d3f6f33f323ffea7aae0eaf00b9ac2.tar.xz openshift-afe0064e01d3f6f33f323ffea7aae0eaf00b9ac2.zip |
Skip yum/dnf ops when is_containerized
Diffstat (limited to 'roles/openshift_facts/tasks')
-rw-r--r-- | roles/openshift_facts/tasks/main.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml index 55071436f..1d986f2e5 100644 --- a/roles/openshift_facts/tasks/main.yml +++ b/roles/openshift_facts/tasks/main.yml @@ -5,9 +5,22 @@ - ansible_version | version_compare('1.8.0', 'ge') - ansible_version | version_compare('1.9.0', 'ne') - ansible_version | version_compare('1.9.0.1', 'ne') + +- name: Detecting Operating System + shell: ls /run/ostree-booted + ignore_errors: yes + failed_when: false + register: ostree_output + +# Locally setup containerized facts for now +- set_fact: + l_is_atomic: "{{ ostree_output.rc == 0 }}" +- set_fact: + l_is_containerized: "{{ l_is_atomic or containerized | default(false) | bool }}" - name: Ensure PyYaml is installed action: "{{ ansible_pkg_mgr }} name=PyYAML state=present" + when: not l_is_atomic | bool - name: Gather Cluster facts and set is_containerized if needed openshift_facts: |