.
├── hiera
│ └── common.yaml
├── hiera.yaml
├── manifests
│ └── default.pp
├── README.md
├── install-puppet.sh
└── Vagrantfile
2 directories, 6 files
Last active
March 9, 2018 14:43
-
-
Save j1n3l0/8345df9feaa1f541ac1fd5b3253e8f0e to your computer and use it in GitHub Desktop.
Experiments provisioning vagrant VM with puppet
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
--- | |
content: "this is a test" |
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
file { "/tmp/foo": | |
content => hiera("content", "not setup right"), | |
ensure => present | |
} |
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
--- | |
:backends: | |
- yaml | |
:yaml: | |
:datadir: /vagrant/hiera/ |
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 -ex | |
rpm -ivh https://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-7.noarch.rpm | |
rpm -ivh http://ftp.nluug.nl/pub/os/Linux/distr/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm | |
yum -y install puppet |
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 -ex | |
codename=`lsb_release -c | tr -d '[:space:]' | cut -d: -f2` | |
wget -q "https://apt.puppetlabs.com/puppet-release-${codename}.deb" | |
dpkg -i "puppet-release-${codename}.deb" | |
apt-get update | |
apt-get install -y puppet |
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
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/xenial64" | |
config.vm.provision "shell", path: "install-puppet.sh" | |
config.vm.provision "puppet" do |puppet| | |
puppet.hiera_config_path = "hiera.yaml" | |
puppet.options = ["--debug", "--verbose"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment