Skip to content

Commit f4d94ef

Browse files
committedNov 7, 2016
Update based on voxpupuli/modulesync_config 0.14.1. This might fix voxpupuli#246, voxpupuli#248 and voxpupuli#253
1 parent a8c113e commit f4d94ef

30 files changed

+1118
-65
lines changed
 

‎.github/CONTRIBUTING.md

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
This module has grown over time based on a range of contributions from
2+
people using it. If you follow these contributing guidelines your patch
3+
will likely make it into a release a little quicker.
4+
5+
6+
## Contributing
7+
8+
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. [Contributor Code of Conduct](https://voxpupuli.org/coc/).
9+
10+
1. Fork the repo.
11+
12+
1. Create a separate branch for your change.
13+
14+
1. Run the tests. We only take pull requests with passing tests, and
15+
documentation.
16+
17+
1. Add a test for your change. Only refactoring and documentation
18+
changes require no new tests. If you are adding functionality
19+
or fixing a bug, please add a test.
20+
21+
1. Squash your commits down into logical components. Make sure to rebase
22+
against the current master.
23+
24+
1. Push the branch to your fork and submit a pull request.
25+
26+
Please be prepared to repeat some of these steps as our contributors review
27+
your code.
28+
29+
## Dependencies
30+
31+
The testing and development tools have a bunch of dependencies,
32+
all managed by [bundler](http://bundler.io/) according to the
33+
[Puppet support matrix](http://docs.puppetlabs.com/guides/platforms.html#ruby-versions).
34+
35+
By default the tests use a baseline version of Puppet.
36+
37+
If you have Ruby 2.x or want a specific version of Puppet,
38+
you must set an environment variable such as:
39+
40+
export PUPPET_VERSION="~> 4.2.0"
41+
42+
Install the dependencies like so...
43+
44+
bundle install
45+
46+
## Syntax and style
47+
48+
The test suite will run [Puppet Lint](http://puppet-lint.com/) and
49+
[Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to
50+
check various syntax and style things. You can run these locally with:
51+
52+
bundle exec rake lint
53+
bundle exec rake validate
54+
55+
It will also run some [Rubocop](http://batsov.com/rubocop/) tests
56+
against it. You can run those locally ahead of time with:
57+
58+
bundle exec rake rubocop
59+
60+
## Running the unit tests
61+
62+
The unit test suite covers most of the code, as mentioned above please
63+
add tests if you're adding new functionality. If you've not used
64+
[rspec-puppet](http://rspec-puppet.com/) before then feel free to ask
65+
about how best to test your new feature.
66+
67+
To run your all the unit tests
68+
69+
bundle exec rake spec SPEC_OPTS='--format documentation'
70+
71+
To run a specific spec test set the `SPEC` variable:
72+
73+
bundle exec rake spec SPEC=spec/foo_spec.rb
74+
75+
To run the linter, the syntax checker and the unit tests:
76+
77+
bundle exec rake test
78+
79+
80+
## Integration tests
81+
82+
The unit tests just check the code runs, not that it does exactly what
83+
we want on a real machine. For that we're using
84+
[beaker](https://github.com/puppetlabs/beaker).
85+
86+
This fires up a new virtual machine (using vagrant) and runs a series of
87+
simple tests against it after applying the module. You can run this
88+
with:
89+
90+
bundle exec rake acceptance
91+
92+
This will run the tests on an Ubuntu 12.04 virtual machine. You can also
93+
run the integration tests against Centos 6.6 with.
94+
95+
BEAKER_set=centos-66-x64 bundle exec rake acceptances
96+
97+
If you don't want to have to recreate the virtual machine every time you
98+
can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will
99+
at least need `BEAKER_PROVISION` set to yes (the default). The Vagrantfile
100+
for the created virtual machines will be in `.vagrant/beaker_vagrant_fies`.

‎.github/ISSUE_TEMPLATE.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
Thank you for contributing to this project!
3+
- This project has a Contributor Code of Conduct: https://voxpupuli.org/coc/
4+
- Please check that here is no existing issue or PR that addresses your problem.
5+
- Please fill the following form to enable us to help you.
6+
-->
7+
8+
### Affected Puppet, Ruby, OS and module versions/distributions
9+
10+
- Puppet:
11+
- Ruby:
12+
- Distribution:
13+
- Module version:
14+
15+
### How to reproduce (e.g Puppet code you use)
16+
17+
### What are you seeing
18+
19+
### What behaviour did you expect instead
20+
21+
### Output log
22+
23+
### Any additional information you'd like to impart

‎.github/PULL_REQUEST_TEMPLATE.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!--
2+
Thank you for contributing to this project!
3+
- This project has a Contributor Code of Conduct: https://voxpupuli.org/coc/
4+
- Please check that here is no existing issue or PR that addresses your problem.
5+
-->

‎.msync.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
modulesync_config_version: '0.14.1'

‎.rspec

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--format documentation
2+
--color

‎.rubocop.yml

+512
Large diffs are not rendered by default.

‎.travis.yml

+48-15
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,52 @@
1+
---
12
sudo: false
23
language: ruby
3-
rvm:
4-
- 2.1.6
5-
- 2.0.0
6-
- 1.9.3
7-
env:
8-
matrix:
9-
- PUPPET_VERSION=4.3.2 STRICT_VARIABLES=no
10-
- PUPPET_VERSION=3.8.7 STRICT_VARIABLES=no
11-
- PUPPET_VERSION=3.8.7 FUTURE_PARSER=yes TRUSTED_NODE_DATA=yes STRICT_VARIABLES=no
4+
cache: bundler
5+
bundler_args: --without system_tests development
6+
before_install:
7+
- bundle -v
8+
- rm Gemfile.lock || true
9+
- gem update --system
10+
- gem update bundler
11+
- gem --version
12+
- bundle -v
13+
script:
14+
- 'bundle exec rake $CHECK'
1215
matrix:
16+
fast_finish: true
1317
include:
14-
- rvm: 2.1.6
15-
env: PUPPET_VERSION=3.8.7 STRICT_VARIABLES=no
16-
- rvm: 2.2.3
17-
env: PUPPET_VERSION=4.3.2 STRICT_VARIABLES=no
18-
- rvm: 2.3.0
19-
env: PUPPET_VERSION=4.6.1 STRICT_VARIABLES=no
18+
- rvm: 1.9.3
19+
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
20+
- rvm: 1.9.3
21+
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test
22+
- rvm: 2.1.9
23+
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
24+
- rvm: 2.1.9
25+
env: PUPPET_VERSION="~> 4.0" CHECK=test
26+
- rvm: 2.2.5
27+
env: PUPPET_VERSION="~> 4.0" CHECK=test
28+
- rvm: 2.3.1
29+
env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes
30+
- rvm: 2.3.1
31+
env: PUPPET_VERSION="~> 4.0" CHECK=rubocop
32+
- rvm: 2.3.1
33+
env: PUPPET_VERSION="~> 4.0" CHECK=test
34+
- rvm: 2.4.0-preview1
35+
env: PUPPET_VERSION="~> 4.0" CHECK=test
36+
allow_failures:
37+
- rvm: 2.4.0-preview1
38+
notifications:
39+
email: false
40+
deploy:
41+
provider: puppetforge
42+
deploy:
43+
branch: ha-bug-puppet-forge
44+
user: puppet
45+
password:
46+
secure: ""
47+
on:
48+
tags: true
49+
# all_branches is required to use tags
50+
all_branches: true
51+
# Only publish the build marked with "DEPLOY_TO_FORGE"
52+
condition: "$DEPLOY_TO_FORGE = yes"

‎.yardopts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--markup markdown

‎Gemfile

+58-32
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,65 @@
1-
source 'https://rubygems.org'
2-
3-
group :development, :test do
4-
gem 'rake'
5-
gem 'rspec'
6-
gem 'rspec-puppet'
7-
gem 'rspec-puppet-facts'
8-
gem 'puppetlabs_spec_helper'
9-
gem 'puppet-module'
10-
gem 'yard'
11-
gem 'json', '~> 1.0', {"platforms"=>["ruby_18", "ruby_19"]}
12-
gem 'json_pure', '~> 1.0', {"platforms"=>["ruby_18", "ruby_19"]}
13-
gem 'puppet-lint', '~> 2.0'
14-
gem 'puppet-lint-absolute_classname-check'
15-
gem 'puppet-lint-empty_string-check'
16-
gem 'puppet-lint-file_ensure-check'
17-
gem 'puppet-lint-leading_zero-check'
18-
gem 'puppet-lint-param-docs'
19-
gem 'puppet-lint-trailing_comma-check'
20-
gem 'puppet-lint-undef_in_function-check'
21-
gem 'puppet-lint-unquoted_string-check'
22-
gem 'puppet-lint-version_comparison-check'
23-
gem 'metadata-json-lint'
24-
gem 'puppet-blacksmith', '>= 3.1.0'
1+
source ENV['GEM_SOURCE'] || "https://rubygems.org"
2+
3+
def location_for(place, fake_version = nil)
4+
if place =~ /^(git[:@][^#]*)#(.*)/
5+
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
6+
elsif place =~ /^file:\/\/(.*)/
7+
['>= 0', { :path => File.expand_path($1), :require => false }]
8+
else
9+
[place, { :require => false }]
10+
end
2511
end
2612

27-
if facterversion = ENV['FACTER_VERSION']
28-
gem 'facter', facterversion
29-
else
30-
gem 'facter'
13+
group :test do
14+
gem 'puppetlabs_spec_helper', '~> 1.2.2', :require => false
15+
gem 'rspec-puppet', :require => false, :git => 'https://github.com/rodjek/rspec-puppet.git'
16+
gem 'rspec-puppet-facts', :require => false
17+
gem 'rspec-puppet-utils', :require => false
18+
gem 'puppet-lint-absolute_classname-check', :require => false
19+
gem 'puppet-lint-leading_zero-check', :require => false
20+
gem 'puppet-lint-trailing_comma-check', :require => false
21+
gem 'puppet-lint-version_comparison-check', :require => false
22+
gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false
23+
gem 'puppet-lint-unquoted_string-check', :require => false
24+
gem 'puppet-lint-variable_contains_upcase', :require => false
25+
gem 'metadata-json-lint', :require => false
26+
gem 'puppet-blacksmith', :require => false
27+
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git'
28+
gem 'puppet-strings', '~> 0.99.0', :require => false
29+
gem 'rubocop-rspec', '~> 1.6', :require => false if RUBY_VERSION >= '2.3.0'
30+
gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION < '2.0.0'
31+
gem 'mocha', '>= 1.2.1', :require => false
32+
gem 'coveralls', :require => false if RUBY_VERSION >= '2.0.0'
3133
end
3234

33-
if puppetversion = ENV['PUPPET_VERSION']
34-
gem 'puppet', puppetversion
35+
group :development do
36+
gem 'travis', :require => false
37+
gem 'travis-lint', :require => false
38+
gem 'guard-rake', :require => false
39+
end
40+
41+
group :system_tests do
42+
if beaker_version = ENV['BEAKER_VERSION']
43+
gem 'beaker', *location_for(beaker_version)
44+
end
45+
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
46+
gem 'beaker-rspec', *location_for(beaker_rspec_version)
47+
else
48+
gem 'beaker-rspec', :require => false
49+
end
50+
gem 'serverspec', :require => false
51+
gem 'beaker-puppet_install_helper', :require => false
52+
end
53+
54+
55+
56+
if facterversion = ENV['FACTER_GEM_VERSION']
57+
gem 'facter', facterversion.to_s, :require => false, :groups => [:test]
3558
else
36-
gem 'puppet'
59+
gem 'facter', :require => false, :groups => [:test]
3760
end
3861

39-
# vim:ft=ruby
62+
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 4.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
63+
gem 'puppet', puppetversion, :require => false, :groups => [:test]
64+
65+
# vim: syntax=ruby

‎Rakefile

+27-17
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
11
require 'puppetlabs_spec_helper/rake_tasks'
2-
require 'puppet-lint/tasks/puppet-lint'
2+
require 'puppet_blacksmith/rake_tasks'
3+
require 'voxpupuli/release/rake_tasks'
4+
require 'puppet-strings/tasks'
35

4-
# blacksmith is broken with ruby 1.8.7
5-
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.8.7')
6-
# blacksmith isn't always present, e.g. on Travis with --without development
7-
begin
8-
require 'puppet_blacksmith/rake_tasks'
9-
Blacksmith::RakeTask.new do |t|
10-
t.tag_pattern = "%s"
11-
end
12-
rescue LoadError
13-
end
14-
end
6+
PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}'
7+
PuppetLint.configuration.fail_on_warnings = true
8+
PuppetLint.configuration.send('relative')
9+
PuppetLint.configuration.send('disable_140chars')
10+
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
11+
PuppetLint.configuration.send('disable_documentation')
12+
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
1513

16-
Rake::Task['lint'].clear
14+
exclude_paths = %w(
15+
pkg/**/*
16+
vendor/**/*
17+
.vendor/**/*
18+
spec/**/*
19+
)
20+
PuppetLint.configuration.ignore_paths = exclude_paths
21+
PuppetSyntax.exclude_paths = exclude_paths
1722

18-
PuppetLint::RakeTask.new :lint do |config|
19-
config.pattern = 'manifests/**/*.pp'
20-
config.fail_on_warnings = true
23+
desc 'Run acceptance tests'
24+
RSpec::Core::RakeTask.new(:acceptance) do |t|
25+
t.pattern = 'spec/acceptance'
2126
end
2227

23-
task :default => [:validate, :lint, :spec]
28+
desc 'Run tests metadata_lint, release_checks'
29+
task test: [
30+
:metadata_lint,
31+
:release_checks,
32+
]
33+
# vim: syntax=ruby
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
centos-511-x64:
7+
roles:
8+
- master
9+
platform: el-5-x86_64
10+
box: puppetlabs/centos-5.11-64-nocm
11+
hypervisor: vagrant
12+
CONFIG:
13+
type: foss
14+
...
15+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
centos-66-x64:
7+
roles:
8+
- master
9+
- database
10+
- dashboard
11+
platform: el-6-x86_64
12+
box: puppetlabs/centos-6.6-64-puppet-enterprise
13+
hypervisor: vagrant
14+
CONFIG:
15+
type: pe
16+
...
17+
# vim: syntax=yaml
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
centos-66-x64:
7+
roles:
8+
- master
9+
platform: el-6-x86_64
10+
box: puppetlabs/centos-6.6-64-nocm
11+
hypervisor: vagrant
12+
CONFIG:
13+
type: foss
14+
...
15+
# vim: syntax=yaml
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
centos-72-x64:
7+
roles:
8+
- master
9+
platform: el-7-x86_64
10+
box: puppetlabs/centos-7.2-64-nocm
11+
hypervisor: vagrant
12+
CONFIG:
13+
type: foss
14+
...
15+
# vim: syntax=yaml
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
debian-78-x64:
7+
roles:
8+
- master
9+
platform: debian-7-amd64
10+
box: puppetlabs/debian-7.8-64-nocm
11+
hypervisor: vagrant
12+
CONFIG:
13+
type: foss
14+
...
15+
# vim: syntax=yaml
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
debian-82-x64:
7+
roles:
8+
- master
9+
platform: debian-8-amd64
10+
box: puppetlabs/debian-8.2-64-nocm
11+
hypervisor: vagrant
12+
CONFIG:
13+
type: foss
14+
...
15+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
centos-5-x64:
7+
default_apply_opts:
8+
order: random
9+
strict_variables:
10+
platform: el-5-x86_64
11+
hypervisor : docker
12+
image: tianon/centos:5.10
13+
docker_preserve_image: true
14+
docker_cmd: '["/sbin/init"]'
15+
docker_image_commands:
16+
- 'yum install -y crontabs tar wget which'
17+
- 'sed -i -e "/mingetty/d" /etc/inittab'
18+
CONFIG:
19+
type: aio
20+
log_level: debug
21+
...
22+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
centos-6-x64:
7+
default_apply_opts:
8+
order: random
9+
strict_variables:
10+
platform: el-6-x86_64
11+
hypervisor : docker
12+
image: centos:6
13+
docker_preserve_image: true
14+
docker_cmd: '["/sbin/init"]'
15+
docker_image_commands:
16+
- 'rm -rf /var/run/network/*'
17+
- 'yum install -y crontabs tar wget'
18+
- 'rm /etc/init/tty.conf'
19+
CONFIG:
20+
type: aio
21+
log_level: debug
22+
...
23+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
centos-7-x64:
7+
default_apply_opts:
8+
order: random
9+
strict_variables:
10+
platform: el-7-x86_64
11+
hypervisor : docker
12+
image: centos:7
13+
docker_preserve_image: true
14+
docker_cmd: '["/usr/sbin/init"]'
15+
docker_image_commands:
16+
- 'yum install -y crontabs tar wget iproute'
17+
CONFIG:
18+
type: aio
19+
log_level: debug
20+
...
21+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
debian-7-x64:
7+
default_apply_opts:
8+
order: random
9+
strict_variables:
10+
platform: debian-7-amd64
11+
hypervisor : docker
12+
image: debian:7
13+
docker_preserve_image: true
14+
docker_cmd: '["/sbin/init"]'
15+
docker_image_commands:
16+
- 'apt-get install -y cron locales-all net-tools wget'
17+
CONFIG:
18+
type: aio
19+
log_level: debug
20+
...
21+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
debian-8-x64:
7+
default_apply_opts:
8+
order: random
9+
strict_variables:
10+
platform: debian-8-amd64
11+
hypervisor : docker
12+
image: debian:8
13+
docker_preserve_image: true
14+
docker_cmd: '["/sbin/init"]'
15+
docker_image_commands:
16+
- 'apt-get install -y cron locales-all net-tools wget'
17+
- 'rm -f /usr/sbin/policy-rc.d'
18+
CONFIG:
19+
type: aio
20+
log_level: debug
21+
...
22+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
ubuntu-1204-x64:
7+
default_apply_opts:
8+
order: random
9+
strict_variables:
10+
platform: ubuntu-12.04-amd64
11+
hypervisor : docker
12+
image: ubuntu:12.04
13+
docker_preserve_image: true
14+
docker_cmd: '["/sbin/init"]'
15+
docker_image_commands:
16+
- 'apt-get install -y net-tools wget'
17+
- 'locale-gen en_US.UTF-8'
18+
CONFIG:
19+
type: aio
20+
log_level: debug
21+
...
22+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
ubuntu-1404-x64:
7+
default_apply_opts:
8+
order: random
9+
strict_variables:
10+
platform: ubuntu-14.04-amd64
11+
hypervisor : docker
12+
image: ubuntu:14.04
13+
docker_preserve_image: true
14+
docker_cmd: '["/sbin/init"]'
15+
docker_image_commands:
16+
- 'rm /usr/sbin/policy-rc.d'
17+
- 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl'
18+
- 'apt-get install -y net-tools wget'
19+
- 'locale-gen en_US.UTF-8'
20+
CONFIG:
21+
type: aio
22+
log_level: debug
23+
...
24+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
ubuntu-1604-x64:
7+
default_apply_opts:
8+
order: random
9+
strict_variables:
10+
platform: ubuntu-16.04-amd64
11+
hypervisor : docker
12+
image: ubuntu:16.04
13+
docker_preserve_image: true
14+
docker_cmd: '["/sbin/init"]'
15+
docker_image_commands:
16+
- 'apt-get install -y net-tools wget'
17+
- 'locale-gen en_US.UTF-8'
18+
CONFIG:
19+
type: aio
20+
log_level: debug
21+
...
22+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
ubuntu-server-1204-x64:
7+
roles:
8+
- master
9+
platform: ubuntu-12.04-amd64
10+
box: puppetlabs/ubuntu-12.04-64-nocm
11+
hypervisor: vagrant
12+
CONFIG:
13+
type: foss
14+
...
15+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
ubuntu-server-1404-x64:
7+
roles:
8+
- master
9+
platform: ubuntu-14.04-amd64
10+
box: puppetlabs/ubuntu-14.04-64-nocm
11+
hypervisor: vagrant
12+
CONFIG:
13+
type: foss
14+
...
15+
# vim: syntax=yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# This file is managed via modulesync
3+
# https://github.com/voxpupuli/modulesync
4+
# https://github.com/voxpupuli/modulesync_config
5+
HOSTS:
6+
ubuntu-server-1604-x64:
7+
roles:
8+
- master
9+
platform: ubuntu-16.04-amd64
10+
box: puppetlabs/ubuntu-16.04-64-nocm
11+
hypervisor: vagrant
12+
CONFIG:
13+
type: foss
14+
...
15+
# vim: syntax=yaml

‎spec/classes/coverage_spec.rb

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
require 'rspec-puppet'
2+
3+
at_exit { RSpec::Puppet::Coverage.report! }
4+
# vim: syntax=ruby

‎spec/default_facts.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
concat_basedir: "/tmp"
3+
ipaddress: "172.16.254.254"
4+
is_pe: false
5+
macaddress: "AA:AA:AA:AA:AA:AA"
6+
selinux_config_mode: "disabled"

‎spec/spec_helper.rb

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
require 'puppetlabs_spec_helper/module_spec_helper'
2-
32
require 'rspec-puppet-facts'
43
include RspecPuppetFacts
4+
5+
unless RUBY_VERSION =~ %r{^1.9}
6+
require 'coveralls'
7+
Coveralls.wear!
8+
end
9+
10+
RSpec.configure do |c|
11+
default_facts = {
12+
puppetversion: Puppet.version,
13+
facterversion: Facter.version
14+
}
15+
default_facts.merge!(YAML.load(File.read(File.expand_path('../default_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_facts.yml', __FILE__))
16+
default_facts.merge!(YAML.load(File.read(File.expand_path('../default_module_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_module_facts.yml', __FILE__))
17+
c.default_facts = default_facts
18+
end
19+
20+
# vim: syntax=ruby

0 commit comments

Comments
 (0)
Please sign in to comment.