Use hiera v5 format
Use hiera version 5 instead of version 3 which is deprecated and outputs a warning. Change-Id: I26ee3329aa75109625476d6c355e82fed2c050e6
This commit is contained in:
parent
85954db357
commit
a5b22a67fe
@ -272,7 +272,12 @@ if [ -f $LOG_DIR/rabbitmq ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# hiera
|
# hiera config
|
||||||
|
if [ -f $SCRIPT_DIR/hiera.yaml ]; then
|
||||||
|
mv $SCRIPT_DIR/hiera.yaml $LOG_DIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
# hiera data
|
||||||
if [ -d $SCRIPT_DIR/hiera ]; then
|
if [ -d $SCRIPT_DIR/hiera ]; then
|
||||||
mv $SCRIPT_DIR/hiera $LOG_DIR
|
mv $SCRIPT_DIR/hiera $LOG_DIR
|
||||||
fi
|
fi
|
||||||
|
19
functions
19
functions
@ -113,14 +113,17 @@ install_modules_unit() {
|
|||||||
configure_hiera() {
|
configure_hiera() {
|
||||||
cat <<EOF >$HIERA_CONFIG
|
cat <<EOF >$HIERA_CONFIG
|
||||||
---
|
---
|
||||||
:backends:
|
version: 5
|
||||||
- yaml
|
defaults:
|
||||||
:yaml:
|
datadir: ${SCRIPT_DIR}/hiera
|
||||||
:datadir: "${SCRIPT_DIR}/hiera"
|
data_hash: yaml_data
|
||||||
:hierarchy:
|
hierarchy:
|
||||||
- "%{::operatingsystem}"
|
- name: "OS specific"
|
||||||
- "%{::osfamily}"
|
path: "%{::operatingsystem}.yaml"
|
||||||
- common
|
- name: "OS family specific"
|
||||||
|
path: "%{::osfamily}.yaml"
|
||||||
|
- name: "Common"
|
||||||
|
path: "common.yaml"
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ export MANAGE_PUPPET_MODULES=${MANAGE_PUPPET_MODULES:-true}
|
|||||||
export MANAGE_REPOS=${MANAGE_REPOS:-true}
|
export MANAGE_REPOS=${MANAGE_REPOS:-true}
|
||||||
export ADD_SWAP=${ADD_SWAP:-true}
|
export ADD_SWAP=${ADD_SWAP:-true}
|
||||||
export SWAP_SIZE_GB=${SWAP_SIZE_GB:-4}
|
export SWAP_SIZE_GB=${SWAP_SIZE_GB:-4}
|
||||||
export HIERA_CONFIG=${HIERA_CONFIG:-${SCRIPT_DIR}/hiera/hiera.yaml}
|
export HIERA_CONFIG=${HIERA_CONFIG:-${SCRIPT_DIR}/hiera.yaml}
|
||||||
export MANAGE_HIERA=${MANAGE_HIERA:-true}
|
export MANAGE_HIERA=${MANAGE_HIERA:-true}
|
||||||
export PUPPET_ARGS="${PUPPET_ARGS} --detailed-exitcodes --color=false --test --summarize --trace --hiera_config ${HIERA_CONFIG} --logdest ${WORKSPACE}/puppet.log"
|
export PUPPET_ARGS="${PUPPET_ARGS} --detailed-exitcodes --color=false --test --summarize --trace --hiera_config ${HIERA_CONFIG} --logdest ${WORKSPACE}/puppet.log"
|
||||||
export DISTRO=$(lsb_release -c -s)
|
export DISTRO=$(lsb_release -c -s)
|
||||||
|
Loading…
Reference in New Issue
Block a user