Skip to content

Commit

Permalink
Merge pull request #35 from rehanone/develop/pdk-update
Browse files Browse the repository at this point in the history
- Updated `pdk` templates.
  • Loading branch information
rehanone authored Nov 16, 2022
2 parents 987269e + e57a0f9 commit fb2dd66
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 44 deletions.
8 changes: 6 additions & 2 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/pupp

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
}
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"puppet.puppet-vscode",
"rebornix.Ruby"
]
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [],
Expand Down
2 changes: 1 addition & 1 deletion .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--fail-on-warnings
--relative
--no-documentation-check
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require:
- rubocop-rspec
AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.4'
TargetRubyVersion: '2.5'
Include:
- "**/*.rb"
Exclude:
Expand Down
10 changes: 7 additions & 3 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ appveyor.yml:
user: rehanone
secure: "WiS9j4aI93DobVH/O/z6aHKOY8UL2hwn4+fflKuhvZzJPxfsYYfvQsyX43qetpVAIW7DCZLfO1QQlLF1/ywhe8Y9XRy923R6E7WckYPCGtGBpeTdS7p3Biss2H+ikxI9/5UFlewrdFxLxqgKz8lGLCt8zL1r7ggPWjJBfWEBtk2J9mj4BRTTGt6SWTSHwkdqjloQsPu32SXWY4nsU+87p+lO49YTOH2cS+54/DRCpccPl2AL+kXISDGiDZtlMyGdL2c0Z1e8etmOxbHN2X80YyOQY2GiKdGhzVfx5TDPElDXkOO5JkkZWmsz2D6BJYvu+s9awIJ6/pzGFDghZIK2MSgfUjJd9Vwt1lm48kHKsJ3DsSRIOHK+2ft/3nUl8y7j7KKQMcKKVN35/0uy/cXnD4acuxCh84e5bc0pmYy0gxLhLF6C9Ahv8pls7HhA+jaoUBNXIgCb685w6EgrkaeGMx1vz7VfZo56viod/zZ7XCXg8o5s7vthKMtYLnuGIEl2DvBC3KKtGvl4RnzFVUcZcB5lHgLZozskcwuWFtqd/AgqdIVRzKc6KmRWo8TkE/qOV79MaUpKGONmLMQfsz01HMn4m/NAmu4J55kFgFYkrkwy+9c/3Z9Ytce7goOnyxYYd0fFfaSM8vJCl7oe8Zb3znK2atMmpQAfDwYBwUNe1jU="
docker_sets:
- set: ubuntu2204-64
collection: puppet7
- set: ubuntu2204-64
collection: puppet6
- set: ubuntu2004-64
collection: puppet7
- set: ubuntu2004-64
Expand All @@ -36,8 +40,6 @@ appveyor.yml:
collection: puppet7
- set: ubuntu1604-64
collection: puppet6
- set: ubuntu1404-64
collection: puppet6
- set: debian11-64
collection: puppet7
- set: debian11-64
Expand Down Expand Up @@ -116,7 +118,9 @@ Gemfile:
- gem: 'beaker-docker'

Rakefile:
linter_fail_on_warnings: true
linter_fail_on_warnings: false
extra_disabled_lint_checks:
- 'documentation'

spec/spec_helper.rb:
mock_with: ':rspec'
Expand Down
23 changes: 16 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
-
bundler_args: --with system_tests
dist: focal
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=ubuntu2004-64 BEAKER_TESTMODE=apply
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=ubuntu2204-64 BEAKER_TESTMODE=apply
rvm: 2.5.7
script: bundle exec rake beaker
services: docker
Expand All @@ -40,7 +40,7 @@ jobs:
-
bundler_args: --with system_tests
dist: focal
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu2004-64 BEAKER_TESTMODE=apply
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu2204-64 BEAKER_TESTMODE=apply
rvm: 2.5.7
script: bundle exec rake beaker
services: docker
Expand All @@ -49,7 +49,7 @@ jobs:
-
bundler_args: --with system_tests
dist: focal
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=ubuntu1804-64 BEAKER_TESTMODE=apply
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=ubuntu2004-64 BEAKER_TESTMODE=apply
rvm: 2.5.7
script: bundle exec rake beaker
services: docker
Expand All @@ -58,7 +58,7 @@ jobs:
-
bundler_args: --with system_tests
dist: focal
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu1804-64 BEAKER_TESTMODE=apply
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu2004-64 BEAKER_TESTMODE=apply
rvm: 2.5.7
script: bundle exec rake beaker
services: docker
Expand All @@ -67,7 +67,7 @@ jobs:
-
bundler_args: --with system_tests
dist: focal
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=ubuntu1604-64 BEAKER_TESTMODE=apply
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=ubuntu1804-64 BEAKER_TESTMODE=apply
rvm: 2.5.7
script: bundle exec rake beaker
services: docker
Expand All @@ -76,7 +76,7 @@ jobs:
-
bundler_args: --with system_tests
dist: focal
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu1604-64 BEAKER_TESTMODE=apply
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu1804-64 BEAKER_TESTMODE=apply
rvm: 2.5.7
script: bundle exec rake beaker
services: docker
Expand All @@ -85,7 +85,16 @@ jobs:
-
bundler_args: --with system_tests
dist: focal
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu1404-64 BEAKER_TESTMODE=apply
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=ubuntu1604-64 BEAKER_TESTMODE=apply
rvm: 2.5.7
script: bundle exec rake beaker
services: docker
stage: acceptance
sudo: required
-
bundler_args: --with system_tests
dist: focal
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_HYPERVISOR=docker BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu1604-64 BEAKER_TESTMODE=apply
rvm: 2.5.7
script: bundle exec rake beaker
services: docker
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ group :development do
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "voxpupuli-puppet-lint-plugins", '>= 3.0', require: false
gem "puppet-lint-absolute_template_path", require: false
gem "puppet-lint-absolute_classname-check", require: false
gem "puppet-lint-alias-check", require: false
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def changelog_future_release
end

PuppetLint.configuration.send('disable_relative')
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('disable_documentation')


if Bundler.rubygems.find_name('github_changelog_generator').any?
Expand Down
5 changes: 5 additions & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
ohmyzsh::source: 'https://github.com/ohmyzsh/ohmyzsh.git'
ohmyzsh::home: '/home'
ohmyzsh::zsh_shell_path: '/usr/bin/zsh'

ohmyzsh::installs: {}
ohmyzsh::themes: {}
ohmyzsh::plugins: {}
ohmyzsh::profiles: {}
7 changes: 3 additions & 4 deletions manifests/fetch/theme.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,23 @@
Optional[String] $revision = undef,
Optional[Integer] $depth = undef,
) {

include ohmyzsh

if $name == 'root' {
$home = '/root'
$home = '/root'
$group = fact('os.family') ? {
/(Free|Open)BSD/ => 'wheel',
default => 'root',
}
} else {
$home = "${ohmyzsh::home}/${name}"
$home = "${ohmyzsh::home}/${name}"
$group = $name
}

$themepath = "${home}/.oh-my-zsh/custom/themes"
$fullpath = "${themepath}/${filename}"

if ! defined(File[$themepath]) {
if !defined(File[$themepath]) {
file { $themepath:
ensure => directory,
owner => $name,
Expand Down
8 changes: 4 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
Stdlib::Httpsurl $source,
Stdlib::Absolutepath $home,
Stdlib::Absolutepath $zsh_shell_path,
Hash $installs = lookup('ohmyzsh::installs', Hash, 'hash', {}),
Hash $themes = lookup('ohmyzsh::themes', Hash, 'hash', {}),
Hash $plugins = lookup('ohmyzsh::plugins', Hash, 'hash', {}),
Hash $profiles = lookup('ohmyzsh::profiles', Hash, 'hash', {})
Hash $installs,
Hash $themes,
Hash $plugins,
Hash $profiles,
) {
create_resources('ohmyzsh::install', $ohmyzsh::installs)
create_resources('ohmyzsh::theme', $ohmyzsh::themes)
Expand Down
5 changes: 2 additions & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
Boolean $disable_auto_update = false,
Boolean $override_template = false,
) {

include ohmyzsh

if !defined(Package['git']) {
Expand All @@ -44,13 +43,13 @@
}

if $name == 'root' {
$home = '/root'
$home = '/root'
$group = fact('os.family') ? {
/(Free|Open)BSD/ => 'wheel',
default => 'root',
}
} else {
$home = "${ohmyzsh::home}/${name}"
$home = "${ohmyzsh::home}/${name}"
$group = $name
}

Expand Down
13 changes: 7 additions & 6 deletions manifests/plugins.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,30 @@
#
# Copyright 2014
#
define ohmyzsh::plugins(
define ohmyzsh::plugins (
Array[String] $plugins = ['git'],
Hash[String,
Struct[{
Struct[
{
source => Enum[git],
url => Stdlib::Httpsurl,
ensure => Enum[present, latest],
revision => Optional[String],
depth => Optional[Integer]
}]
}
]
] $custom_plugins = {},
) {

include ohmyzsh

if $name == 'root' {
$home = '/root'
$home = '/root'
$group = fact('os.family') ? {
/(Free|Open)BSD/ => 'wheel',
default => 'root',
}
} else {
$home = "${ohmyzsh::home}/${name}"
$home = "${ohmyzsh::home}/${name}"
$group = $name
}

Expand Down
5 changes: 2 additions & 3 deletions manifests/profile.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@
define ohmyzsh::profile (
Hash $scripts = {},
) {

include ohmyzsh

if $name == 'root' {
$home = '/root'
$home = '/root'
$group = fact('os.family') ? {
/(Free|Open)BSD/ => 'wheel',
default => 'root',
}
} else {
$home = "${ohmyzsh::home}/${name}"
$home = "${ohmyzsh::home}/${name}"
$group = $name
}

Expand Down
7 changes: 3 additions & 4 deletions manifests/theme.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,19 @@
#
# Copyright 2014
#
define ohmyzsh::theme(
define ohmyzsh::theme (
String $theme = 'clean',
) {

include ohmyzsh

if $name == 'root' {
$home = '/root'
$home = '/root'
$group = fact('os.family') ? {
/(Free|Open)BSD/ => 'wheel',
default => 'root',
}
} else {
$home = "${ohmyzsh::home}/${name}"
$home = "${ohmyzsh::home}/${name}"
$group = $name
}

Expand Down
10 changes: 5 additions & 5 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"14.04",
"16.04",
"18.04",
"20.04"
"20.04",
"22.04"
]
},
{
Expand Down Expand Up @@ -104,7 +104,7 @@
"ohmyzsh",
"oh-my-zsh"
],
"pdk-version": "2.4.0",
"template-url": "pdk-default#2.4.0",
"template-ref": "tags/2.4.0-0-gfa6b6d2"
"pdk-version": "2.5.0",
"template-url": "pdk-default#2.5.0",
"template-ref": "tags/2.5.0-0-g369d483"
}
2 changes: 2 additions & 0 deletions pdk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
ignore: []

0 comments on commit fb2dd66

Please sign in to comment.