hiera config post-task
This commit is contained in:
parent
9bf44d00b4
commit
8d2211675e
1 changed files with 14 additions and 0 deletions
14
global/post-tasks.d/029hiera-config
Executable file
14
global/post-tasks.d/029hiera-config
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Choose hiera config file based on available secrets backend
|
||||
#
|
||||
|
||||
if [ -f /usr/bin/eyaml -a ! -f /usr/lib/ruby/vendor_ruby/gpgme.rb ]; then
|
||||
# The package hiera-eyaml is installed, and there is no hiera-gpg. Use heira-eyaml.yaml if it exists.
|
||||
fn='/etc/puppet/hiera-eyaml.yaml'
|
||||
test -f "${fn}" && ln -sf "${fn}" /etc/puppet/hiera.yaml
|
||||
elif [ ! -f /etc/puppet/hiera.yaml ]; then
|
||||
# If there is no /etc/puppet/hiera.yaml, try to symlink it to the default
|
||||
fn='/etc/puppet/hiera-default.yaml'
|
||||
test -f "${fn}" && ln -sf "${fn}" /etc/puppet/hiera.yaml
|
||||
fi
|
Loading…
Add table
Reference in a new issue