Run custom command on host

Hi,
I would like to have a special Button on the Host Page (for some of my
hosts) which executes a custom command on that host. Kind of like the "Run
Puppet" Button, but with my own command.

How would you do that? I thought about integrating this with mcollective,
but theforeman seems to be missing the integration.

I really appreciate any ideas on this, thanks.

Regards,
Kai

Hi Kai,

we use Rundeck to execute commands on hosts. You can connect Rundeck and
Foreman to "reuse" Puppet facts.

You could tap directly into Foreman API with Rundeck, but we use a cron job
to export the Foreman information to
/dev/shm once every few hours. With direct API access Rundeck slows down as
it always pulls all info from Foreman
when clicking on Nodes in Rundeck. Depending on the amount of hosts that
might take a few minutes.

With the local file the access is much faster.

Kind regards

Stefan

··· On Friday, April 24, 2015 at 1:27:02 PM UTC+2, Kai Timmer wrote: > > Hi, > I would like to have a special Button on the Host Page (for some of my > hosts) which executes a custom command on that host. Kind of like the "Run > Puppet" Button, but with my own command. > > How would you do that? I thought about integrating this with mcollective, > but theforeman seems to be missing the integration. > > I really appreciate any ideas on this, thanks. > > Regards, > Kai >

> Hi Kai,
>
> we use Rundeck to execute commands on hosts. You can connect Rundeck and
> Foreman to "reuse" Puppet facts.
>
> You could tap directly into Foreman API with Rundeck, but we use a cron
> job to export the Foreman information to
> /dev/shm once every few hours. With direct API access Rundeck slows down
> as it always pulls all info from Foreman
> when clicking on Nodes in Rundeck. Depending on the amount of hosts that
> might take a few minutes.
>
> With the local file the access is much faster.
>

is that using the rundeck plugin [1] or directly over the api?

Ohad

[1] https://github.com/theforeman/foreman_host_rundeck

··· On Sun, Apr 26, 2015 at 7:39 PM, Stefan Meyer wrote:

Kind regards

Stefan

On Friday, April 24, 2015 at 1:27:02 PM UTC+2, Kai Timmer wrote:

Hi,
I would like to have a special Button on the Host Page (for some of my
hosts) which executes a custom command on that host. Kind of like the “Run
Puppet” Button, but with my own command.

How would you do that? I thought about integrating this with mcollective,
but theforeman seems to be missing the integration.

I really appreciate any ideas on this, thanks.

Regards,
Kai


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.