Feature #2116
closedUse MCollective to trigger Puppet runs
Description
Much requested feature from the Foreman 1.1: what do you want to see next? thread.
Puppet run/kick is deprecated from Puppet 3.x and MCollective is recommended instead. Foreman should support using MCollective to execute the puppetd
agent (runonce
action) on the host.
Files
Updated by Dominic Cleal over 11 years ago
Christian McHugh implemented this by shelling out to mco: http://pastebin.com/1U8ibyrt
I think we should probably use the mco library, e.g. http://docs.puppetlabs.com/mcollective/simplerpc/clients.html, probably via the proxy for consistency.
Updated by Ohad Levy over 11 years ago
- Assignee deleted (
Ohad Levy)
it seems i had a really old branch too at https://github.com/ohadlevy/smart-proxy/tree/mc
Updated by Sam Kottler over 11 years ago
- Status changed from New to Assigned
- Assignee set to Sam Kottler
Updated by Nikolay Georgieff over 11 years ago
I have a workaround for foreman-proxy to use Mcollective:
[root@puppet proxy]# diff puppet.rb.orig puppet.rb
23c23
< command = %x[#{sudo} #{puppetrun} --host #{hosts.join(" --host ")}]
---
command = %x[#{sudo} /usr/bin/mco puppet runonce -I #{hosts.join(" --host ")}]
Updated by Sam Kottler over 11 years ago
Yep, there is a patch that I'm working on refactoring right now that does something not too dissimilar to that.
Updated by Mark Heily over 11 years ago
The 'puppetd' MCollective plugin is deprecated, and has been replaced by the 'puppet' plugin. We need to support both plugins. I've attached a patch that works for me.
Updated by Mark Heily over 11 years ago
Attaching a new version of the patch with a one-line change to use escape_for_shell() when running mco.
Updated by Dominic Cleal over 11 years ago
- Status changed from Assigned to Ready For Testing
- Assignee changed from Sam Kottler to Dominic Cleal
- Target version set to 1.2.0
Updated by Sam Kottler over 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset commit:"80f8a61f43504ec3a4753dda2ef201483e5ce855".