Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installdir parameter not defined in install_shell task #399

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tasks/install_shell.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
"install_options": {
"description": "optional install arguments to the windows installer (defaults to REINSTALLMODE=\"amus\")",
"type": "Optional[String]"
},
"installdir": {
"description": "optional install arguments - installer install directory ",
"type": "Optional[String]"
}
}
}
13 changes: 10 additions & 3 deletions tasks/install_shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ if [ `id -u` -ne 0 ]; then
echo "puppet_agent::install task must be run as root"
exit 1
fi
#Add installdir parameter value

if [ -f "$PT_installdir" ]; then
install_dir=$PT_installdir
else
installdir="/etc/puppetlabs/code/environments/production/modules"
fi

# Track to handle puppet5 to puppet6
if [ -f /opt/puppetlabs/puppet/VERSION ]; then
Expand All @@ -79,10 +86,10 @@ fi

# Retrieve Platform and Platform Version
# Utilize facts implementation when available
if [ -f "$PT__installdir/facts/tasks/bash.sh" ]; then
if [ -f "$PT_installdir/facts/tasks/bash.sh" ]; then
# Use facts module bash.sh implementation
platform=$(bash $PT__installdir/facts/tasks/bash.sh "platform")
platform_version=$(bash $PT__installdir/facts/tasks/bash.sh "release")
platform=$(bash $PT_installdir/facts/tasks/bash.sh "platform")
platform_version=$(bash $PT_installdir/facts/tasks/bash.sh "release")

# Handle CentOS
if test "x$platform" = "xCentOS"; then
Expand Down