diff options
author | Jason DeTiberus <detiber@gmail.com> | 2016-05-26 15:10:32 -0400 |
---|---|---|
committer | Jason DeTiberus <detiber@gmail.com> | 2016-05-26 15:10:32 -0400 |
commit | dc0d59545efd2e3cc4c7eedbc1e008fa6b382e6d (patch) | |
tree | b178da6d218a31ace7a8591b8e8f03f4431edf88 /roles/openshift_facts | |
parent | 643b9b30066f0130f35e9ce7b1a8a7c24a244cc7 (diff) | |
parent | 2eadb105d5d55c0c283bec33cd2c33bca1b5361a (diff) | |
download | openshift-dc0d59545efd2e3cc4c7eedbc1e008fa6b382e6d.tar.gz openshift-dc0d59545efd2e3cc4c7eedbc1e008fa6b382e6d.tar.bz2 openshift-dc0d59545efd2e3cc4c7eedbc1e008fa6b382e6d.tar.xz openshift-dc0d59545efd2e3cc4c7eedbc1e008fa6b382e6d.zip |
Merge pull request #1672 from jstuever/os_clocks
Add openshift_clock role
Diffstat (limited to 'roles/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) |