simp-module-repoclosure 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.document +3 -0
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.travis.yml +6 -0
- data/.yardopts +1 -0
- data/ChangeLog.md +4 -0
- data/Gemfile +13 -0
- data/Guardfile +78 -0
- data/LICENSE +27 -0
- data/LICENSE.txt +202 -0
- data/NOTICE.txt +5 -0
- data/README.md +99 -0
- data/Rakefile +32 -0
- data/docs/img/simp-module-repoclosure design.png +0 -0
- data/docs/img/simp-module-repoclosure design.svg +2430 -0
- data/docs/img/simp-module-repoclosure tests.png +0 -0
- data/docs/img/simp-module-repoclosure tests.svg +1 -0
- data/docs/simp-module-repoclosure design.gliffy +1 -0
- data/docs/simp-module-repoclosure tests.gliffy +1 -0
- data/lib/simp/module/repoclosure.rb +207 -0
- data/lib/simp/module/repoclosure/version.rb +27 -0
- data/simp-module-repoclosure.gemspec +40 -0
- data/spec/files/modules/dep1/Gemfile +14 -0
- data/spec/files/modules/dep1/README.md +83 -0
- data/spec/files/modules/dep1/Rakefile +17 -0
- data/spec/files/modules/dep1/manifests/init.pp +48 -0
- data/spec/files/modules/dep1/metadata.json +15 -0
- data/spec/files/modules/dep1/spec/classes/init_spec.rb +7 -0
- data/spec/files/modules/dep1/spec/spec_helper.rb +1 -0
- data/spec/files/modules/dep1/tests/init.pp +12 -0
- data/spec/files/modules/dep2/Gemfile +14 -0
- data/spec/files/modules/dep2/README.md +83 -0
- data/spec/files/modules/dep2/Rakefile +17 -0
- data/spec/files/modules/dep2/manifests/init.pp +48 -0
- data/spec/files/modules/dep2/metadata.json +14 -0
- data/spec/files/modules/dep2/spec/classes/init_spec.rb +7 -0
- data/spec/files/modules/dep2/spec/spec_helper.rb +1 -0
- data/spec/files/modules/dep2/tests/init.pp +12 -0
- data/spec/files/modules/dep3/Gemfile +14 -0
- data/spec/files/modules/dep3/README.md +83 -0
- data/spec/files/modules/dep3/Rakefile +17 -0
- data/spec/files/modules/dep3/manifests/init.pp +48 -0
- data/spec/files/modules/dep3/metadata.json +14 -0
- data/spec/files/modules/dep3/spec/classes/init_spec.rb +7 -0
- data/spec/files/modules/dep3/spec/spec_helper.rb +1 -0
- data/spec/files/modules/dep3/tests/init.pp +12 -0
- data/spec/files/modules/dep3a/Gemfile +14 -0
- data/spec/files/modules/dep3a/README.md +83 -0
- data/spec/files/modules/dep3a/Rakefile +17 -0
- data/spec/files/modules/dep3a/manifests/init.pp +48 -0
- data/spec/files/modules/dep3a/metadata.json +14 -0
- data/spec/files/modules/dep3a/spec/classes/init_spec.rb +7 -0
- data/spec/files/modules/dep3a/spec/spec_helper.rb +1 -0
- data/spec/files/modules/dep3a/tests/init.pp +12 -0
- data/spec/files/modules/dep4/Gemfile +14 -0
- data/spec/files/modules/dep4/README.md +83 -0
- data/spec/files/modules/dep4/Rakefile +17 -0
- data/spec/files/modules/dep4/manifests/init.pp +48 -0
- data/spec/files/modules/dep4/metadata.json +15 -0
- data/spec/files/modules/dep4/spec/classes/init_spec.rb +7 -0
- data/spec/files/modules/dep4/spec/spec_helper.rb +1 -0
- data/spec/files/modules/dep4/tests/init.pp +12 -0
- data/spec/files/modules/module01/Gemfile +14 -0
- data/spec/files/modules/module01/README.md +83 -0
- data/spec/files/modules/module01/Rakefile +17 -0
- data/spec/files/modules/module01/manifests/init.pp +48 -0
- data/spec/files/modules/module01/metadata.json +15 -0
- data/spec/files/modules/module01/spec/classes/init_spec.rb +7 -0
- data/spec/files/modules/module01/spec/spec_helper.rb +1 -0
- data/spec/files/modules/module01/tests/init.pp +12 -0
- data/spec/files/modules/module02/.fixtures.yml +8 -0
- data/spec/files/modules/module02/Gemfile +14 -0
- data/spec/files/modules/module02/README.md +83 -0
- data/spec/files/modules/module02/Rakefile +17 -0
- data/spec/files/modules/module02/manifests/init.pp +48 -0
- data/spec/files/modules/module02/metadata.json +15 -0
- data/spec/files/modules/module02/spec/classes/init_spec.rb +7 -0
- data/spec/files/modules/module02/spec/spec_helper.rb +1 -0
- data/spec/files/modules/module02/tests/init.pp +12 -0
- data/spec/files/modules/module03/.fixtures.yml +6 -0
- data/spec/files/modules/module03/Gemfile +14 -0
- data/spec/files/modules/module03/README.md +83 -0
- data/spec/files/modules/module03/Rakefile +17 -0
- data/spec/files/modules/module03/manifests/init.pp +48 -0
- data/spec/files/modules/module03/metadata.json +15 -0
- data/spec/files/modules/module03/spec/classes/init_spec.rb +7 -0
- data/spec/files/modules/module03/spec/spec_helper.rb +1 -0
- data/spec/files/modules/module03/tests/init.pp +12 -0
- data/spec/files/modules/mut1/Gemfile +14 -0
- data/spec/files/modules/mut1/README.md +83 -0
- data/spec/files/modules/mut1/Rakefile +17 -0
- data/spec/files/modules/mut1/manifests/init.pp +48 -0
- data/spec/files/modules/mut1/metadata.json +15 -0
- data/spec/files/modules/mut1/spec/classes/init_spec.rb +7 -0
- data/spec/files/modules/mut1/spec/spec_helper.rb +1 -0
- data/spec/files/modules/mut1/tests/init.pp +12 -0
- data/spec/files/modules/mut2/Gemfile +14 -0
- data/spec/files/modules/mut2/README.md +83 -0
- data/spec/files/modules/mut2/Rakefile +17 -0
- data/spec/files/modules/mut2/manifests/init.pp +48 -0
- data/spec/files/modules/mut2/metadata.json +16 -0
- data/spec/files/modules/mut2/spec/classes/init_spec.rb +7 -0
- data/spec/files/modules/mut2/spec/spec_helper.rb +1 -0
- data/spec/files/modules/mut2/tests/init.pp +12 -0
- data/spec/lib/simp/module/repoclosure_spec.rb +119 -0
- data/spec/spec_helper.rb +23 -0
- metadata +345 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# module01
|
|
2
|
+
|
|
3
|
+
#### Table of Contents
|
|
4
|
+
|
|
5
|
+
1. [Description](#description)
|
|
6
|
+
1. [Setup - The basics of getting started with module01](#setup)
|
|
7
|
+
* [What module01 affects](#what-module01-affects)
|
|
8
|
+
* [Setup requirements](#setup-requirements)
|
|
9
|
+
* [Beginning with module01](#beginning-with-module01)
|
|
10
|
+
1. [Usage - Configuration options and additional functionality](#usage)
|
|
11
|
+
1. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
|
|
12
|
+
1. [Limitations - OS compatibility, etc.](#limitations)
|
|
13
|
+
1. [Development - Guide for contributing to the module](#development)
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
Start with a one- or two-sentence summary of what the module does and/or what
|
|
18
|
+
problem it solves. This is your 30-second elevator pitch for your module.
|
|
19
|
+
Consider including OS/Puppet version it works with.
|
|
20
|
+
|
|
21
|
+
You can give more descriptive information in a second paragraph. This paragraph
|
|
22
|
+
should answer the questions: "What does this module *do*?" and "Why would I use
|
|
23
|
+
it?" If your module has a range of functionality (installation, configuration,
|
|
24
|
+
management, etc.), this is the time to mention it.
|
|
25
|
+
|
|
26
|
+
## Setup
|
|
27
|
+
|
|
28
|
+
### What module01 affects **OPTIONAL**
|
|
29
|
+
|
|
30
|
+
If it's obvious what your module touches, you can skip this section. For
|
|
31
|
+
example, folks can probably figure out that your mysql_instance module affects
|
|
32
|
+
their MySQL instances.
|
|
33
|
+
|
|
34
|
+
If there's more that they should know about, though, this is the place to mention:
|
|
35
|
+
|
|
36
|
+
* A list of files, packages, services, or operations that the module will alter,
|
|
37
|
+
impact, or execute.
|
|
38
|
+
* Dependencies that your module automatically installs.
|
|
39
|
+
* Warnings or other important notices.
|
|
40
|
+
|
|
41
|
+
### Setup Requirements **OPTIONAL**
|
|
42
|
+
|
|
43
|
+
If your module requires anything extra before setting up (pluginsync enabled,
|
|
44
|
+
etc.), mention it here.
|
|
45
|
+
|
|
46
|
+
If your most recent release breaks compatibility or requires particular steps
|
|
47
|
+
for upgrading, you might want to include an additional "Upgrading" section
|
|
48
|
+
here.
|
|
49
|
+
|
|
50
|
+
### Beginning with module01
|
|
51
|
+
|
|
52
|
+
The very basic steps needed for a user to get the module up and running. This
|
|
53
|
+
can include setup steps, if necessary, or it can be an example of the most
|
|
54
|
+
basic use of the module.
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
This section is where you describe how to customize, configure, and do the
|
|
59
|
+
fancy stuff with your module here. It's especially helpful if you include usage
|
|
60
|
+
examples and code samples for doing things with your module.
|
|
61
|
+
|
|
62
|
+
## Reference
|
|
63
|
+
|
|
64
|
+
Here, include a complete list of your module's classes, types, providers,
|
|
65
|
+
facts, along with the parameters for each. Users refer to this section (thus
|
|
66
|
+
the name "Reference") to find specific details; most users don't read it per
|
|
67
|
+
se.
|
|
68
|
+
|
|
69
|
+
## Limitations
|
|
70
|
+
|
|
71
|
+
This is where you list OS compatibility, version compatibility, etc. If there
|
|
72
|
+
are Known Issues, you might want to include them under their own heading here.
|
|
73
|
+
|
|
74
|
+
## Development
|
|
75
|
+
|
|
76
|
+
Since your module is awesome, other users will want to play with it. Let them
|
|
77
|
+
know what the ground rules for contributing are.
|
|
78
|
+
|
|
79
|
+
## Release Notes/Contributors/Etc. **Optional**
|
|
80
|
+
|
|
81
|
+
If you aren't using changelog, put your release notes here (though you should
|
|
82
|
+
consider using changelog). You can also add any additional sections you feel
|
|
83
|
+
are necessary or important to include here. Please use the `## ` header.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require 'puppetlabs_spec_helper/rake_tasks'
|
|
2
|
+
require 'puppet-lint/tasks/puppet-lint'
|
|
3
|
+
PuppetLint.configuration.send('disable_80chars')
|
|
4
|
+
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
|
|
5
|
+
|
|
6
|
+
desc "Validate manifests, templates, and ruby files"
|
|
7
|
+
task :validate do
|
|
8
|
+
Dir['manifests/**/*.pp'].each do |manifest|
|
|
9
|
+
sh "puppet parser validate --noop #{manifest}"
|
|
10
|
+
end
|
|
11
|
+
Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file|
|
|
12
|
+
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
|
|
13
|
+
end
|
|
14
|
+
Dir['templates/**/*.erb'].each do |template|
|
|
15
|
+
sh "erb -P -x -T '-' #{template} | ruby -c"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Class: module01
|
|
2
|
+
# ===========================
|
|
3
|
+
#
|
|
4
|
+
# Full description of class module01 here.
|
|
5
|
+
#
|
|
6
|
+
# Parameters
|
|
7
|
+
# ----------
|
|
8
|
+
#
|
|
9
|
+
# Document parameters here.
|
|
10
|
+
#
|
|
11
|
+
# * `sample parameter`
|
|
12
|
+
# Explanation of what this parameter affects and what it defaults to.
|
|
13
|
+
# e.g. "Specify one or more upstream ntp servers as an array."
|
|
14
|
+
#
|
|
15
|
+
# Variables
|
|
16
|
+
# ----------
|
|
17
|
+
#
|
|
18
|
+
# Here you should define a list of variables that this module would require.
|
|
19
|
+
#
|
|
20
|
+
# * `sample variable`
|
|
21
|
+
# Explanation of how this variable affects the function of this class and if
|
|
22
|
+
# it has a default. e.g. "The parameter enc_ntp_servers must be set by the
|
|
23
|
+
# External Node Classifier as a comma separated list of hostnames." (Note,
|
|
24
|
+
# global variables should be avoided in favor of class parameters as
|
|
25
|
+
# of Puppet 2.6.)
|
|
26
|
+
#
|
|
27
|
+
# Examples
|
|
28
|
+
# --------
|
|
29
|
+
#
|
|
30
|
+
# @example
|
|
31
|
+
# class { 'module01':
|
|
32
|
+
# servers => [ 'pool.ntp.org', 'ntp.local.company.com' ],
|
|
33
|
+
# }
|
|
34
|
+
#
|
|
35
|
+
# Authors
|
|
36
|
+
# -------
|
|
37
|
+
#
|
|
38
|
+
# Author Name <author@domain.com>
|
|
39
|
+
#
|
|
40
|
+
# Copyright
|
|
41
|
+
# ---------
|
|
42
|
+
#
|
|
43
|
+
# Copyright 2016 Your name here, unless otherwise noted.
|
|
44
|
+
#
|
|
45
|
+
class module01 {
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "test-module01",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"author": "test",
|
|
5
|
+
"summary": "test module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"source": "",
|
|
8
|
+
"project_page": null,
|
|
9
|
+
"issues_url": null,
|
|
10
|
+
"dependencies": [
|
|
11
|
+
{"name":"puppetlabs-stdlib","version_requirement":">= 4.1.0"}
|
|
12
|
+
],
|
|
13
|
+
"data_provider": null
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'puppetlabs_spec_helper/module_spec_helper'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# The baseline for module testing used by Puppet Labs is that each manifest
|
|
2
|
+
# should have a corresponding test manifest that declares that class or defined
|
|
3
|
+
# type.
|
|
4
|
+
#
|
|
5
|
+
# Tests are then run by using puppet apply --noop (to check for compilation
|
|
6
|
+
# errors and view a log of events) or by fully applying the test in a virtual
|
|
7
|
+
# environment (to compare the resulting system state to the desired state).
|
|
8
|
+
#
|
|
9
|
+
# Learn more about module testing here:
|
|
10
|
+
# https://docs.puppetlabs.com/guides/tests_smoke.html
|
|
11
|
+
#
|
|
12
|
+
include ::module01
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : ['>= 3.3']
|
|
4
|
+
gem 'metadata-json-lint'
|
|
5
|
+
gem 'puppet', puppetversion
|
|
6
|
+
gem 'puppetlabs_spec_helper', '>= 1.0.0'
|
|
7
|
+
gem 'puppet-lint', '>= 1.0.0'
|
|
8
|
+
gem 'facter', '>= 1.7.0'
|
|
9
|
+
gem 'rspec-puppet'
|
|
10
|
+
|
|
11
|
+
# rspec must be v2 for ruby 1.8.7
|
|
12
|
+
if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9'
|
|
13
|
+
gem 'rspec', '~> 2.0'
|
|
14
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# module02
|
|
2
|
+
|
|
3
|
+
#### Table of Contents
|
|
4
|
+
|
|
5
|
+
1. [Description](#description)
|
|
6
|
+
1. [Setup - The basics of getting started with module02](#setup)
|
|
7
|
+
* [What module02 affects](#what-module02-affects)
|
|
8
|
+
* [Setup requirements](#setup-requirements)
|
|
9
|
+
* [Beginning with module02](#beginning-with-module02)
|
|
10
|
+
1. [Usage - Configuration options and additional functionality](#usage)
|
|
11
|
+
1. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
|
|
12
|
+
1. [Limitations - OS compatibility, etc.](#limitations)
|
|
13
|
+
1. [Development - Guide for contributing to the module](#development)
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
Start with a one- or two-sentence summary of what the module does and/or what
|
|
18
|
+
problem it solves. This is your 30-second elevator pitch for your module.
|
|
19
|
+
Consider including OS/Puppet version it works with.
|
|
20
|
+
|
|
21
|
+
You can give more descriptive information in a second paragraph. This paragraph
|
|
22
|
+
should answer the questions: "What does this module *do*?" and "Why would I use
|
|
23
|
+
it?" If your module has a range of functionality (installation, configuration,
|
|
24
|
+
management, etc.), this is the time to mention it.
|
|
25
|
+
|
|
26
|
+
## Setup
|
|
27
|
+
|
|
28
|
+
### What module02 affects **OPTIONAL**
|
|
29
|
+
|
|
30
|
+
If it's obvious what your module touches, you can skip this section. For
|
|
31
|
+
example, folks can probably figure out that your mysql_instance module affects
|
|
32
|
+
their MySQL instances.
|
|
33
|
+
|
|
34
|
+
If there's more that they should know about, though, this is the place to mention:
|
|
35
|
+
|
|
36
|
+
* A list of files, packages, services, or operations that the module will alter,
|
|
37
|
+
impact, or execute.
|
|
38
|
+
* Dependencies that your module automatically installs.
|
|
39
|
+
* Warnings or other important notices.
|
|
40
|
+
|
|
41
|
+
### Setup Requirements **OPTIONAL**
|
|
42
|
+
|
|
43
|
+
If your module requires anything extra before setting up (pluginsync enabled,
|
|
44
|
+
etc.), mention it here.
|
|
45
|
+
|
|
46
|
+
If your most recent release breaks compatibility or requires particular steps
|
|
47
|
+
for upgrading, you might want to include an additional "Upgrading" section
|
|
48
|
+
here.
|
|
49
|
+
|
|
50
|
+
### Beginning with module02
|
|
51
|
+
|
|
52
|
+
The very basic steps needed for a user to get the module up and running. This
|
|
53
|
+
can include setup steps, if necessary, or it can be an example of the most
|
|
54
|
+
basic use of the module.
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
This section is where you describe how to customize, configure, and do the
|
|
59
|
+
fancy stuff with your module here. It's especially helpful if you include usage
|
|
60
|
+
examples and code samples for doing things with your module.
|
|
61
|
+
|
|
62
|
+
## Reference
|
|
63
|
+
|
|
64
|
+
Here, include a complete list of your module's classes, types, providers,
|
|
65
|
+
facts, along with the parameters for each. Users refer to this section (thus
|
|
66
|
+
the name "Reference") to find specific details; most users don't read it per
|
|
67
|
+
se.
|
|
68
|
+
|
|
69
|
+
## Limitations
|
|
70
|
+
|
|
71
|
+
This is where you list OS compatibility, version compatibility, etc. If there
|
|
72
|
+
are Known Issues, you might want to include them under their own heading here.
|
|
73
|
+
|
|
74
|
+
## Development
|
|
75
|
+
|
|
76
|
+
Since your module is awesome, other users will want to play with it. Let them
|
|
77
|
+
know what the ground rules for contributing are.
|
|
78
|
+
|
|
79
|
+
## Release Notes/Contributors/Etc. **Optional**
|
|
80
|
+
|
|
81
|
+
If you aren't using changelog, put your release notes here (though you should
|
|
82
|
+
consider using changelog). You can also add any additional sections you feel
|
|
83
|
+
are necessary or important to include here. Please use the `## ` header.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require 'puppetlabs_spec_helper/rake_tasks'
|
|
2
|
+
require 'puppet-lint/tasks/puppet-lint'
|
|
3
|
+
PuppetLint.configuration.send('disable_80chars')
|
|
4
|
+
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
|
|
5
|
+
|
|
6
|
+
desc "Validate manifests, templates, and ruby files"
|
|
7
|
+
task :validate do
|
|
8
|
+
Dir['manifests/**/*.pp'].each do |manifest|
|
|
9
|
+
sh "puppet parser validate --noop #{manifest}"
|
|
10
|
+
end
|
|
11
|
+
Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file|
|
|
12
|
+
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
|
|
13
|
+
end
|
|
14
|
+
Dir['templates/**/*.erb'].each do |template|
|
|
15
|
+
sh "erb -P -x -T '-' #{template} | ruby -c"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Class: module02
|
|
2
|
+
# ===========================
|
|
3
|
+
#
|
|
4
|
+
# Full description of class module02 here.
|
|
5
|
+
#
|
|
6
|
+
# Parameters
|
|
7
|
+
# ----------
|
|
8
|
+
#
|
|
9
|
+
# Document parameters here.
|
|
10
|
+
#
|
|
11
|
+
# * `sample parameter`
|
|
12
|
+
# Explanation of what this parameter affects and what it defaults to.
|
|
13
|
+
# e.g. "Specify one or more upstream ntp servers as an array."
|
|
14
|
+
#
|
|
15
|
+
# Variables
|
|
16
|
+
# ----------
|
|
17
|
+
#
|
|
18
|
+
# Here you should define a list of variables that this module would require.
|
|
19
|
+
#
|
|
20
|
+
# * `sample variable`
|
|
21
|
+
# Explanation of how this variable affects the function of this class and if
|
|
22
|
+
# it has a default. e.g. "The parameter enc_ntp_servers must be set by the
|
|
23
|
+
# External Node Classifier as a comma separated list of hostnames." (Note,
|
|
24
|
+
# global variables should be avoided in favor of class parameters as
|
|
25
|
+
# of Puppet 2.6.)
|
|
26
|
+
#
|
|
27
|
+
# Examples
|
|
28
|
+
# --------
|
|
29
|
+
#
|
|
30
|
+
# @example
|
|
31
|
+
# class { 'module02':
|
|
32
|
+
# servers => [ 'pool.ntp.org', 'ntp.local.company.com' ],
|
|
33
|
+
# }
|
|
34
|
+
#
|
|
35
|
+
# Authors
|
|
36
|
+
# -------
|
|
37
|
+
#
|
|
38
|
+
# Author Name <author@domain.com>
|
|
39
|
+
#
|
|
40
|
+
# Copyright
|
|
41
|
+
# ---------
|
|
42
|
+
#
|
|
43
|
+
# Copyright 2016 Your name here, unless otherwise noted.
|
|
44
|
+
#
|
|
45
|
+
class module02 {
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "test-module02",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"author": "test",
|
|
5
|
+
"summary": "test module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"source": "",
|
|
8
|
+
"project_page": null,
|
|
9
|
+
"issues_url": null,
|
|
10
|
+
"dependencies": [
|
|
11
|
+
{"name":"puppetlabs-stdlib","version_requirement":">= 4.1.0"}
|
|
12
|
+
],
|
|
13
|
+
"data_provider": null
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'puppetlabs_spec_helper/module_spec_helper'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# The baseline for module testing used by Puppet Labs is that each manifest
|
|
2
|
+
# should have a corresponding test manifest that declares that class or defined
|
|
3
|
+
# type.
|
|
4
|
+
#
|
|
5
|
+
# Tests are then run by using puppet apply --noop (to check for compilation
|
|
6
|
+
# errors and view a log of events) or by fully applying the test in a virtual
|
|
7
|
+
# environment (to compare the resulting system state to the desired state).
|
|
8
|
+
#
|
|
9
|
+
# Learn more about module testing here:
|
|
10
|
+
# https://docs.puppetlabs.com/guides/tests_smoke.html
|
|
11
|
+
#
|
|
12
|
+
include ::module02
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : ['>= 3.3']
|
|
4
|
+
gem 'metadata-json-lint'
|
|
5
|
+
gem 'puppet', puppetversion
|
|
6
|
+
gem 'puppetlabs_spec_helper', '>= 1.0.0'
|
|
7
|
+
gem 'puppet-lint', '>= 1.0.0'
|
|
8
|
+
gem 'facter', '>= 1.7.0'
|
|
9
|
+
gem 'rspec-puppet'
|
|
10
|
+
|
|
11
|
+
# rspec must be v2 for ruby 1.8.7
|
|
12
|
+
if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9'
|
|
13
|
+
gem 'rspec', '~> 2.0'
|
|
14
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# module02
|
|
2
|
+
|
|
3
|
+
#### Table of Contents
|
|
4
|
+
|
|
5
|
+
1. [Description](#description)
|
|
6
|
+
1. [Setup - The basics of getting started with module02](#setup)
|
|
7
|
+
* [What module02 affects](#what-module02-affects)
|
|
8
|
+
* [Setup requirements](#setup-requirements)
|
|
9
|
+
* [Beginning with module02](#beginning-with-module02)
|
|
10
|
+
1. [Usage - Configuration options and additional functionality](#usage)
|
|
11
|
+
1. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
|
|
12
|
+
1. [Limitations - OS compatibility, etc.](#limitations)
|
|
13
|
+
1. [Development - Guide for contributing to the module](#development)
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
Start with a one- or two-sentence summary of what the module does and/or what
|
|
18
|
+
problem it solves. This is your 30-second elevator pitch for your module.
|
|
19
|
+
Consider including OS/Puppet version it works with.
|
|
20
|
+
|
|
21
|
+
You can give more descriptive information in a second paragraph. This paragraph
|
|
22
|
+
should answer the questions: "What does this module *do*?" and "Why would I use
|
|
23
|
+
it?" If your module has a range of functionality (installation, configuration,
|
|
24
|
+
management, etc.), this is the time to mention it.
|
|
25
|
+
|
|
26
|
+
## Setup
|
|
27
|
+
|
|
28
|
+
### What module02 affects **OPTIONAL**
|
|
29
|
+
|
|
30
|
+
If it's obvious what your module touches, you can skip this section. For
|
|
31
|
+
example, folks can probably figure out that your mysql_instance module affects
|
|
32
|
+
their MySQL instances.
|
|
33
|
+
|
|
34
|
+
If there's more that they should know about, though, this is the place to mention:
|
|
35
|
+
|
|
36
|
+
* A list of files, packages, services, or operations that the module will alter,
|
|
37
|
+
impact, or execute.
|
|
38
|
+
* Dependencies that your module automatically installs.
|
|
39
|
+
* Warnings or other important notices.
|
|
40
|
+
|
|
41
|
+
### Setup Requirements **OPTIONAL**
|
|
42
|
+
|
|
43
|
+
If your module requires anything extra before setting up (pluginsync enabled,
|
|
44
|
+
etc.), mention it here.
|
|
45
|
+
|
|
46
|
+
If your most recent release breaks compatibility or requires particular steps
|
|
47
|
+
for upgrading, you might want to include an additional "Upgrading" section
|
|
48
|
+
here.
|
|
49
|
+
|
|
50
|
+
### Beginning with module02
|
|
51
|
+
|
|
52
|
+
The very basic steps needed for a user to get the module up and running. This
|
|
53
|
+
can include setup steps, if necessary, or it can be an example of the most
|
|
54
|
+
basic use of the module.
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
This section is where you describe how to customize, configure, and do the
|
|
59
|
+
fancy stuff with your module here. It's especially helpful if you include usage
|
|
60
|
+
examples and code samples for doing things with your module.
|
|
61
|
+
|
|
62
|
+
## Reference
|
|
63
|
+
|
|
64
|
+
Here, include a complete list of your module's classes, types, providers,
|
|
65
|
+
facts, along with the parameters for each. Users refer to this section (thus
|
|
66
|
+
the name "Reference") to find specific details; most users don't read it per
|
|
67
|
+
se.
|
|
68
|
+
|
|
69
|
+
## Limitations
|
|
70
|
+
|
|
71
|
+
This is where you list OS compatibility, version compatibility, etc. If there
|
|
72
|
+
are Known Issues, you might want to include them under their own heading here.
|
|
73
|
+
|
|
74
|
+
## Development
|
|
75
|
+
|
|
76
|
+
Since your module is awesome, other users will want to play with it. Let them
|
|
77
|
+
know what the ground rules for contributing are.
|
|
78
|
+
|
|
79
|
+
## Release Notes/Contributors/Etc. **Optional**
|
|
80
|
+
|
|
81
|
+
If you aren't using changelog, put your release notes here (though you should
|
|
82
|
+
consider using changelog). You can also add any additional sections you feel
|
|
83
|
+
are necessary or important to include here. Please use the `## ` header.
|