summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@afrolegs.com>2016-05-02 10:13:09 -0400
committerAndrew Butcher <abutcher@afrolegs.com>2016-05-02 10:13:09 -0400
commitcb0a480826b67fe74eaf5fc806153eadd5f2e028 (patch)
tree176cc945bbc5e3350850389240e87dc605a29972
parent248717b07d00f9f19a4676ba03bedf85f58a0a6e (diff)
parent64f5eecf5774fe2d97e60e301e73fe4eac0f65b5 (diff)
downloadopenshift-cb0a480826b67fe74eaf5fc806153eadd5f2e028.tar.gz
openshift-cb0a480826b67fe74eaf5fc806153eadd5f2e028.tar.bz2
openshift-cb0a480826b67fe74eaf5fc806153eadd5f2e028.tar.xz
openshift-cb0a480826b67fe74eaf5fc806153eadd5f2e028.zip
Merge pull request #1848 from detiber/stat
use stat module instead of shell module and ls to check for rpm-ostree
-rw-r--r--roles/openshift_facts/tasks/main.yml16
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 (',')
}}"