diff options
author | OpenShift Bot <eparis+openshiftbot@redhat.com> | 2017-09-01 14:59:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-01 14:59:07 -0400 |
commit | b2ccb858cb675d7a30179d1a60e638e9e311a4d5 (patch) | |
tree | e88de80e0c38c1a53f760953d8c418f9278c2a4a /roles/openshift_clock/tasks | |
parent | 2fdd7892232de00431601b817d428742e05efdf2 (diff) | |
parent | 6dde91d9347a650df355bb7fe1edb746ebae2817 (diff) | |
download | openshift-b2ccb858cb675d7a30179d1a60e638e9e311a4d5.tar.gz openshift-b2ccb858cb675d7a30179d1a60e638e9e311a4d5.tar.bz2 openshift-b2ccb858cb675d7a30179d1a60e638e9e311a4d5.tar.xz openshift-b2ccb858cb675d7a30179d1a60e638e9e311a4d5.zip |
Merge pull request #5260 from mgugino-upstream-stage/remove-clock-from-openshift-facts
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_clock/tasks')
-rw-r--r-- | roles/openshift_clock/tasks/main.yaml | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/roles/openshift_clock/tasks/main.yaml b/roles/openshift_clock/tasks/main.yaml index 3911201ea..f8b02524a 100644 --- a/roles/openshift_clock/tasks/main.yaml +++ b/roles/openshift_clock/tasks/main.yaml @@ -1,14 +1,15 @@ --- -- name: Set clock facts - openshift_facts: - role: clock - local_facts: - enabled: "{{ openshift_clock_enabled | default(None) }}" +- name: Determine if chrony is installed + command: rpm -q chrony + failed_when: false + register: chrony_installed - name: Install ntp package package: name=ntp state=present - when: openshift.clock.enabled | bool and not openshift.clock.chrony_installed | bool + when: + - openshift_clock_enabled | bool + - chrony_installed.rc != 0 - name: Start and enable ntpd/chronyd - shell: timedatectl set-ntp true - when: openshift.clock.enabled | bool + command: timedatectl set-ntp true + when: openshift_clock_enabled | bool |