Skip to content
Snippets Groups Projects
Commit 264d1610 authored by Chris Hines's avatar Chris Hines
Browse files

start ntpd by default

parent c7b1c722
No related branches found
No related tags found
1 merge request!116start ntpd by default
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
with_items: with_items:
- ntp - ntp
- ntpdate - ntpdate
sudo: true become: true
become_user: root
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
- name: "Installing ntp packages apt" - name: "Installing ntp packages apt"
...@@ -11,12 +12,20 @@ ...@@ -11,12 +12,20 @@
with_items: with_items:
- ntp - ntp
- ntpdate - ntpdate
sudo: true become: true
become_user: root
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
- name: "ntp time sync" - name: "ntp time sync"
shell: ntpdate -u {{ ntp_server }} shell: ntpdate -u {{ ntp_server }}
args: args:
creates: /etc/ntp.conf creates: /etc/ntp.conf
sudo: true become: true
become_user: root
notify: restart ntpd notify: restart ntpd
- name: "enable ntp"
service: name=ntpd enabled=yes state=started
become: true
become_user: root
when: ansible_os_family == 'RedHat'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment