diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2016-04-29 17:13:42 -0400 |
---|---|---|
committer | Jason DeTiberus <jdetiber@redhat.com> | 2016-04-30 00:57:45 -0400 |
commit | 64f5eecf5774fe2d97e60e301e73fe4eac0f65b5 (patch) | |
tree | 176cc945bbc5e3350850389240e87dc605a29972 /roles/openshift_facts/tasks | |
parent | 248717b07d00f9f19a4676ba03bedf85f58a0a6e (diff) | |
download | openshift-64f5eecf5774fe2d97e60e301e73fe4eac0f65b5.tar.gz openshift-64f5eecf5774fe2d97e60e301e73fe4eac0f65b5.tar.bz2 openshift-64f5eecf5774fe2d97e60e301e73fe4eac0f65b5.tar.xz openshift-64f5eecf5774fe2d97e60e301e73fe4eac0f65b5.zip |
use stat module instead of shell module and ls to check for rpm-ostree
Diffstat (limited to 'roles/openshift_facts/tasks')
-rw-r--r-- | roles/openshift_facts/tasks/main.yml | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml index 8077c0d97..ff726ae24 100644 --- a/roles/openshift_facts/tasks/main.yml +++ b/roles/openshift_facts/tasks/main.yml @@ -5,15 +5,13 @@ when: ansible_version.full | version_compare('1.9.4', 'lt') or ansible_version.full | version_compare('2.0', 'ge') - name: Detecting Operating System - shell: ls /run/ostree-booted - ignore_errors: yes - failed_when: false - changed_when: false - register: ostree_output + stat: + path: /run/ostree-booted + register: ostree_booted # Locally setup containerized facts for now - set_fact: - l_is_atomic: "{{ ostree_output.rc == 0 }}" + l_is_atomic: "{{ ostree_booted.stat.exists }}" - set_fact: l_is_containerized: "{{ (l_is_atomic | bool) or (containerized | default(false) | bool) }}" @@ -44,8 +42,8 @@ https_proxy: "{{ openshift_https_proxy | default(None) }}" no_proxy: "{{ openshift_no_proxy | default(None) }}" generate_no_proxy_hosts: "{{ openshift_generate_no_proxy_hosts | default(True) }}" - no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] - | union(groups['oo_masters_to_config']) - | union(groups['oo_etcd_to_config'] | default([]))) + no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] + | union(groups['oo_masters_to_config']) + | union(groups['oo_etcd_to_config'] | default([]))) | oo_collect('openshift.common.hostname') | default([]) | join (',') }}" |