Ask Your Question

Revision history [back]

puppet module list fails

When 'puppet module list' fails, how to handle the error by ignoring it?

Query:

  generate("/bin/bash","-c",'for env in $(ls -1 /etc/puppetlabs/code/environments); do /opt/puppetlabs/bin/puppet module list --environment $env --modulepath /etc/puppetlabs/code/environments/$env/modules; done')