| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/bin/sh | |
| 2 | |
| 3 if [ ! -e /usr/bin/puppet -o ! -e /usr/bin/hiera ]; then | |
| 4 sudo apt-key add /vagrant/hiera/files/puppetlabs-keyring.gpg \ | |
| 5 && sudo cp /vagrant/hiera/files/puppetlabs.list /etc/apt/sources.list.d/ \ | |
| 6 && echo ' | |
| 7 # Puppetlabs packages (e.g. hiera) would attempt to install a puppet 3.x | |
| 8 # or later release (which is not available in precise) if not pinned here | |
| 9 Package: puppet | |
| 10 Pin: release v=2.7.* | |
| 11 Pin-Priority: 666 | |
| 12 | |
| 13 Package: puppet-common | |
| 14 Pin: release v=2.7.* | |
| 15 Pin-Priority: 666 | |
| 16 ' | sudo tee /etc/apt/preferences.d/puppetlabs \ | |
| 17 && sudo apt-get -y update \ | |
| 18 && sudo apt-get -y install puppet \ | |
| 19 && sudo apt-get -y install hiera-puppet | |
| 20 fi | |
|
Wladimir Palant
2014/09/09 18:15:06
I think you already know my opinion on using shell
mathias
2014/10/08 03:02:33
Indeed, I know about your preferences, and I know
| |
| 21 | |
| 22 if [ ! -e /etc/puppet/hiera.yaml ]; then | |
| 23 sudo ln -fs /vagrant/hiera/vagrant.yaml /etc/puppet/hiera.yaml | |
| 24 fi | |
| 25 | |
| 26 if [ ! -L /etc/hiera.yaml ]; then | |
| 27 rm -f /etc/hiera.yaml | |
| 28 ln -fs puppet/hiera.yaml /etc/hiera.yaml | |
|
Wladimir Palant
2014/09/09 18:15:06
Doesn't this need root privileges as well?
mathias
2014/10/08 03:02:33
Yes it does. However, with the conversion of class
| |
| 29 fi | |
| 30 | |
| 31 if [ ! -e /usr/local/bin/puppet-node-classifier ]; then | |
| 32 ln -fs /vagrant/hiera/files/classify.sh /usr/local/bin/puppet-node-classifier | |
|
Wladimir Palant
2014/09/09 18:15:06
So puppet-node-classifier is actually our classify
mathias
2014/10/08 03:02:33
Agreed, there's no need to "install" the script in
| |
| 33 fi | |
| OLD | NEW |