Giter Site home page Giter Site logo

puppet-ntp's Introduction

puppet-ntp Build Status

Manage NTP client and server via Puppet

Supported Puppet versions

  • Puppet >= 4
  • Last version supporting Puppet 3: v2.5.0

Usage

Client

Using ntp pool mirrors

    class { 'ntp': }

Using custom ntp mirrors

    class { 'ntp':
        server_list => [ 'yourLocalServer1', 'yourLocalServer2', ]
    }

Server

Using ntp pool mirrors

    class { 'ntp':
        server_enabled => true,
    }

Using custom ntp mirrors

    class { 'ntp':
        server_list = [ 'yourLocalServer1', 'yourLocalServer2', ],
        server_enabled => true,
}

If you want some clients with unlimited access, you can set $query_networks in the follwing way:

    class { 'ntp':
        server_list = [ 'yourLocalServer1', 'yourLocalServer2', ],
        server_enabled = true,
        query_networks = [ '192.168.0.0/255.255.255.0', '172.16.0.0/255.255.0.0', ],
    }

Adding options to all servers in server_list

    class { 'ntp':
        server_list = ['a.example.com', 'b.example.com'],
        server_options = 'iburst',
    }

Adding options to one specific server

    class { 'ntp':
        server_list = [
            'a.example.com iburst',
            'b.example.com',
        ],
    }

Other class parameters

  • ensure: present or absent, default: present
  • server_options: string, default: ''
  • pool_list: string, default: []
  • pool_options: string, default: ''
  • interface_ignore: array, default: []
  • interface_listen: array, default: []
  • enable_statistics: true or false, default: false
  • statsdir: string, default: undef
  • tinker_panic: boolean, default: false
  • autoupgrade: true or false, default: false
  • package: string, default: OS specific. Set package name, if platform is not supported.
  • config_file: string, default: OS specific. Set config_file, if platform is not supported.
  • config_file_replace: true or false, default: true
  • driftfile: string, default: OS specific. Set driftfile, if platform is not supported.
  • service_ensure: running or stopped, default: running
  • service_name: string, default: OS specific. Set service_name, if platform is not supported.
  • service_enable: true or false, default: true
  • service_hasstatus: true or false, default: true
  • service_hasrestart: true or false, default: true

puppet-ntp's People

Contributors

alaureijs avatar avtar avatar bovy89 avatar endemics avatar jamesquik avatar jfroche avatar lackhove avatar mattiasgiese-b1 avatar mhutter avatar razorsedge avatar saz avatar vjt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-ntp's Issues

disable monitor

NTP versions prior to 4.2.7p230 are recommended to have "disable monitor" in their config. It is not possible to configure it via this module.

Error when running with parser=future on CentOS 7

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Comparison of: Undef Value >= String, is not possible. Caused by 'Only Strings and Numbers are comparable'. at /etc/puppet/environments/testing/modules/ntp/manifests/params.pp:28:30 on node wiki.ekt.maschinenbau.tu-darmstadt.de

tested with version ff5b2d0

ntp failure with Ubuntu 12.04 LTS

When i try the ntp with ubuntu 12.04 LTS , i see the operation failing and the following is the err i see in console

err: /Stage[main]/Ntp/Service[ntp]: Could not evaluate: Could not find init script or upstart conf file for 'ntp'

Fails on CentOS 7.2

Given a Manifest

class { 'ntp':
  server_list => ['0.de.pool.ntp.org', '1.de.pool.ntp.org'],
}

When applied, the agent fails:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Comparison of: Undef Value >= Integer, is not possible. Caused by 'Only Strings and Numbers are comparable'. at /etc/puppetlabs/code/environments/production/modules/ntp/manifests/params.pp:28:30 on node x.y.z

Facts from the target System:

operatingsystem: CentOS
operatingsystemmajrelease: '7'
operatingsystemrelease: 7.2.1511

Error while evaluating a Function Call, 'versioncmp'

When i ran puppet agent --test on puppet 4.10.1 running Centos 7.3.16111 the below problem happens.
===logs==
puppet agent --test
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, 'versioncmp' parameter 'b' expects a String value, got Integer at /etc/puppetlabs/code/environments/production/modules/ntp/manifests/params.pp:28:14 on node foreman.raffbrains.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
====logs===

i had to modify a line if versioncmp($majdistrelease, 6) >= 0 {
to be if versioncmp($majdistrelease, '6') >= 0 {

Then it worked afterwards.

Variable access via 'statsdir' is deprecated

It seems that statsdir is used instead of @statsdir, which causes deprecation warnings on Puppet 3.

Warning: Variable access via 'statsdir' is deprecated. Use '@statsdir' instead. template[/etc/puppet/ext_modules/ntp/templates/ntp.conf.erb]:18
   (at /etc/puppet/ext_modules/ntp/templates/ntp.conf.erb:18:in `block in result')
Warning: Variable access via 'query_networks' is deprecated. Use '@query_networks' instead. template[/etc/puppet/ext_modules/ntp/templates/ntp.conf.erb]:44
   (at /etc/puppet/ext_modules/ntp/templates/ntp.conf.erb:44:in `block in result')

"thinker panic 0" for VMs

Config option:
thinker panic 0
is suggested for virtual machines.
Any plan to introduce it?

Thanks

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.