voxpupuli / puppet-yum

Puppet module for Yum
https://forge.puppet.com/puppet/yum
MIT License
16 stars 101 forks source link

add requirement expression in metadata of task #138

Closed Dan33l closed 5 years ago

Dan33l commented 5 years ago

Pull Request (PR) descriptionly

The current task expect Puppet agent installed on the remote.

If it is missing on the remote we get the following error message :

 bolt task run yum action=update --nodes node1 --modulepath ./modules
Started on node1...
Failed on node1:
  The task failed with exit code 126:
  bash: /tmp/594417c7-c1ef-4956-b9ba-b07933580923/init.rb: /opt/puppetlabs/puppet/bin/ruby: bad interpreter: Aucun fichier ou dossier de ce type

  {
  }
Failed on 1 node: node1
Ran on 1 node in 0.81 seconds

This PR add the expression of the requirement in bolt. This should permit to get a nicer error message:

bolt task run yum action=update --nodes node1 --modulepath ./modules
Started on node1...
Failed on node1:
  No suitable implementation of yum for node1
Failed on 1 node: node1
Ran on 1 node in 0.15 seconds