install
task incorrectly identifies Puppet as not installed on target hosts missing the which
program.
#703
Labels
bug
Something isn't working
Describe the Bug
If a target of the
install
task does not have awhich
program available, but does have Puppet installed, theinstall
task incorrectly attempts to re-install puppet.Expected Behavior
If Puppet and its dependencies are installed correctly on a Linux target, the
install
task in this module should not attempt to reinstall them.Steps to Reproduce
pacman -S puppet
.which
is not installed on the Arch target (which is the default situation of fresh installs):pacman -R which
.install
task on the Arch target:bolt task run puppet_agent::install --targets arch --log-level debug
.That failure is expected: Arch is not supported by this module for Puppet installation, but there's no reason it can't be supported by this module if Puppet is already correctly installed on the target.
Environment
Additional Context
The failure is occurring due to this line: https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/main/tasks/install_shell.sh#L147
which
is not a shell builtin or a requirement of a POSIX-compliant environment.Surprisingly (at least to me), it's also not installed by default as a transitive or part of the core system packages on Arch, so this is less "my environment is weird for personal reasons" and more "a popular distro is
weirdmissing a dependency of this module".The text was updated successfully, but these errors were encountered: