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
config.vm.hostname = "mom.test" | |
config.vm.provision "shell", inline: <<-SHELL | |
sudo yum install -y https://yum.puppetlabs.com/puppet5/puppet5-release-el-7.noarch.rpm | |
sudo yum install puppet-agent -y | |
sudo /opt/puppetlabs/puppet/bin/gem install r10k | |
sudo /opt/puppetlabs/puppet/bin/r10k deploy -c /vagrant/r10k.yaml environment production -pv | |
yum -y install puppetserver | |
sudo mkdir -p /etc/puppetlabs/puppetserver | |
sudo echo "*" > /etc/puppetlabs/puppet/autosign.conf | |
sudo systemctl enable puppetserver |
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
--- | |
.cache_bundler: &cache_bundler | |
cache: | |
untracked: true | |
key: "$CI_BUILD_REF_NAME" | |
paths: | |
- '.vendor' | |
- 'vendor' | |
.setup_bundler_env: &setup_bundler_env |
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
Puppet::Functions.create_function(:'file_backend') do | |
dispatch :file_backend do | |
param "String", :key | |
param "Hash", :options | |
param "Puppet::LookupContext", :context | |
end | |
def file_backend(key, options, context) | |
if (options.key?("directory")) | |
dir = context.interpolate(options["directory"]) | |
if (File.exists?("#{dir}/#{key}") |
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
$haproxy_servers = { | |
"test" => { | |
"host" => "test1", | |
"stuff" => "test2", | |
}, | |
"jump" => { | |
"host" => "jump1", | |
"stuff" => "jump2", | |
} | |
} |
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
puppet query 'fact_contents { path ~> ["os", "name"] }' | jq -r 'map(["os.name",.certname, .value]) | .[] | @csv' |
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
{ | |
C7.0.1406-base => { | |
ensure => "present", | |
baseurl => "http://vault.centos.org/7.0.1406/os/$basearch/", | |
descr => "CentOS-7.0.1406 - Base", | |
enabled => "0", | |
gpgcheck => "1", | |
gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7", | |
provider => "inifile" | |
}, |