r10k: Replace removed env parameters by options

The environment parameters, PUPPETFILE_DIR and PUPPETFILE is no longer
valid in r10k command, so should be replaced by options, --moduledir
and --puppetfile[1].

[1] ea477d4729

Change-Id: I0d12f2c4efafc7a8a998d846814c94eb39927c26
This commit is contained in:
Takashi Kajinami 2020-05-10 14:12:18 +09:00
parent 3a3aa790ef
commit baecae0460
1 changed files with 7 additions and 2 deletions

View File

@ -9,7 +9,9 @@
# - ``SCRIPT_DIR`` must be set to script path # - ``SCRIPT_DIR`` must be set to script path
# - ``GEM_BIN_DIR`` must be set to Gem bin directory # - ``GEM_BIN_DIR`` must be set to Gem bin directory
install_external() { install_external() {
PUPPETFILE=${SCRIPT_DIR}/Puppetfile1 r10k -v DEBUG puppetfile install r10k -v DEBUG puppetfile install \
--puppetfile ${SCRIPT_DIR}/Puppetfile1 \
--moduledir ${PUPPETFILE_DIR}
} }
# Install Puppet OpenStack modules from zuul checkouts # Install Puppet OpenStack modules from zuul checkouts
@ -54,11 +56,14 @@ install_openstack() {
# Install all Puppet modules with r10k # Install all Puppet modules with r10k
# Uses the following variables: # Uses the following variables:
# #
# - ``PUPPETFILE_DIR`` must be set to Puppet modules directory
# - ``SCRIPT_DIR`` must be set to script path # - ``SCRIPT_DIR`` must be set to script path
install_all() { install_all() {
# When installing from local source, we want to install the current source # When installing from local source, we want to install the current source
# we're working from. # we're working from.
PUPPETFILE=${SCRIPT_DIR}/Puppetfile r10k -v DEBUG puppetfile install r10k -v DEBUG puppetfile install \
--puppetfile ${SCRIPT_DIR}/Puppetfile1 \
--moduledir ${PUPPETFILE_DIR}
cp -a ${SCRIPT_DIR} ${PUPPETFILE_DIR}/openstack_integration cp -a ${SCRIPT_DIR} ${PUPPETFILE_DIR}/openstack_integration
} }