This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/puppetlabs/bolt/bin/ruby | |
def get_rpm_spec_core(rpm_spec) | |
rpm_spec_core = { | |
requires: [], | |
obsoletes: [], | |
} | |
rpm_spec.select!{ |x| x =~ /^(Requires:|Obsoletes:|# Core SIMP Requirements|# SIMP Extras)/ } | |
in_core = false | |
rpm_spec.each do |x| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# On EL7, ensure: | |
# yum install -y dnf dnf-plugins-core | |
# | |
set -eu | |
# Useful EL8-only options: --remote-time --norepopath | |
PATH_TO_LOCAL_MIRROR="$PWD/_download_path/build-6-6-0-centos-8-x86-64-repo-packages" | |
mkdir -p "$PATH_TO_LOCAL_MIRROR" | |
dnf reposync \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# These tasks help revionics use onceover to validate their manifests and data | |
# | |
# To prep and run onceover spec tests, run: | |
# | |
# bundler exec rake spec | |
# | |
namespace :onceover do | |
desc 'Install modules from Puppetfile, using private Puppet Forge' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SIMP Unstable GPG Key 2 (TESTING ONLY - NOT FOR PRODUCTION USE) | |
# | |
# NOTE: key is 3072 bit, but much smaller than previous keys | |
# because it is for signing ONLY, with no encryption subkeys | |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQGNBGDTtTEBDAD5IhusLJZQhJ2CzzxXmY36fNEb8OUeahNpy5n8Ho/lyyZsfb2U | |
gfLYymQAdnIsKUk7AER3p4XRbV+AbxDlb25pbxWs6KaVLzXSgSw4VPyN50fDmVgu | |
cmTyso/ZFdFlGgdOtM2IoKWRM1/qt0SlaXDI5nTFQRINkFFfYwKci7P45c6L6G2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'json' | |
require 'yaml' | |
user = ARGV[0] || %x{id -u -n}.strip | |
if user == 'root' | |
dir = '/opt/puppetlabs/puppet/cache/client_data/catalog/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GEM_SERVERS | a space/comma delimited list of rubygem servers | |
gem_sources = ENV.key?('GEM_SERVERS') ? ENV['GEM_SERVERS'].split(/[, ]+/) : ['https://rubygems.org'] | |
gem_sources.each { |gem_source| source gem_source } | |
gem 'bundler' | |
gem 'dotenv' | |
gem 'gitlab' | |
gem 'json' | |
group :debug do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Provision a bolt controller and various target systems | |
# - Sets up host file, hostnames, and SSH keys on each target | |
# - Just add project directory | |
SSH_KEY_FILE ||= File.join( ENV['VAGRANT_HOME'] || File.join(ENV['HOME'], '.vagrant.d'), 'insecure_private_key') | |
Vagrant.configure('2') do |c| | |
c.ssh.insert_key = false | |
c.vm.box = "centos/7" |
NewerOlder