Giter Site home page Giter Site logo

ansible-role-ntp's Introduction

Ansible Role: NTP

CI

Installs NTP on Linux.

Requirements

None.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

ntp_enabled: true

Whether to start the ntpd service and enable it at system boot. On many virtual machines that run inside a container (like OpenVZ or VirtualBox), it's recommended you don't run the NTP daemon, since the host itself should be set to synchronize time for all its child VMs.

ntp_timezone: Etc/UTC

Set the timezone for your server.

ntp_package: ntp

The package to install which provides NTP functionality. The default is ntp for most platforms, or chrony on RHEL/CentOS 7 and later.

ntp_daemon: [various]

The default NTP daemon should be correct for your distribution, but there are some cases where you may want to override the default, e.g. if you're running ntp on newer versions of RHEL/CentOS.

ntp_config_file: /etc/ntp.conf

The path to the NTP configuration file. The default is /etc/ntp.conf for most platforms, or /etc/chrony.conf on RHEL/CentOS 7 and later.

ntp_manage_config: false

Set to true to allow this role to manage the NTP configuration file (/etc/ntp.conf).

ntp_driftfile: [various]

The default NTP driftfile should be correct for your distribution, but there are some cases where you may want to override the default.

ntp_area: ''

Set the NTP Pool Area to use. Defaults to none, which uses the worldwide pool.

ntp_servers:
  - "0{{ '.' + ntp_area if ntp_area else '' }}.pool.ntp.org iburst"
  - "1{{ '.' + ntp_area if ntp_area else '' }}.pool.ntp.org iburst"
  - "2{{ '.' + ntp_area if ntp_area else '' }}.pool.ntp.org iburst"
  - "3{{ '.' + ntp_area if ntp_area else '' }}.pool.ntp.org iburst"

Specify the NTP servers you'd like to use. Only takes effect if you allow this role to manage NTP's configuration, by setting ntp_manage_config to True.

ntp_restrict:
  - "127.0.0.1"
  - "::1"

Restrict NTP access to these hosts; loopback only, by default.

ntp_cron_handler_enabled: false

Whether to restart the cron daemon after the timezone has changed.

ntp_tinker_panic: true

Enable tinker panic, which is useful when running NTP in a VM.

Dependencies

None.

Example Playbook

- hosts: all
  roles:
    - geerlingguy.ntp

Inside vars/main.yml:

ntp_timezone: America/Chicago

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

ansible-role-ntp's People

Contributors

adzhurinskij avatar alexgluck avatar dev-zero avatar dlerch-transporeon avatar dwerder avatar geerlingguy avatar giner avatar joebutler99 avatar juddtracy-das avatar kadecole avatar lazzurs avatar ogajduse avatar pritpal-sabharwal avatar selyx avatar smbambling avatar topiaruss avatar winggundamth avatar xescab avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.