This repository has been archived by the owner on Jul 7, 2021. It is now read-only.
forked from bennojoy/ntp
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rene Moser
committed
Sep 15, 2014
1 parent
c54c9fd
commit 9c2aae0
Showing
5 changed files
with
31 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
--- | ||
ntp_pkg_state: installed | ||
ntp_service_state: started | ||
ntp_service_enabled: yes | ||
ntp_pkg_state: 'installed' | ||
ntp_service_state: 'started' | ||
ntp_service_enabled: 'yes' | ||
|
||
ntp_config_server: [0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org, 3.pool.ntp.org] | ||
ntp_config_server: [ '0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org' ] | ||
ntp_config_restrict: | ||
- "-4 default kod notrap nomodify nopeer noquery" | ||
- "-6 default kod notrap nomodify nopeer noquery" | ||
- "127.0.0.1" | ||
- "::1" | ||
- '-4 default kod notrap nomodify nopeer noquery' | ||
- '-6 default kod notrap nomodify nopeer noquery' | ||
- '127.0.0.1' | ||
- '::1' | ||
|
||
ntp_config_listen: | ||
- 127.0.0.1 | ||
- '127.0.0.1' | ||
|
||
ntp_config_filegen: | ||
- "loopstats file loopstats type day enable" | ||
- "peerstats file peerstats type day enable" | ||
- "clockstats file clockstats type day enable" | ||
- 'loopstats file loopstats type day enable' | ||
- 'peerstats file peerstats type day enable' | ||
- 'clockstats file clockstats type day enable' | ||
|
||
ntp_config_statistics: "loopstats peerstats clockstats" | ||
|
||
ntp_config_crypto: no | ||
ntp_config_includefile: no | ||
ntp_config_keys: no | ||
ntp_config_trustedkey: no | ||
ntp_config_requestkey: no | ||
ntp_config_controlkey: no | ||
ntp_config_broadcast: no | ||
ntp_config_broadcastclient: no | ||
ntp_config_multicastclient: no | ||
ntp_config_statistics: 'loopstats peerstats clockstats' | ||
ntp_config_crypto: 'no' | ||
ntp_config_includefile: 'no' | ||
ntp_config_keys: 'no' | ||
ntp_config_trustedkey: 'no' | ||
ntp_config_requestkey: 'no' | ||
ntp_config_controlkey: 'no' | ||
ntp_config_broadcast: 'no' | ||
ntp_config_broadcastclient: 'no' | ||
ntp_config_multicastclient: 'no' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
--- | ||
- name: Add the OS specific variables | ||
include_vars: "{{ ansible_os_family }}.yml" | ||
tags: ["configuration","packages","service","ntp"] | ||
include_vars: '{{ ansible_os_family }}.yml' | ||
tags: [ 'configuration', 'package', 'service', 'ntp' ] | ||
|
||
- name: Install the required packages in Redhat derivatives | ||
yum: name={{ item }} state={{ ntp_pkg_state }} | ||
with_items: ntp_pkgs | ||
yum: name=ntp state={{ ntp_pkg_state }} | ||
when: ansible_os_family == 'RedHat' | ||
tags: ["packages","ntp"] | ||
tags: [ 'package', 'ntp' ] | ||
|
||
- name: Install the required packages in Debian derivatives | ||
apt: name={{ item }} state={{ ntp_pkg_state }} | ||
with_items: ntp_pkgs | ||
apt: name=ntp state={{ ntp_pkg_state }} | ||
when: ansible_os_family == 'Debian' | ||
tags: ["packages","ntp"] | ||
tags: [ 'package', 'ntp' ] | ||
|
||
- name: Copy the ntp.conf template file | ||
template: src=ntp.conf.j2 dest=/etc/ntp.conf | ||
notify: | ||
- restart ntp | ||
tags: ["configuration","packages","ntp"] | ||
tags: [ 'configuration', 'package', 'ntp' ] | ||
|
||
- name: Start/stop ntp service | ||
service: name={{ ntp_service_name }} state={{ ntp_service_state }} enabled={{ ntp_service_enabled }} pattern="/ntpd" | ||
tags: ["service","ntp"] | ||
service: name={{ ntp_service_name }} state={{ ntp_service_state }} enabled={{ ntp_service_enabled }} pattern='/ntpd' | ||
tags: [ 'service', 'ntp' ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
--- | ||
ntp_pkgs: | ||
- ntp | ||
|
||
ntp_service_name: ntp | ||
ntp_config_driftfile: /var/lib/ntp/ntp.drift | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
--- | ||
ntp_pkgs: | ||
- ntp | ||
|
||
ntp_service_name: ntpd | ||
ntp_config_driftfile: /var/lib/ntp/drift |
This file was deleted.
Oops, something went wrong.