Skip to content

#### WIP - Do Not Merge - Adding some example code #### #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 137 commits into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
b8eff92
removed sizing for puppet master
spidersddd Feb 8, 2018
e3a6fcb
added sizes back
spidersddd Feb 8, 2018
08749f3
Adding some example code
spidersddd Dec 17, 2018
f0629b1
clean up of some of the supporting tooling in the repo
spidersddd Jan 9, 2019
f15ef88
added example facts, profiles, and roles
spidersddd Jan 9, 2019
919478d
starting travisci work
spidersddd Jan 9, 2019
2f10b84
added more travis ci
spidersddd Jan 9, 2019
06b7cfe
example eyaml
spidersddd May 23, 2019
4416577
cleanup old hieradata dir
spidersddd May 30, 2019
7e8925f
fix bug
spidersddd May 31, 2019
13f3397
added simple sql server profile examples
spidersddd Jun 12, 2019
84f68e1
restructure of files and
spidersddd Jun 24, 2019
b94fbbd
Merge branch 'example_addons' of https://github.com/spidersddd/contro…
spidersddd Jun 25, 2019
2c96965
test for the onceover job
spidersddd Aug 8, 2019
b726dc0
fix some lint issues and remove example.pp files
spidersddd Aug 8, 2019
0c7ef63
Merge branch 'production' of https://github.com/spidersddd/control-re…
spidersddd Aug 15, 2019
ea48fc8
added some quotes
spidersddd Aug 20, 2019
9bf7760
added some quotes
spidersddd Aug 20, 2019
ea4fdd2
added some quotes
spidersddd Aug 20, 2019
636e58e
added some quotes
spidersddd Aug 20, 2019
65bef5e
added some quotes
spidersddd Aug 20, 2019
785483c
Merge branch 'production' into example_addons
spidersddd Aug 26, 2019
52d87da
cleanup hiera.yaml to clarity
spidersddd Aug 26, 2019
27665f9
moved role to example_role to avoid conflicts
spidersddd Aug 28, 2019
c61fa0c
fix some names and add masters class
spidersddd Aug 29, 2019
b9958c1
added change to config_version
spidersddd Aug 29, 2019
bbb7573
added change to config_version
spidersddd Aug 29, 2019
1e6f596
fix syntax error
spidersddd Aug 29, 2019
58a3cb6
added required quote
spidersddd Aug 29, 2019
a64a798
fix for query
spidersddd Aug 29, 2019
30c549a
notify to validate query
spidersddd Aug 29, 2019
13a0361
notify to validate query
spidersddd Aug 29, 2019
c767e05
notify to validate query
spidersddd Aug 29, 2019
0949f75
cleanup for puppet-lint
spidersddd Aug 29, 2019
bd1a488
cleanup for warning about eyaml keys
spidersddd Aug 29, 2019
38c592a
added tier in hiera for testing and example to be deleted.
spidersddd Aug 30, 2019
aa20e4e
fixed some lint warnings
spidersddd Aug 30, 2019
6fdadfa
added link to role and profile readme.md
spidersddd Aug 30, 2019
80c8ca4
first pass at wordpress and mysql
spidersddd Aug 30, 2019
897abce
added data for ssh and eyaml test keys for compiler profile
spidersddd Aug 30, 2019
4ed39ce
added profiles for security
spidersddd Aug 30, 2019
61c8d63
added profiles for security
spidersddd Aug 30, 2019
12f3fa6
added role for masters
spidersddd Aug 30, 2019
0265039
added security modules
spidersddd Aug 30, 2019
9e8b373
fix for security
spidersddd Aug 30, 2019
0199de9
fix for name
spidersddd Aug 30, 2019
aa00db8
fix for archives profile
spidersddd Aug 30, 2019
8ff2642
fix for testing env
spidersddd Aug 30, 2019
2c36219
fix for testing env
spidersddd Aug 30, 2019
e6f29db
fix for testing env
spidersddd Aug 30, 2019
4a6f3a3
fix for testing env
spidersddd Aug 30, 2019
905f7ec
pulled some security due to issues with PE, trying to find class that
spidersddd Aug 31, 2019
20977f9
removed duplicate modules from Puppetfile
spidersddd Sep 3, 2019
6a700b9
removed toughen::auditing
spidersddd Sep 3, 2019
5be9078
removed incorrect profiles changed to profile
spidersddd Sep 3, 2019
dd823b7
check for windows version to use secure_windows
spidersddd Sep 3, 2019
7303a06
Fix for onceover with new masters class
spidersddd Sep 3, 2019
154447f
fix for solaris dns_resolver issue
spidersddd Sep 3, 2019
6c9dd22
Set kernel to SunOS for Solaris
spidersddd Sep 3, 2019
18cc990
remove toughen::cron for now.
spidersddd Sep 3, 2019
240cffd
change to reflect correct platfrom9 info
spidersddd Sep 3, 2019
0edada8
testing other toughen classes on PE Master
spidersddd Sep 3, 2019
8cc3470
added some service securing
spidersddd Sep 3, 2019
5fd0d1f
make waring more forward
spidersddd Sep 3, 2019
ad83a07
Added toughen::pam
spidersddd Sep 3, 2019
7f6b4d6
eyaml warning
spidersddd Sep 3, 2019
c06a460
change to support Debian
spidersddd Sep 4, 2019
4afef0b
Change to remove toughen module
spidersddd Sep 4, 2019
c914fd5
added $pe_environment to profile
spidersddd Sep 4, 2019
d19bd75
add module
spidersddd Sep 4, 2019
68ac043
added Debian to java
spidersddd Sep 4, 2019
b9d6461
added debian download url for tomcat
spidersddd Sep 4, 2019
a46a0d7
added concat
spidersddd Sep 4, 2019
3fb537e
change version of concat
spidersddd Sep 4, 2019
aa4d9e1
added motd to setup
spidersddd Sep 4, 2019
3a645ec
chnage to archive tomcat
spidersddd Sep 4, 2019
4c27c98
fix for motd
spidersddd Sep 4, 2019
b21f1df
added motd module
spidersddd Sep 4, 2019
f070223
test for fastb web_be
spidersddd Sep 4, 2019
e5f5d0f
fix for fastb
spidersddd Sep 4, 2019
8cfd0c5
fix for path error
spidersddd Sep 4, 2019
35fa6d2
change to sample for fastb
spidersddd Sep 4, 2019
c5392a4
new sample test
spidersddd Sep 4, 2019
2a3892d
fix for catalina_home
spidersddd Sep 4, 2019
efe453c
fix for fastb
spidersddd Sep 4, 2019
ee755db
fastb fix
spidersddd Sep 4, 2019
76c6721
bug fix
spidersddd Sep 4, 2019
6fbcef1
next test
spidersddd Sep 4, 2019
8634f7c
simplify fastb
spidersddd Sep 4, 2019
eeb22e1
fastb with tomcat::war
spidersddd Sep 4, 2019
4b9f313
bug fix
spidersddd Sep 4, 2019
68e26ff
bug fix
spidersddd Sep 4, 2019
539b1a1
fix motd
spidersddd Sep 5, 2019
4138e22
adding \n to motd
spidersddd Sep 5, 2019
148daa1
adding infor for new fastb_database
spidersddd Sep 5, 2019
13ca7fc
bug fix
spidersddd Sep 5, 2019
c205e96
set password to Sensitive data type
spidersddd Sep 5, 2019
3bb46ab
big fix
spidersddd Sep 5, 2019
b3fd04c
added puppetlabs-mysql
spidersddd Sep 5, 2019
4310868
removed conversion to Sensitive datatype, not supported
spidersddd Sep 5, 2019
744b15a
pass mysql_user and password_hash
spidersddd Sep 5, 2019
a8d14ba
fix bug for misspelling
spidersddd Sep 5, 2019
bf8efa1
fix datatype
spidersddd Sep 5, 2019
066da56
change type bugfix
spidersddd Sep 5, 2019
ef59c1c
added password for db
spidersddd Sep 5, 2019
203aea1
removed grants for db creation
spidersddd Sep 5, 2019
4ac4336
fix for db grant
spidersddd Sep 5, 2019
9bf1cb0
added example role
spidersddd Sep 5, 2019
e8a0595
verify trusted.extensions
spidersddd Sep 5, 2019
4113cd6
change to evaluate data in key
spidersddd Sep 5, 2019
7012727
Added trusted extension to hiera
spidersddd Sep 6, 2019
01ae097
added hiearchy for onceover
spidersddd Sep 6, 2019
250cf44
added extension
spidersddd Sep 6, 2019
9661335
fix for tomcat
spidersddd Sep 6, 2019
1778763
fix for order of fastb
spidersddd Sep 6, 2019
58ecd13
change to fix CI testing
spidersddd Sep 6, 2019
2df65c1
fix for missing fact
spidersddd Sep 6, 2019
247cb1f
Fix for tomcat not installed as tomcat user
spidersddd Sep 6, 2019
7e6203b
fix for webserver
spidersddd Sep 6, 2019
a0622d3
Fix for fastb
spidersddd Sep 6, 2019
fc11587
set order with contain on tomcat class
spidersddd Sep 6, 2019
3b7290d
fix for fastb
spidersddd Sep 6, 2019
4b2264e
ordering fastb
spidersddd Sep 6, 2019
50d90e4
Trying to fix onceover
spidersddd Sep 6, 2019
703c1f5
fix for onceover
spidersddd Sep 6, 2019
0af2f7f
moved to exported resources for mysql_users
spidersddd Sep 6, 2019
1d2ef65
fix for database
spidersddd Sep 6, 2019
dc50b7e
Try to fix fastb_database
spidersddd Sep 6, 2019
ab489c5
fix for Tuple
spidersddd Sep 6, 2019
2ffc244
fix for server
spidersddd Sep 6, 2019
065fb90
fix
spidersddd Sep 6, 2019
59057b0
fix
spidersddd Sep 6, 2019
74e572e
fix yaml
spidersddd Sep 9, 2019
9df838b
fix for onceover testing
spidersddd Sep 9, 2019
8e17322
site/profile/manifests/app/fastb.pp
spidersddd Sep 9, 2019
b5d00e6
change to added default for testing
spidersddd Sep 9, 2019
10333e5
fix for fastb app
spidersddd Sep 9, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.rb eol=lf
*.erb eol=lf
*.pp eol=lf
*.sh eol=lf
*.epp eol=lf
31 changes: 27 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
hieradata/nodes/example-puppet-master.yaml
Gemfile.lock
_site/*
.onceover/*
.git/
.vscode
.*.sw[op]
.metadata
.vscode
.onceover
.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
33 changes: 33 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
stages:
- syntax
- unit

cache:
paths:
- vendor/bundle

before_script:
- bundle -v
- rm Gemfile.lock || true
- gem --version
- gem update --system
- 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.4.4-Puppet ~> 5.5:
stage: syntax
image: ruby:2.4.4
script:
- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
variables:
PUPPET_GEM_VERSION: '~> 5.5'

parallel_onceover-Ruby 2.4.4-Puppet ~> 5.5:
stage: unit
image: ruby:2.4.4
script:
- bundle exec onceover run spec
variables:
PUPPET_GEM_VERSION: '~> 5.5'

24 changes: 24 additions & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.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
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--format documentation
122 changes: 122 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
require: rubocop-rspec
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/DecorateString:
Description: We don't want to decorate test output.
Exclude:
- spec/*
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
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
44 changes: 44 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
sudo: false
dist: trusty
language: ruby
cache: bundler
before_install:
- bundle -v
- rm -f Gemfile.lock
- gem update --system
- gem --version
- bundle -v
- bundle install --path vendor/bundle --jobs $(nproc)
script:
- 'bundle exec rake $CHECK'
bundler_args: --without system_tests
rvm:
- 2.5.1
env:
global:
- BEAKER_PUPPET_COLLECTION=puppet6 PUPPET_GEM_VERSION="~> 6.0"
matrix:
fast_finish: true
include:
-
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
-
env: CHECK=parallel_spec
-
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
rvm: 2.4.4
-
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
rvm: 2.1.9
-
env: PUPPET_GEM_VERSION="~> 5.5" CHECK=parallel_onceover
script:
- bundle exec onceover run spec
rvm: 2.4.4
branches:
only:
- master
- /^v\d/
notifications:
email: false
1 change: 1 addition & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--markup markdown
74 changes: 74 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
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.2', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
gem "json", '<= 2.0.4', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.4.4')
gem "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "onceover"
gem "hiera-eyaml"
end

puppet_version = ENV['PUPPET_GEM_VERSION']
onceover_version = ENV['ONCEOVER_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['onceover'] = location_for(onceover_version) if onceover_version
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
Loading