| Index: hiera/files/precise.sh |
| diff --git a/hiera/files/precise.sh b/hiera/files/precise.sh |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..05267cf79011ffdb0e7bc0c9901afd290120c83f |
| --- /dev/null |
| +++ b/hiera/files/precise.sh |
| @@ -0,0 +1,33 @@ |
| +#!/bin/sh |
| + |
| +if [ ! -e /usr/bin/puppet -o ! -e /usr/bin/hiera ]; then |
| + sudo apt-key add /vagrant/hiera/files/puppetlabs-keyring.gpg \ |
| + && sudo cp /vagrant/hiera/files/puppetlabs.list /etc/apt/sources.list.d/ \ |
| + && echo ' |
| +# Puppetlabs packages (e.g. hiera) would attempt to install a puppet 3.x |
| +# or later release (which is not available in precise) if not pinned here |
| +Package: puppet |
| +Pin: release v=2.7.* |
| +Pin-Priority: 666 |
| + |
| +Package: puppet-common |
| +Pin: release v=2.7.* |
| +Pin-Priority: 666 |
| +' | sudo tee /etc/apt/preferences.d/puppetlabs \ |
| + && sudo apt-get -y update \ |
| + && sudo apt-get -y install puppet \ |
| + && sudo apt-get -y install hiera-puppet |
| +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
|
| + |
| +if [ ! -e /etc/puppet/hiera.yaml ]; then |
| + sudo ln -fs /vagrant/hiera/vagrant.yaml /etc/puppet/hiera.yaml |
| +fi |
| + |
| +if [ ! -L /etc/hiera.yaml ]; then |
| + rm -f /etc/hiera.yaml |
| + 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
|
| +fi |
| + |
| +if [ ! -e /usr/local/bin/puppet-node-classifier ]; then |
| + 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
|
| +fi |