Skip to content

Instantly share code, notes, and snippets.

@op-ct
Last active October 1, 2021 05:08
Show Gist options
  • Save op-ct/4be477c4edfb23e4048e7fd0e2423d9c to your computer and use it in GitHub Desktop.
Save op-ct/4be477c4edfb23e4048e7fd0e2423d9c to your computer and use it in GitHub Desktop.
Test Puppet lookups from a local control repo
#!/bin/bash
/opt/puppetlabs/bolt/bin/puppet lookup \
--compile \
--explain \
--basemodulepath $PWD/site:/opt/puppetlabs/bolt/lib/ruby/gems/2.7.0/gems/bolt-3.17.0/modules \
--hiera_config $PWD/spec/hiera.yaml \
--environment production \
--environmentpath .onceover/etc/puppetlabs/code/environments \
--pluginfactdest "$PWD/facts.d" \
--log_level debug \
--node_terminus plain \
--facts facts.d/puppetserver.json \
--facts _role.yaml \
"${1:-pass_in_a_cli_argument}"
#!/bin/bash
/opt/puppetlabs/bolt/bin/puppet apply \
--test \
--noop \
--basemodulepath $PWD/site:/opt/puppetlabs/bolt/lib/ruby/gems/2.7.0/gems/bolt-3.17.0/modules \
--hiera_config $PWD/spec/hiera.yaml \
--environment production \
--environmentpath .onceover/etc/puppetlabs/code/environments \
--pluginfactdest "$PWD/facts.d" \
--node_terminus plain \
--tags sssd \
--write-catalog-summary \
manifests/site.pp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment