diff options
author | Jeremiah Stuever <jstuever@redhat.com> | 2016-03-18 16:45:47 -0400 |
---|---|---|
committer | Jeremiah Stuever <jstuever@redhat.com> | 2016-05-20 00:12:03 -0400 |
commit | a7bd843d566f1777a2705fc6e7ad7e4d397619e8 (patch) | |
tree | cff3a493b69bb700e60d031a77e7b42685ba2850 | |
parent | c78e91c7d4a304cc5d20135e96206008407c5f6f (diff) | |
download | openshift-a7bd843d566f1777a2705fc6e7ad7e4d397619e8.tar.gz openshift-a7bd843d566f1777a2705fc6e7ad7e4d397619e8.tar.bz2 openshift-a7bd843d566f1777a2705fc6e7ad7e4d397619e8.tar.xz openshift-a7bd843d566f1777a2705fc6e7ad7e4d397619e8.zip |
Allow clock role in openshift_facts
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index b13343776..6daaf6822 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -1549,6 +1549,7 @@ class OpenShiftFacts(object): OpenShiftFactsUnsupportedRoleError: """ known_roles = ['builddefaults', + 'clock', 'cloudprovider', 'common', 'docker', @@ -1719,6 +1720,16 @@ class OpenShiftFacts(object): docker['version'] = version_info['version'] defaults['docker'] = docker + if 'clock' in roles: + exit_code, _, _ = module.run_command(['rpm', '-q', 'chrony']) + if exit_code == 0: + chrony_installed = True + else: + chrony_installed = False + defaults['clock'] = dict( + enabled=True, + chrony_installed=chrony_installed) + if 'cloudprovider' in roles: defaults['cloudprovider'] = dict(kind=None) |