Skip to content

Commit

Permalink
Merge pull request #28 from dustinblack/ntp
Browse files Browse the repository at this point in the history
Ntp
  • Loading branch information
dustinblack committed Mar 6, 2018
2 parents c16197f + a9cba36 commit b78b284
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
18 changes: 9 additions & 9 deletions ansible/g1-ntp.yml
@@ -1,32 +1,32 @@
- shell: /bin/bash -c 'echo "Configuring NTP..." > {{ fifo }}'
- shell: /bin/bash -c 'echo "Configuring chrony NTP..." > {{ fifo }}'

- name: Stop NTP Service
- name: Stop chronyd Service
service:
name: ntpd
name: chronyd
state: stopped

- name: Disable public NTP servers
replace:
dest: /etc/ntp.conf
dest: /etc/chrony.conf
regexp: '^(server.*)'
replace: '#\1'
when: update_ntp == True

- name: Add custom NTP servers
lineinfile:
dest: /etc/ntp.conf
dest: /etc/chrony.conf
insertafter: '^#server'
line: 'server {{ item }} iburst'
state: present
with_items: '{{ ntpServers }}'
when: update_ntp == True

- name: Start NTP Service
- name: Start chronyd Service
service:
name: ntpd
name: chronyd
state: started

- name: Enable NTP Service
- name: Enable chronyd Service
service:
name: ntpd
name: chronyd
enabled: yes
1 change: 0 additions & 1 deletion resources/kickstart/ks-g1-rhgs_3.3-kvm.cfg
Expand Up @@ -69,7 +69,6 @@ shutdown
chrony
kexec-tools
nfs-utils
ntp
vim
vim-enhanced
net-tools
Expand Down

0 comments on commit b78b284

Please sign in to comment.