adding in collector modules
This commit is contained in:
		
							parent
							
								
									7a585cf824
								
							
						
					
					
						commit
						b2b70e7660
					
				@ -33,6 +33,8 @@ mod 'puppet-staging', '3.2.0'
 | 
				
			|||||||
mod 'puppetlabs-reboot', '2.4.0'
 | 
					mod 'puppetlabs-reboot', '2.4.0'
 | 
				
			||||||
mod 'albatrossflavour-os_patching', '0.13.0'
 | 
					mod 'albatrossflavour-os_patching', '0.13.0'
 | 
				
			||||||
mod 'fervid-secure_linux_cis', '2.1.10'
 | 
					mod 'fervid-secure_linux_cis', '2.1.10'
 | 
				
			||||||
 | 
					mod 'puppetlabs-puppet_metrics_collector', '5.3.0'
 | 
				
			||||||
 | 
					mod 'puppetlabs-puppet_metrics_dashboard', '2.0.1'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Modules from Git
 | 
					# Modules from Git
 | 
				
			||||||
# Examples: https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#examples
 | 
					# Examples: https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#examples
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										6
									
								
								site-modules/profile/.fixtures.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								site-modules/profile/.fixtures.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					# This file can be used to install module dependencies for unit testing
 | 
				
			||||||
 | 
					# See https://github.com/puppetlabs/puppetlabs_spec_helper#using-fixtures for details
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					fixtures:
 | 
				
			||||||
 | 
					  forge_modules:
 | 
				
			||||||
 | 
					#     stdlib: "puppetlabs/stdlib"
 | 
				
			||||||
							
								
								
									
										5
									
								
								site-modules/profile/.gitattributes
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								site-modules/profile/.gitattributes
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					*.rb eol=lf
 | 
				
			||||||
 | 
					*.erb eol=lf
 | 
				
			||||||
 | 
					*.pp eol=lf
 | 
				
			||||||
 | 
					*.sh eol=lf
 | 
				
			||||||
 | 
					*.epp eol=lf
 | 
				
			||||||
							
								
								
									
										27
									
								
								site-modules/profile/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								site-modules/profile/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					.git/
 | 
				
			||||||
 | 
					.*.sw[op]
 | 
				
			||||||
 | 
					.metadata
 | 
				
			||||||
 | 
					.yardoc
 | 
				
			||||||
 | 
					.yardwarns
 | 
				
			||||||
 | 
					*.iml
 | 
				
			||||||
 | 
					/.bundle/
 | 
				
			||||||
 | 
					/.idea/
 | 
				
			||||||
 | 
					/.vagrant/
 | 
				
			||||||
 | 
					/coverage/
 | 
				
			||||||
 | 
					/bin/
 | 
				
			||||||
 | 
					/doc/
 | 
				
			||||||
 | 
					/Gemfile.local
 | 
				
			||||||
 | 
					/Gemfile.lock
 | 
				
			||||||
 | 
					/junit/
 | 
				
			||||||
 | 
					/log/
 | 
				
			||||||
 | 
					/pkg/
 | 
				
			||||||
 | 
					/spec/fixtures/manifests/
 | 
				
			||||||
 | 
					/spec/fixtures/modules/
 | 
				
			||||||
 | 
					/tmp/
 | 
				
			||||||
 | 
					/vendor/
 | 
				
			||||||
 | 
					/convert_report.txt
 | 
				
			||||||
 | 
					/update_report.txt
 | 
				
			||||||
 | 
					.DS_Store
 | 
				
			||||||
 | 
					.project
 | 
				
			||||||
 | 
					.envrc
 | 
				
			||||||
 | 
					/inventory.yaml
 | 
				
			||||||
							
								
								
									
										41
									
								
								site-modules/profile/.gitlab-ci.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								site-modules/profile/.gitlab-ci.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,41 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					stages:
 | 
				
			||||||
 | 
					  - syntax
 | 
				
			||||||
 | 
					  - unit
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cache:
 | 
				
			||||||
 | 
					  paths:
 | 
				
			||||||
 | 
					    - vendor/bundle
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					before_script:
 | 
				
			||||||
 | 
					  - bundle -v
 | 
				
			||||||
 | 
					  - rm Gemfile.lock || true
 | 
				
			||||||
 | 
					  - gem update --system $RUBYGEMS_VERSION
 | 
				
			||||||
 | 
					  - gem --version
 | 
				
			||||||
 | 
					  - bundle -v
 | 
				
			||||||
 | 
					  - bundle install --without system_tests --path vendor/bundle --jobs $(nproc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.5.3-Puppet ~> 6:
 | 
				
			||||||
 | 
					  stage: syntax
 | 
				
			||||||
 | 
					  image: ruby:2.5.3
 | 
				
			||||||
 | 
					  script:
 | 
				
			||||||
 | 
					    - bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
 | 
				
			||||||
 | 
					  variables:
 | 
				
			||||||
 | 
					    PUPPET_GEM_VERSION: '~> 6'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					parallel_spec-Ruby 2.5.3-Puppet ~> 6:
 | 
				
			||||||
 | 
					  stage: unit
 | 
				
			||||||
 | 
					  image: ruby:2.5.3
 | 
				
			||||||
 | 
					  script:
 | 
				
			||||||
 | 
					    - bundle exec rake parallel_spec
 | 
				
			||||||
 | 
					  variables:
 | 
				
			||||||
 | 
					    PUPPET_GEM_VERSION: '~> 6'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					parallel_spec-Ruby 2.4.5-Puppet ~> 5:
 | 
				
			||||||
 | 
					  stage: unit
 | 
				
			||||||
 | 
					  image: ruby:2.4.5
 | 
				
			||||||
 | 
					  script:
 | 
				
			||||||
 | 
					    - bundle exec rake parallel_spec
 | 
				
			||||||
 | 
					  variables:
 | 
				
			||||||
 | 
					    PUPPET_GEM_VERSION: '~> 5'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										42
									
								
								site-modules/profile/.pdkignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								site-modules/profile/.pdkignore
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,42 @@
 | 
				
			|||||||
 | 
					.git/
 | 
				
			||||||
 | 
					.*.sw[op]
 | 
				
			||||||
 | 
					.metadata
 | 
				
			||||||
 | 
					.yardoc
 | 
				
			||||||
 | 
					.yardwarns
 | 
				
			||||||
 | 
					*.iml
 | 
				
			||||||
 | 
					/.bundle/
 | 
				
			||||||
 | 
					/.idea/
 | 
				
			||||||
 | 
					/.vagrant/
 | 
				
			||||||
 | 
					/coverage/
 | 
				
			||||||
 | 
					/bin/
 | 
				
			||||||
 | 
					/doc/
 | 
				
			||||||
 | 
					/Gemfile.local
 | 
				
			||||||
 | 
					/Gemfile.lock
 | 
				
			||||||
 | 
					/junit/
 | 
				
			||||||
 | 
					/log/
 | 
				
			||||||
 | 
					/pkg/
 | 
				
			||||||
 | 
					/spec/fixtures/manifests/
 | 
				
			||||||
 | 
					/spec/fixtures/modules/
 | 
				
			||||||
 | 
					/tmp/
 | 
				
			||||||
 | 
					/vendor/
 | 
				
			||||||
 | 
					/convert_report.txt
 | 
				
			||||||
 | 
					/update_report.txt
 | 
				
			||||||
 | 
					.DS_Store
 | 
				
			||||||
 | 
					.project
 | 
				
			||||||
 | 
					.envrc
 | 
				
			||||||
 | 
					/inventory.yaml
 | 
				
			||||||
 | 
					/appveyor.yml
 | 
				
			||||||
 | 
					/.fixtures.yml
 | 
				
			||||||
 | 
					/Gemfile
 | 
				
			||||||
 | 
					/.gitattributes
 | 
				
			||||||
 | 
					/.gitignore
 | 
				
			||||||
 | 
					/.gitlab-ci.yml
 | 
				
			||||||
 | 
					/.pdkignore
 | 
				
			||||||
 | 
					/Rakefile
 | 
				
			||||||
 | 
					/rakelib/
 | 
				
			||||||
 | 
					/.rspec
 | 
				
			||||||
 | 
					/.rubocop.yml
 | 
				
			||||||
 | 
					/.travis.yml
 | 
				
			||||||
 | 
					/.yardopts
 | 
				
			||||||
 | 
					/spec/
 | 
				
			||||||
 | 
					/.vscode/
 | 
				
			||||||
							
								
								
									
										1
									
								
								site-modules/profile/.puppet-lint.rc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								site-modules/profile/.puppet-lint.rc
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					--relative
 | 
				
			||||||
							
								
								
									
										2
									
								
								site-modules/profile/.rspec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								site-modules/profile/.rspec
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					--color
 | 
				
			||||||
 | 
					--format documentation
 | 
				
			||||||
							
								
								
									
										133
									
								
								site-modules/profile/.rubocop.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										133
									
								
								site-modules/profile/.rubocop.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,133 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					require:
 | 
				
			||||||
 | 
					- rubocop-rspec
 | 
				
			||||||
 | 
					- rubocop-i18n
 | 
				
			||||||
 | 
					AllCops:
 | 
				
			||||||
 | 
					  DisplayCopNames: true
 | 
				
			||||||
 | 
					  TargetRubyVersion: '2.1'
 | 
				
			||||||
 | 
					  Include:
 | 
				
			||||||
 | 
					  - "./**/*.rb"
 | 
				
			||||||
 | 
					  Exclude:
 | 
				
			||||||
 | 
					  - bin/*
 | 
				
			||||||
 | 
					  - ".vendor/**/*"
 | 
				
			||||||
 | 
					  - "**/Gemfile"
 | 
				
			||||||
 | 
					  - "**/Rakefile"
 | 
				
			||||||
 | 
					  - pkg/**/*
 | 
				
			||||||
 | 
					  - spec/fixtures/**/*
 | 
				
			||||||
 | 
					  - vendor/**/*
 | 
				
			||||||
 | 
					  - "**/Puppetfile"
 | 
				
			||||||
 | 
					  - "**/Vagrantfile"
 | 
				
			||||||
 | 
					  - "**/Guardfile"
 | 
				
			||||||
 | 
					Metrics/LineLength:
 | 
				
			||||||
 | 
					  Description: People have wide screens, use them.
 | 
				
			||||||
 | 
					  Max: 200
 | 
				
			||||||
 | 
					GetText:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					GetText/DecorateString:
 | 
				
			||||||
 | 
					  Description: We don't want to decorate test output.
 | 
				
			||||||
 | 
					  Exclude:
 | 
				
			||||||
 | 
					  - spec/**/*
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					RSpec/BeforeAfterAll:
 | 
				
			||||||
 | 
					  Description: Beware of using after(:all) as it may cause state to leak between tests.
 | 
				
			||||||
 | 
					    A necessary evil in acceptance testing.
 | 
				
			||||||
 | 
					  Exclude:
 | 
				
			||||||
 | 
					  - spec/acceptance/**/*.rb
 | 
				
			||||||
 | 
					RSpec/HookArgument:
 | 
				
			||||||
 | 
					  Description: Prefer explicit :each argument, matching existing module's style
 | 
				
			||||||
 | 
					  EnforcedStyle: each
 | 
				
			||||||
 | 
					Style/BlockDelimiters:
 | 
				
			||||||
 | 
					  Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
 | 
				
			||||||
 | 
					    be consistent then.
 | 
				
			||||||
 | 
					  EnforcedStyle: braces_for_chaining
 | 
				
			||||||
 | 
					Style/ClassAndModuleChildren:
 | 
				
			||||||
 | 
					  Description: Compact style reduces the required amount of indentation.
 | 
				
			||||||
 | 
					  EnforcedStyle: compact
 | 
				
			||||||
 | 
					Style/EmptyElse:
 | 
				
			||||||
 | 
					  Description: Enforce against empty else clauses, but allow `nil` for clarity.
 | 
				
			||||||
 | 
					  EnforcedStyle: empty
 | 
				
			||||||
 | 
					Style/FormatString:
 | 
				
			||||||
 | 
					  Description: Following the main puppet project's style, prefer the % format format.
 | 
				
			||||||
 | 
					  EnforcedStyle: percent
 | 
				
			||||||
 | 
					Style/FormatStringToken:
 | 
				
			||||||
 | 
					  Description: Following the main puppet project's style, prefer the simpler template
 | 
				
			||||||
 | 
					    tokens over annotated ones.
 | 
				
			||||||
 | 
					  EnforcedStyle: template
 | 
				
			||||||
 | 
					Style/Lambda:
 | 
				
			||||||
 | 
					  Description: Prefer the keyword for easier discoverability.
 | 
				
			||||||
 | 
					  EnforcedStyle: literal
 | 
				
			||||||
 | 
					Style/RegexpLiteral:
 | 
				
			||||||
 | 
					  Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
 | 
				
			||||||
 | 
					  EnforcedStyle: percent_r
 | 
				
			||||||
 | 
					Style/TernaryParentheses:
 | 
				
			||||||
 | 
					  Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
 | 
				
			||||||
 | 
					    on complex expressions for better readability, but seriously consider breaking
 | 
				
			||||||
 | 
					    it up.
 | 
				
			||||||
 | 
					  EnforcedStyle: require_parentheses_when_complex
 | 
				
			||||||
 | 
					Style/TrailingCommaInArguments:
 | 
				
			||||||
 | 
					  Description: Prefer always trailing comma on multiline argument lists. This makes
 | 
				
			||||||
 | 
					    diffs, and re-ordering nicer.
 | 
				
			||||||
 | 
					  EnforcedStyleForMultiline: comma
 | 
				
			||||||
 | 
					Style/TrailingCommaInLiteral:
 | 
				
			||||||
 | 
					  Description: Prefer always trailing comma on multiline literals. This makes diffs,
 | 
				
			||||||
 | 
					    and re-ordering nicer.
 | 
				
			||||||
 | 
					  EnforcedStyleForMultiline: comma
 | 
				
			||||||
 | 
					Style/SymbolArray:
 | 
				
			||||||
 | 
					  Description: Using percent style obscures symbolic intent of array's contents.
 | 
				
			||||||
 | 
					  EnforcedStyle: brackets
 | 
				
			||||||
 | 
					RSpec/MessageSpies:
 | 
				
			||||||
 | 
					  EnforcedStyle: receive
 | 
				
			||||||
 | 
					Style/Documentation:
 | 
				
			||||||
 | 
					  Exclude:
 | 
				
			||||||
 | 
					  - lib/puppet/parser/functions/**/*
 | 
				
			||||||
 | 
					  - spec/**/*
 | 
				
			||||||
 | 
					Style/WordArray:
 | 
				
			||||||
 | 
					  EnforcedStyle: brackets
 | 
				
			||||||
 | 
					Style/CollectionMethods:
 | 
				
			||||||
 | 
					  Enabled: true
 | 
				
			||||||
 | 
					Style/MethodCalledOnDoEndBlock:
 | 
				
			||||||
 | 
					  Enabled: true
 | 
				
			||||||
 | 
					Style/StringMethods:
 | 
				
			||||||
 | 
					  Enabled: true
 | 
				
			||||||
 | 
					GetText/DecorateFunctionMessage:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					GetText/DecorateStringFormattingUsingInterpolation:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					GetText/DecorateStringFormattingUsingPercent:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Layout/EndOfLine:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Layout/IndentHeredoc:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Metrics/AbcSize:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Metrics/BlockLength:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Metrics/ClassLength:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Metrics/CyclomaticComplexity:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Metrics/MethodLength:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Metrics/ModuleLength:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Metrics/ParameterLists:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Metrics/PerceivedComplexity:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					RSpec/DescribeClass:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					RSpec/ExampleLength:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					RSpec/MessageExpectation:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					RSpec/MultipleExpectations:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					RSpec/NestedGroups:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Style/AsciiComments:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Style/IfUnlessModifier:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					Style/SymbolProc:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
							
								
								
									
										45
									
								
								site-modules/profile/.travis.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								site-modules/profile/.travis.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,45 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					dist: xenial
 | 
				
			||||||
 | 
					language: ruby
 | 
				
			||||||
 | 
					cache: bundler
 | 
				
			||||||
 | 
					before_install:
 | 
				
			||||||
 | 
					  - bundle -v
 | 
				
			||||||
 | 
					  - rm -f Gemfile.lock
 | 
				
			||||||
 | 
					  - gem update --system $RUBYGEMS_VERSION
 | 
				
			||||||
 | 
					  - gem --version
 | 
				
			||||||
 | 
					  - bundle -v
 | 
				
			||||||
 | 
					script:
 | 
				
			||||||
 | 
					  - 'bundle exec rake $CHECK'
 | 
				
			||||||
 | 
					bundler_args: --without system_tests
 | 
				
			||||||
 | 
					rvm:
 | 
				
			||||||
 | 
					  - 2.5.3
 | 
				
			||||||
 | 
					stages:
 | 
				
			||||||
 | 
					  - static
 | 
				
			||||||
 | 
					  - spec
 | 
				
			||||||
 | 
					  - acceptance
 | 
				
			||||||
 | 
					  -
 | 
				
			||||||
 | 
					    if: tag =~ ^v\d
 | 
				
			||||||
 | 
					    name: deploy
 | 
				
			||||||
 | 
					matrix:
 | 
				
			||||||
 | 
					  fast_finish: true
 | 
				
			||||||
 | 
					  include:
 | 
				
			||||||
 | 
					    -
 | 
				
			||||||
 | 
					      env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
 | 
				
			||||||
 | 
					      stage: static
 | 
				
			||||||
 | 
					    -
 | 
				
			||||||
 | 
					      env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
 | 
				
			||||||
 | 
					      rvm: 2.4.5
 | 
				
			||||||
 | 
					      stage: spec
 | 
				
			||||||
 | 
					    -
 | 
				
			||||||
 | 
					      env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
 | 
				
			||||||
 | 
					      rvm: 2.5.3
 | 
				
			||||||
 | 
					      stage: spec
 | 
				
			||||||
 | 
					    -
 | 
				
			||||||
 | 
					      env: DEPLOY_TO_FORGE=yes
 | 
				
			||||||
 | 
					      stage: deploy
 | 
				
			||||||
 | 
					branches:
 | 
				
			||||||
 | 
					  only:
 | 
				
			||||||
 | 
					    - master
 | 
				
			||||||
 | 
					    - /^v\d/
 | 
				
			||||||
 | 
					notifications:
 | 
				
			||||||
 | 
					  email: false
 | 
				
			||||||
							
								
								
									
										6
									
								
								site-modules/profile/.vscode/extensions.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								site-modules/profile/.vscode/extensions.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					  "recommendations": [
 | 
				
			||||||
 | 
					    "jpogran.puppet-vscode",
 | 
				
			||||||
 | 
					    "rebornix.Ruby"
 | 
				
			||||||
 | 
					  ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										1
									
								
								site-modules/profile/.yardopts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								site-modules/profile/.yardopts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					--markup markdown
 | 
				
			||||||
							
								
								
									
										11
									
								
								site-modules/profile/CHANGELOG.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								site-modules/profile/CHANGELOG.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					# Changelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					All notable changes to this project will be documented in this file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Release 0.1.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Features**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Bugfixes**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Known Issues**
 | 
				
			||||||
							
								
								
									
										72
									
								
								site-modules/profile/Gemfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								site-modules/profile/Gemfile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,72 @@
 | 
				
			|||||||
 | 
					source ENV['GEM_SOURCE'] || 'https://rubygems.org'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def location_for(place_or_version, fake_version = nil)
 | 
				
			||||||
 | 
					  git_url_regex = %r{\A(?<url>(https?|git)[:@][^#]*)(#(?<branch>.*))?}
 | 
				
			||||||
 | 
					  file_url_regex = %r{\Afile:\/\/(?<path>.*)}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if place_or_version && (git_url = place_or_version.match(git_url_regex))
 | 
				
			||||||
 | 
					    [fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact
 | 
				
			||||||
 | 
					  elsif place_or_version && (file_url = place_or_version.match(file_url_regex))
 | 
				
			||||||
 | 
					    ['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    [place_or_version, { require: false }]
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
 | 
				
			||||||
 | 
					minor_version = ruby_version_segments[0..1].join('.')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					group :development do
 | 
				
			||||||
 | 
					  gem "fast_gettext", '1.1.0',                                   require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
 | 
				
			||||||
 | 
					  gem "fast_gettext",                                            require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
 | 
				
			||||||
 | 
					  gem "json_pure", '<= 2.0.1',                                   require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
 | 
				
			||||||
 | 
					  gem "json", '= 1.8.1',                                         require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
 | 
				
			||||||
 | 
					  gem "json", '= 2.0.4',                                         require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
 | 
				
			||||||
 | 
					  gem "json", '= 2.1.0',                                         require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
 | 
				
			||||||
 | 
					  gem "rb-readline", '= 0.5.5',                                  require: false, platforms: [:mswin, :mingw, :x64_mingw]
 | 
				
			||||||
 | 
					  gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
 | 
				
			||||||
 | 
					  gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3',     require: false, platforms: [:ruby]
 | 
				
			||||||
 | 
					  gem "puppet-module-win-default-r#{minor_version}", '~> 0.3',   require: false, platforms: [:mswin, :mingw, :x64_mingw]
 | 
				
			||||||
 | 
					  gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3',       require: false, platforms: [:mswin, :mingw, :x64_mingw]
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					puppet_version = ENV['PUPPET_GEM_VERSION']
 | 
				
			||||||
 | 
					facter_version = ENV['FACTER_GEM_VERSION']
 | 
				
			||||||
 | 
					hiera_version = ENV['HIERA_GEM_VERSION']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					gems = {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					gems['puppet'] = location_for(puppet_version)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# If facter or hiera versions have been specified via the environment
 | 
				
			||||||
 | 
					# variables
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					gems['facter'] = location_for(facter_version) if facter_version
 | 
				
			||||||
 | 
					gems['hiera'] = location_for(hiera_version) if hiera_version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if Gem.win_platform? && puppet_version =~ %r{^(file:///|git://)}
 | 
				
			||||||
 | 
					  # If we're using a Puppet gem on Windows which handles its own win32-xxx gem
 | 
				
			||||||
 | 
					  # dependencies (>= 3.5.0), set the maximum versions (see PUP-6445).
 | 
				
			||||||
 | 
					  gems['win32-dir'] =      ['<= 0.4.9', require: false]
 | 
				
			||||||
 | 
					  gems['win32-eventlog'] = ['<= 0.6.5', require: false]
 | 
				
			||||||
 | 
					  gems['win32-process'] =  ['<= 0.7.5', require: false]
 | 
				
			||||||
 | 
					  gems['win32-security'] = ['<= 0.2.5', require: false]
 | 
				
			||||||
 | 
					  gems['win32-service'] =  ['0.8.8', require: false]
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					gems.each do |gem_name, gem_params|
 | 
				
			||||||
 | 
					  gem gem_name, *gem_params
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Evaluate Gemfile.local and ~/.gemfile if they exist
 | 
				
			||||||
 | 
					extra_gemfiles = [
 | 
				
			||||||
 | 
					  "#{__FILE__}.local",
 | 
				
			||||||
 | 
					  File.join(Dir.home, '.gemfile'),
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extra_gemfiles.each do |gemfile|
 | 
				
			||||||
 | 
					  if File.file?(gemfile) && File.readable?(gemfile)
 | 
				
			||||||
 | 
					    eval(File.read(gemfile), binding)
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					# vim: syntax=ruby
 | 
				
			||||||
							
								
								
									
										87
									
								
								site-modules/profile/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								site-modules/profile/README.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,87 @@
 | 
				
			|||||||
 | 
					# profile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Welcome to your new module. A short overview of the generated parts can be found in the PDK documentation at https://puppet.com/pdk/latest/pdk_generating_modules.html .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The README template below provides a starting point with details about what information to include in your README.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### Table of Contents
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. [Description](#description)
 | 
				
			||||||
 | 
					2. [Setup - The basics of getting started with profile](#setup)
 | 
				
			||||||
 | 
					    * [What profile affects](#what-profile-affects)
 | 
				
			||||||
 | 
					    * [Setup requirements](#setup-requirements)
 | 
				
			||||||
 | 
					    * [Beginning with profile](#beginning-with-profile)
 | 
				
			||||||
 | 
					3. [Usage - Configuration options and additional functionality](#usage)
 | 
				
			||||||
 | 
					4. [Limitations - OS compatibility, etc.](#limitations)
 | 
				
			||||||
 | 
					5. [Development - Guide for contributing to the module](#development)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Description
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Briefly tell users why they might want to use your module. Explain what your module does and what kind of problems users can solve with it.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This should be a fairly short description helps the user decide if your module is what they want.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Setup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### What profile affects **OPTIONAL**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If it's obvious what your module touches, you can skip this section. For example, folks can probably figure out that your mysql_instance module affects their MySQL instances.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If there's more that they should know about, though, this is the place to mention:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Files, packages, services, or operations that the module will alter, impact, or execute.
 | 
				
			||||||
 | 
					* Dependencies that your module automatically installs.
 | 
				
			||||||
 | 
					* Warnings or other important notices.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Setup Requirements **OPTIONAL**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If your module requires anything extra before setting up (pluginsync enabled, another module, etc.), mention it here.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If your most recent release breaks compatibility or requires particular steps for upgrading, you might want to include an additional "Upgrading" section here.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Beginning with profile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The very basic steps needed for a user to get the module up and running. This can include setup steps, if necessary, or it can be an example of the most basic use of the module.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Usage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Include usage examples for common use cases in the **Usage** section. Show your users how to use your module to solve problems, and be sure to include code examples. Include three to five examples of the most important or common tasks a user can accomplish with your module. Show users how to accomplish more complex tasks that involve different types, classes, and functions working in tandem.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Reference
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This section is deprecated. Instead, add reference information to your code as Puppet Strings comments, and then use Strings to generate a REFERENCE.md in your module. For details on how to add code comments and generate documentation with Strings, see the Puppet Strings [documentation](https://puppet.com/docs/puppet/latest/puppet_strings.html) and [style guide](https://puppet.com/docs/puppet/latest/puppet_strings_style.html)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If you aren't ready to use Strings yet, manually create a REFERENCE.md in the root of your module directory and list out each of your module's classes, defined types, facts, functions, Puppet tasks, task plans, and resource types and providers, along with the parameters for each.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For each element (class, defined type, function, and so on), list:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * The data type, if applicable.
 | 
				
			||||||
 | 
					  * A description of what the element does.
 | 
				
			||||||
 | 
					  * Valid values, if the data type doesn't make it obvious.
 | 
				
			||||||
 | 
					  * Default value, if any.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					### `pet::cat`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### Parameters
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##### `meow`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Enables vocalization in your cat. Valid options: 'string'.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Default: 'medium-loud'.
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Limitations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					In the Limitations section, list any incompatibilities, known issues, or other warnings.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Development
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					In the Development section, tell other users the ground rules for contributing to your project and how they should submit their work.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Release Notes/Contributors/Etc. **Optional**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If you aren't using changelog, put your release notes here (though you should consider using changelog). You can also add any additional sections you feel are necessary or important to include here. Please use the `## ` header.
 | 
				
			||||||
							
								
								
									
										86
									
								
								site-modules/profile/Rakefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										86
									
								
								site-modules/profile/Rakefile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,86 @@
 | 
				
			|||||||
 | 
					require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
 | 
				
			||||||
 | 
					require 'puppetlabs_spec_helper/rake_tasks'
 | 
				
			||||||
 | 
					require 'puppet-syntax/tasks/puppet-syntax'
 | 
				
			||||||
 | 
					require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
 | 
				
			||||||
 | 
					require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any?
 | 
				
			||||||
 | 
					require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def changelog_user
 | 
				
			||||||
 | 
					  return unless Rake.application.top_level_tasks.include? "changelog"
 | 
				
			||||||
 | 
					  returnVal = nil || JSON.load(File.read('metadata.json'))['author']
 | 
				
			||||||
 | 
					  raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil?
 | 
				
			||||||
 | 
					  puts "GitHubChangelogGenerator user:#{returnVal}"
 | 
				
			||||||
 | 
					  returnVal
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def changelog_project
 | 
				
			||||||
 | 
					  return unless Rake.application.top_level_tasks.include? "changelog"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  returnVal = nil
 | 
				
			||||||
 | 
					  returnVal ||= begin
 | 
				
			||||||
 | 
					    metadata_source = JSON.load(File.read('metadata.json'))['source']
 | 
				
			||||||
 | 
					    metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    metadata_source_match && metadata_source_match[1]
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  puts "GitHubChangelogGenerator project:#{returnVal}"
 | 
				
			||||||
 | 
					  returnVal
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def changelog_future_release
 | 
				
			||||||
 | 
					  return unless Rake.application.top_level_tasks.include? "changelog"
 | 
				
			||||||
 | 
					  returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version']
 | 
				
			||||||
 | 
					  raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
 | 
				
			||||||
 | 
					  puts "GitHubChangelogGenerator future_release:#{returnVal}"
 | 
				
			||||||
 | 
					  returnVal
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					PuppetLint.configuration.send('disable_relative')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if Bundler.rubygems.find_name('github_changelog_generator').any?
 | 
				
			||||||
 | 
					  GitHubChangelogGenerator::RakeTask.new :changelog do |config|
 | 
				
			||||||
 | 
					    raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?
 | 
				
			||||||
 | 
					    config.user = "#{changelog_user}"
 | 
				
			||||||
 | 
					    config.project = "#{changelog_project}"
 | 
				
			||||||
 | 
					    config.future_release = "#{changelog_future_release}"
 | 
				
			||||||
 | 
					    config.exclude_labels = ['maintenance']
 | 
				
			||||||
 | 
					    config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."
 | 
				
			||||||
 | 
					    config.add_pr_wo_labels = true
 | 
				
			||||||
 | 
					    config.issues = false
 | 
				
			||||||
 | 
					    config.merge_prefix = "### UNCATEGORIZED PRS; GO LABEL THEM"
 | 
				
			||||||
 | 
					    config.configure_sections = {
 | 
				
			||||||
 | 
					      "Changed" => {
 | 
				
			||||||
 | 
					        "prefix" => "### Changed",
 | 
				
			||||||
 | 
					        "labels" => ["backwards-incompatible"],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "Added" => {
 | 
				
			||||||
 | 
					        "prefix" => "### Added",
 | 
				
			||||||
 | 
					        "labels" => ["feature", "enhancement"],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "Fixed" => {
 | 
				
			||||||
 | 
					        "prefix" => "### Fixed",
 | 
				
			||||||
 | 
					        "labels" => ["bugfix"],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  desc 'Generate a Changelog from GitHub'
 | 
				
			||||||
 | 
					  task :changelog do
 | 
				
			||||||
 | 
					    raise <<EOM
 | 
				
			||||||
 | 
					The changelog tasks depends on unreleased features of the github_changelog_generator gem.
 | 
				
			||||||
 | 
					Please manually add it to your .sync.yml for now, and run `pdk update`:
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					Gemfile:
 | 
				
			||||||
 | 
					  optional:
 | 
				
			||||||
 | 
					    ':development':
 | 
				
			||||||
 | 
					      - gem: 'github_changelog_generator'
 | 
				
			||||||
 | 
					        git: 'https://github.com/skywinder/github-changelog-generator'
 | 
				
			||||||
 | 
					        ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018'
 | 
				
			||||||
 | 
					        condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')"
 | 
				
			||||||
 | 
					EOM
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										56
									
								
								site-modules/profile/appveyor.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								site-modules/profile/appveyor.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,56 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					version: 1.1.x.{build}
 | 
				
			||||||
 | 
					branches:
 | 
				
			||||||
 | 
					  only:
 | 
				
			||||||
 | 
					    - master
 | 
				
			||||||
 | 
					    - release
 | 
				
			||||||
 | 
					skip_commits:
 | 
				
			||||||
 | 
					  message: /^\(?doc\)?.*/
 | 
				
			||||||
 | 
					clone_depth: 10
 | 
				
			||||||
 | 
					init:
 | 
				
			||||||
 | 
					  - SET
 | 
				
			||||||
 | 
					  - 'mkdir C:\ProgramData\PuppetLabs\code && exit 0'
 | 
				
			||||||
 | 
					  - 'mkdir C:\ProgramData\PuppetLabs\facter && exit 0'
 | 
				
			||||||
 | 
					  - 'mkdir C:\ProgramData\PuppetLabs\hiera && exit 0'
 | 
				
			||||||
 | 
					  - 'mkdir C:\ProgramData\PuppetLabs\puppet\var && exit 0'
 | 
				
			||||||
 | 
					environment:
 | 
				
			||||||
 | 
					  matrix:
 | 
				
			||||||
 | 
					    -
 | 
				
			||||||
 | 
					      RUBY_VERSION: 24-x64
 | 
				
			||||||
 | 
					      CHECK: syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
 | 
				
			||||||
 | 
					    -
 | 
				
			||||||
 | 
					      PUPPET_GEM_VERSION: ~> 5.0
 | 
				
			||||||
 | 
					      RUBY_VERSION: 24
 | 
				
			||||||
 | 
					      CHECK: parallel_spec
 | 
				
			||||||
 | 
					    -
 | 
				
			||||||
 | 
					      PUPPET_GEM_VERSION: ~> 5.0
 | 
				
			||||||
 | 
					      RUBY_VERSION: 24-x64
 | 
				
			||||||
 | 
					      CHECK: parallel_spec
 | 
				
			||||||
 | 
					    -
 | 
				
			||||||
 | 
					      PUPPET_GEM_VERSION: ~> 6.0
 | 
				
			||||||
 | 
					      RUBY_VERSION: 25
 | 
				
			||||||
 | 
					      CHECK: parallel_spec
 | 
				
			||||||
 | 
					    -
 | 
				
			||||||
 | 
					      PUPPET_GEM_VERSION: ~> 6.0
 | 
				
			||||||
 | 
					      RUBY_VERSION: 25-x64
 | 
				
			||||||
 | 
					      CHECK: parallel_spec
 | 
				
			||||||
 | 
					matrix:
 | 
				
			||||||
 | 
					  fast_finish: true
 | 
				
			||||||
 | 
					install:
 | 
				
			||||||
 | 
					  - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
 | 
				
			||||||
 | 
					  - bundle install --jobs 4 --retry 2 --without system_tests
 | 
				
			||||||
 | 
					  - type Gemfile.lock
 | 
				
			||||||
 | 
					build: off
 | 
				
			||||||
 | 
					test_script:
 | 
				
			||||||
 | 
					  - bundle exec puppet -V
 | 
				
			||||||
 | 
					  - ruby -v
 | 
				
			||||||
 | 
					  - gem -v
 | 
				
			||||||
 | 
					  - bundle -v
 | 
				
			||||||
 | 
					  - bundle exec rake %CHECK%
 | 
				
			||||||
 | 
					notifications:
 | 
				
			||||||
 | 
					  - provider: Email
 | 
				
			||||||
 | 
					    to:
 | 
				
			||||||
 | 
					      - nobody@nowhere.com
 | 
				
			||||||
 | 
					    on_build_success: false
 | 
				
			||||||
 | 
					    on_build_failure: false
 | 
				
			||||||
 | 
					    on_build_status_changed: false
 | 
				
			||||||
							
								
								
									
										1
									
								
								site-modules/profile/data/common.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								site-modules/profile/data/common.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
							
								
								
									
										21
									
								
								site-modules/profile/hiera.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								site-modules/profile/hiera.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					version: 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					defaults:  # Used for any hierarchy level that omits these keys.
 | 
				
			||||||
 | 
					  datadir: data         # This path is relative to hiera.yaml's directory.
 | 
				
			||||||
 | 
					  data_hash: yaml_data  # Use the built-in YAML backend.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hierarchy:
 | 
				
			||||||
 | 
					  - name: "osfamily/major release"
 | 
				
			||||||
 | 
					    paths:
 | 
				
			||||||
 | 
					      - "os/%{facts.os.family}/%{facts.os.release.major}.yaml"
 | 
				
			||||||
 | 
					        # Used for Solaris
 | 
				
			||||||
 | 
					      - "os/%{facts.os.family}/%{facts.kernelrelease}.yaml"
 | 
				
			||||||
 | 
					        # Used to distinguish between Debian and Ubuntu
 | 
				
			||||||
 | 
					      - "os/%{facts.os.name}/%{facts.os.release.major}.yaml"
 | 
				
			||||||
 | 
					  - name: "osfamily"
 | 
				
			||||||
 | 
					    paths:
 | 
				
			||||||
 | 
					      - "os/%{facts.os.family}.yaml"
 | 
				
			||||||
 | 
					      - "os/%{facts.os.name}.yaml"
 | 
				
			||||||
 | 
					  - name: 'common'
 | 
				
			||||||
 | 
					    path: 'common.yaml'
 | 
				
			||||||
							
								
								
									
										65
									
								
								site-modules/profile/metadata.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								site-modules/profile/metadata.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,65 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					  "name": "chlawren-profile",
 | 
				
			||||||
 | 
					  "version": "0.1.0",
 | 
				
			||||||
 | 
					  "author": "chris lawrence",
 | 
				
			||||||
 | 
					  "summary": "",
 | 
				
			||||||
 | 
					  "license": "Apache-2.0",
 | 
				
			||||||
 | 
					  "source": "",
 | 
				
			||||||
 | 
					  "dependencies": [
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
 | 
					  "operatingsystem_support": [
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "operatingsystem": "CentOS",
 | 
				
			||||||
 | 
					      "operatingsystemrelease": [
 | 
				
			||||||
 | 
					        "7"
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "operatingsystem": "OracleLinux",
 | 
				
			||||||
 | 
					      "operatingsystemrelease": [
 | 
				
			||||||
 | 
					        "7"
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "operatingsystem": "RedHat",
 | 
				
			||||||
 | 
					      "operatingsystemrelease": [
 | 
				
			||||||
 | 
					        "8"
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "operatingsystem": "Scientific",
 | 
				
			||||||
 | 
					      "operatingsystemrelease": [
 | 
				
			||||||
 | 
					        "7"
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "operatingsystem": "Debian",
 | 
				
			||||||
 | 
					      "operatingsystemrelease": [
 | 
				
			||||||
 | 
					        "9"
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "operatingsystem": "Ubuntu",
 | 
				
			||||||
 | 
					      "operatingsystemrelease": [
 | 
				
			||||||
 | 
					        "18.04"
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "operatingsystem": "windows",
 | 
				
			||||||
 | 
					      "operatingsystemrelease": [
 | 
				
			||||||
 | 
					        "2019",
 | 
				
			||||||
 | 
					        "10"
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
 | 
					  "requirements": [
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "name": "puppet",
 | 
				
			||||||
 | 
					      "version_requirement": ">= 4.10.0 < 7.0.0"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
 | 
					  "pdk-version": "1.14.1",
 | 
				
			||||||
 | 
					  "template-url": "pdk-default#1.14.1",
 | 
				
			||||||
 | 
					  "template-ref": "1.14.1-0-g0b5b39b"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										8
									
								
								site-modules/profile/spec/default_facts.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								site-modules/profile/spec/default_facts.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					# Use default_module_facts.yml for module specific facts.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# Facts specified here will override the values provided by rspec-puppet-facts.
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					ipaddress: "172.16.254.254"
 | 
				
			||||||
 | 
					ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
 | 
				
			||||||
 | 
					is_pe: false
 | 
				
			||||||
 | 
					macaddress: "AA:AA:AA:AA:AA:AA"
 | 
				
			||||||
							
								
								
									
										54
									
								
								site-modules/profile/spec/spec_helper.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								site-modules/profile/spec/spec_helper.rb
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,54 @@
 | 
				
			|||||||
 | 
					require 'puppetlabs_spec_helper/module_spec_helper'
 | 
				
			||||||
 | 
					require 'rspec-puppet-facts'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					require 'spec_helper_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_local.rb'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					include RspecPuppetFacts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					default_facts = {
 | 
				
			||||||
 | 
					  puppetversion: Puppet.version,
 | 
				
			||||||
 | 
					  facterversion: Facter.version,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					default_fact_files = [
 | 
				
			||||||
 | 
					  File.expand_path(File.join(File.dirname(__FILE__), 'default_facts.yml')),
 | 
				
			||||||
 | 
					  File.expand_path(File.join(File.dirname(__FILE__), 'default_module_facts.yml')),
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					default_fact_files.each do |f|
 | 
				
			||||||
 | 
					  next unless File.exist?(f) && File.readable?(f) && File.size?(f)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    default_facts.merge!(YAML.safe_load(File.read(f), [], [], true))
 | 
				
			||||||
 | 
					  rescue => e
 | 
				
			||||||
 | 
					    RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}"
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# read default_facts and merge them over what is provided by facterdb
 | 
				
			||||||
 | 
					default_facts.each do |fact, value|
 | 
				
			||||||
 | 
					  add_custom_fact fact, value
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RSpec.configure do |c|
 | 
				
			||||||
 | 
					  c.default_facts = default_facts
 | 
				
			||||||
 | 
					  c.before :each do
 | 
				
			||||||
 | 
					    # set to strictest setting for testing
 | 
				
			||||||
 | 
					    # by default Puppet runs at warning level
 | 
				
			||||||
 | 
					    Puppet.settings[:strict] = :warning
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					  c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT']
 | 
				
			||||||
 | 
					  c.after(:suite) do
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Ensures that a module is defined
 | 
				
			||||||
 | 
					# @param module_name Name of the module
 | 
				
			||||||
 | 
					def ensure_module_defined(module_name)
 | 
				
			||||||
 | 
					  module_name.split('::').reduce(Object) do |last_module, next_module|
 | 
				
			||||||
 | 
					    last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module, false)
 | 
				
			||||||
 | 
					    last_module.const_get(next_module, false)
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 'spec_overrides' from sync.yml will appear below this line
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user