Skip to content

Instantly share code, notes, and snippets.

if $mounts {
lookup('autofs::mounts', { merge => hash }, $mounts).each |String $mount, Hash $attributes| {
autofs::mount { $mount: * => $attributes }
}
}
require 'gitlab'
Gitlab.configure do |config|
config.endpoint = 'https://gitlab.example.com/api/v4'
config.private_token = 'TOKEN'
config.httparty = { verify: false }
end
Gitlab.group(20).projects.each do |project|
mod "#{project['name']}",
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/type/concat_file.rb]/content:
--- /opt/puppetlabs/puppet/cache/lib/puppet/type/concat_file.rb 2017-10-27 15:22:24.743020706 +0000
+++ /tmp/puppet-file20171027-26559-17gd48k 2017-10-27 15:29:21.445093441 +0000
@@ -11,7 +11,7 @@
Concat_fragment <<| tag == 'unique_tag' |>>
concat_file { '/tmp/file':
- tag => 'unique_tag', # Mandatory
+ tag => 'unique_tag', # Optional. Default to undef
path => '/tmp/file', # Optional. If given it overrides the resource name
nodejs::npm:
my-custom-app:
ensure: "present"
user: www
target: "/var/www/apps/my-custom-app"
use_package_json: true
$npm_install = lookup('nodejs::npm')
$npm_install.each |String $npm, Hash $attributes| {
nodejs::npm { $npm: * => $attributes }
}
def branch
case @vcs
when 'github'
if @data.key? 'ref'
@data['ref'].sub('refs/heads/', '')
else
@data['repository']['default_branch']
end
when 'gitlab'
@data['ref'].sub('refs/heads/', '')
stages:
- deploy
deploy_to_production:
variables:
GIT_CHECKOUT: false
stage: deploy
before_script:
- bundle update
script:
desc 'Release new module'
task 'module_release' do
tag_pattern = "%s"
Blacksmith::RakeTask.new do |t|
t.tag_pattern = tag_pattern
t.build = false # do not build the module nor push it to the Forge
# just do the tagging [:clean, :tag, :bump_commit]
end
1) rsyslog::component::property_filter initial test should contain Concat::Fragment[rsyslog::component::property_filter::mypropertyfilter] with content supplied string
Failure/Error: $content = epp('rsyslog/property_filter.epp', {
Puppet::PreformattedError:
Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, epp(): Invalid EPP: Illegal attempt to assign to 'an Epp Text'. Not an assignable reference at /home/dhollinger/workspace/puppet/puppet-rsyslog/spec/fixtures/modules/rsyslog/templates/property_filter.epp:7:18 at /home/dhollinger/workspace/puppet/puppet-rsyslog/spec/fixtures/modules/rsyslog/manifests/component/property_filter.pp:13:14 at line 2 on node pop-os.moduletux.com
@dhollinger
dhollinger / output
Last active December 20, 2017 20:05
PuppetWebhook
github payload endpoint
/payload returns ok (FAILED - 1)
Failures:
1) PuppetWebhook github payload endpoint /payload returns ok
Failure/Error: expect(last_response).to be_ok
expected `#<Rack::MockResponse:0x00560064f920a8 @original_headers={"Content-Type"=>"text/html;charset=utf-8", "...0/gems/rspec-core-3.7.0/exe/rspec:4:in `<main>'\"],\"branch\":\"production\",\"status_code\":500}"]>.ok?` to return true, got false
# ./spec/unit/routes/payload_spec.rb:21:in `block (3 levels) in <top (required)>'