Skip to content

Commit 384ffd9

Browse files
author
Jeff McCune
committed
Initial commit
0 parents  commit 384ffd9

File tree

17 files changed

+223
-0
lines changed

17 files changed

+223
-0
lines changed

Modulefile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name 'jeffmccune-ntp'
2+
version '0.0.1'
3+
source 'UNKNOWN'
4+
author 'jeffmccune'
5+
license 'UNKNOWN'
6+
summary 'UNKNOWN'
7+
description 'UNKNOWN'
8+
project_page 'UNKNOWN'
9+
10+
## Add dependencies, if any:
11+
# dependency 'username/name', '>= 1.2.0'

README

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ntp
2+
3+
This is the ntp module.

files/README.markdown

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Files
2+
=====
3+
4+
Puppet comes with both a client and server for copying files around. The file
5+
serving function is provided as part of the central Puppet daemon,
6+
puppetmasterd, and the client function is used through the source attribute of
7+
file objects. Learn more at
8+
http://projects.puppetlabs.com/projects/puppet/wiki/File_Serving_Configuration
9+
10+
You can use managed files like this:
11+
12+
class myclass {
13+
package { mypackage: ensure => latest }
14+
service { myservice: ensure => running }
15+
file { "/etc/myfile":
16+
source => "puppet://$servername/modules/mymodule/myfile"
17+
}
18+
}
19+
20+
The files are searched for in:
21+
22+
$modulepath/mymodule/files/myfile

lib/puppet/facter/README.markdown

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Facter
2+
======
3+
4+
Define facts in this directory.
5+
6+
Sometimes you need to be able to write conditional expressions based
7+
on site-specific data that just isn’t available via Facter. The
8+
solution may be to add a fact to Facter. These additional facts can
9+
then be distributed to Puppet clients and are available for use in
10+
manifests. Learn more at
11+
http://projects.puppetlabs.com/projects/puppet/wiki/Adding_Facts
12+
13+
File paths should match the fact name; for example, a fact
14+
`hardware_platform`, defined like this:
15+
16+
Facter.add("hardware_platform") do
17+
setcode do
18+
%x{/bin/uname -i}.chomp
19+
end
20+
end
21+
22+
Should be found in `hardware_platform.rb` in this directory.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Functions
2+
=========
3+
4+
Define functions in this directory.
5+
6+
File paths should match the function name; for example, a function
7+
`myfunction`, defined like this:
8+
9+
Puppet::Parser::Functions::newfunction(
10+
:myfunction,
11+
:type => :statement,
12+
:doc => "Documentation here."
13+
) do |vals|
14+
# ...
15+
end
16+
17+
Should be found in `myfunction.rb` in this directory.

lib/puppet/provider/README.markdown

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Providers
2+
=========
3+
4+
Define providers under this directory.
5+
6+
File paths should match the resource type name and provider name; for
7+
example, a provider `myprovider` for a resource type `mytype`, defined like this:
8+
9+
Puppet::Type.type(:mytype).provide(:myprovider) do
10+
desc "Documentation here"
11+
# ...
12+
end
13+
14+
Should be found in `mytype/myprovider.rb` under this directory.

lib/puppet/type/README.markdown

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Resource Types
2+
==============
3+
4+
Define resource types in this directory.
5+
6+
Filenames should match the resource type name; for example, a resource
7+
type `mytype`, defined like this:
8+
9+
Puppet::Type.newtype(:mytype) do
10+
@doc = "Documentation here."
11+
# ...
12+
end
13+
14+
Should be found in `mytype.rb`

manifests/README.markdown

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Manifests
2+
=========
3+
4+
Module manifest files belong in this directory.
5+
6+
`init.pp` defines how the module will carry out its tasks in this file.
7+
8+
Add additional definitions in this directory. Their file paths should match the
9+
definition name; for example, a definition `mydefinition`, defined like this:
10+
11+
# Definition: mydefinition
12+
#
13+
# This is the mydefinition in the mymodule module.
14+
#
15+
# Parameters:
16+
#
17+
# Actions:
18+
#
19+
# Requires:
20+
#
21+
# Sample Usage:
22+
#
23+
# [Remember: No empty lines between comments and class definition]
24+
define mydefinition {
25+
# ...
26+
}
27+
28+
Should be found in `mydefinition.pp` in this directory.

manifests/init.pp

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Class: ntp
2+
#
3+
# This module manages ntp
4+
#
5+
# Parameters:
6+
#
7+
# Actions:
8+
#
9+
# Requires:
10+
#
11+
# Sample Usage:
12+
#
13+
# [Remember: No empty lines between comments and class definition]
14+
class ntp {
15+
16+
17+
}

metadata.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
+-----------------------------------------------------------------------+
3+
| |
4+
| ==> DO NOT EDIT THIS FILE! <== |
5+
| |
6+
| You should edit the `Modulefile` and run `puppet-module build` |
7+
| to generate the `metadata.json` file for your releases. |
8+
| |
9+
+-----------------------------------------------------------------------+
10+
*/
11+
12+
{}

spec/README.markdown

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Specs
2+
=====
3+
4+
The Puppet project uses RSpec for testing.
5+
6+
For more information on RSpec, see http://rspec.info/
7+

spec/spec.opts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--format
2+
s
3+
--colour
4+
--loadby
5+
mtime
6+
--backtrace

spec/spec_helper.rb

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
require 'pathname'
2+
dir = Pathname.new(__FILE__).parent
3+
$LOAD_PATH.unshift(dir, dir + 'lib', dir + '../lib')
4+
5+
require 'mocha'
6+
require 'puppet'
7+
gem 'rspec', '=1.2.9'
8+
require 'spec/autorun'
9+
10+
Spec::Runner.configure do |config|
11+
config.mock_with :mocha
12+
end
13+
14+
# We need this because the RAL uses 'should' as a method. This
15+
# allows us the same behaviour but with a different method name.
16+
class Object
17+
alias :must :should
18+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Provider Specs
2+
==============
3+
4+
Define specs for your providers under this directory.

spec/unit/puppet/type/README.markdown

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Resource Type Specs
2+
===================
3+
4+
Define specs for your resource types in this directory.

templates/README.markdown

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Templates
2+
=========
3+
4+
Puppet supports templates and templating via ERB, which is part of the Ruby
5+
standard library and is used for many other projects including Ruby on Rails.
6+
Templates allow you to manage the content of template files, for example
7+
configuration files that cannot yet be managed as a Puppet type. Learn more at
8+
http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Templating
9+
10+
You can use templates like this:
11+
12+
class myclass {
13+
package { mypackage: ensure => latest }
14+
service { myservice: ensure => running }
15+
file { "/etc/myfile":
16+
content => template("mymodule/myfile.erb")
17+
}
18+
}
19+
20+
The templates are searched for in:
21+
22+
$templatedir/mymodule/myfile.erb
23+
$modulepath/mymodule/templates/myfile.erb

tests/init.pp

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include ntp

0 commit comments

Comments
 (0)