|
---
|
|
- name: check ntp installation on redhat
|
|
command: rpm -q ntp
|
|
args:
|
|
warn: no
|
|
register: ntp_pkg_query
|
|
ignore_errors: true
|
|
check_mode: no
|
|
changed_when: false
|
|
when:
|
|
- ansible_os_family == 'RedHat'
|
|
|
|
- name: install ntp on redhat
|
|
package:
|
|
name: ntp
|
|
state: present
|