diff --git a/tasks/install_shell.json b/tasks/install_shell.json index 2b00d8911..317d4d27f 100644 --- a/tasks/install_shell.json +++ b/tasks/install_shell.json @@ -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]" } } } diff --git a/tasks/install_shell.sh b/tasks/install_shell.sh index 518d8a60e..970272c1e 100644 --- a/tasks/install_shell.sh +++ b/tasks/install_shell.sh @@ -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 @@ -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