ntp
is an ansible role which:
- installs ntp
- configures ntp
Using ansible-galaxy
:
$ ansible-galaxy install franklinkim.ntp
Using requirements.yml
:
- src: franklinkim.ntp
Using git
:
$ git clone https://github.com/weareinteractive/ansible-ntp.git franklinkim.ntp
- Ansible 1.9
Here is a list of all the default variables for this role, which are also available in defaults/main.yml
.
# package name (version)
ntp_package: ntp
# list of server
ntp_servers:
- 0.ubuntu.pool.ntp.org
- 1.ubuntu.pool.ntp.org
- 2.ubuntu.pool.ntp.org
- 3.ubuntu.pool.ntp.org
- ntp.ubuntu.com
# list of peer hosts (typically on the same network)
ntp_peers: []
# start on boot
ntp_service_enabled: yes
# current state: started, stopped
ntp_service_state: started
# drift file
ntp_driftfile: /var/lib/ntp/ntp.drift
# stats dir
ntp_statsdir: /var/log/ntpstats/
These are the handlers that are defined in handlers/main.yml
.
restart ntp
- host: all
roles:
- franklinkim.ntp
vars:
ntp_servers:
- 0.de.pool.ntp.org
- 1.de.pool.ntp.org
- 3.de.pool.ntp.org
- 4.de.pool.ntp.org
$ git clone https://github.com/weareinteractive/ansible-ntp.git
$ cd ansible-ntp
$ vagrant up
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests and examples for any new or changed functionality.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Copyright (c) We Are Interactive under the MIT license.