Code Monkey home page Code Monkey logo

chef-cookbook-ntp's Introduction

chef-ntp

Description

Installs and configures ntp as a client or a server. Attributes are defined via the roles.

Requirements

Should work on any Red Hat-family or Debian-family Linux distribution.

Attributes

  • ntp[:is_server]

    • Boolean, should be true or false, defaults to false
  • ntp[:servers] (applies to NTP Servers and Clients)

    • Array, should be a list of upstream NTP public servers. The NTP protocol works best with at least 3 servers. The NTPD maximum is 7 upstream servers, any more than that and some of them will be ignored by the daemon.
  • ntp[:restrictions] (applies to NTP Servers only)

    • Array, should be a list of restrict lines to restrict access to NTP clients on your LAN.

USAGE

Use the roles to install as a ntp client or ntp server:

Set up the ntp attributes in a role. For example in a ntpclient.rb role applied to all nodes:

name "ntpclient"
default_attributes(
  "ntp" => {
    "servers" => ["time.nist.gov", "time-nw.nist.gov"]
  }
)

Then in an ntpserver.rb role that is applied to NTP servers:

name "ntpserver"
default_attributes(
  "ntp" => {
    "is_server" => "true",
    "servers" => [0.north-america.pool.ntp.org", "2.north-america.pool.ntp.org", "3.north-america.pool.ntp.org", "4.north-america.pool.ntp.org"]
    "restrictions" => ["10.0.0.0 mask 255.0.0.0 nomodify notrap"]
  }
)

chef-cookbook-ntp's People

Watchers

James Cloos avatar  avatar Guy avatar Jay avatar Kim Wikkerink avatar  avatar  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.