Satellite 6: Execute bulk remote commands and download / updates for multiple systems with Satellite 6 (like SSM in Satellite 5)

Solution Verified - Updated -

Environment

  • Red Hat Satellite v.6
  • katello

Issue

  • Execute bulk remote commands and download / updates for multiple systems with Satellite 6 (like SSM in Satellite 5)

Resolution

  • Currently there is no such feature available with Satellite 6.

  • A feature request has been filed for the issue and is being worked upon by engineering team, for more information refer our bugzilla link : Bug 1187100.

  • For any further queries please contact Red Hat Technical Support.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

2 Comments

This can be achieve with the following foreman plugin
http://theforeman.org/plugins/foreman_remote_execution/0.0/ after that you going to have job templates in hosts tab just create a new job template for example
Template that allow install remove and update packages

Name: Package Actions
die() {
echo "${1}, exiting..."
exit $2
}

<% unless input("pre_script").blank? -%>

Pre Script

<%= input("pre_script") %>
RETVAL=$?
[ $RETVAL -eq 0 ] || die "Pre script failed" $RETVAL
<% end -%>

<% if @host.operatingsystem.family == 'Redhat' -%>
yum -y <%= input("action") %> <%= input("package") %>
<% elsif @host.operatingsystem.family == 'Debian' -%>
apt-get -y <%= input("action") %> <%= input("package") %>
<% end -%>
RETVAL=$?
[ $RETVAL -eq 0 ] || die "Package action failed" $RETVAL

<% unless input("post_script").blank? -%>

Post Script

<%= input("post_script") %>
RETVAL=$?
[ $RETVAL -eq 0 ] || die "Post script failed" $RETVAL
<% end -%>

Go to job tab
Job name:Package Actions
Provider type:sshexecutorprovider

Name: pre-script
input type:user input
Description: pre-script before package install update or remove

Name: package
input type:user input
Description: name of the package

Name: action
input type:user input
Description: The package action: install, update, or remove

Name:post-script
input type:user input
Description: Post script needed after package installed,removed or update

After this save the template and go to hosts-->all hosts tick the host that you want to apply the job and in the top right side next to new host button is going to appear a new button select action just click there and click run job

Choose the job name and provide any input necessary for the job complete.

With this you can deploy any command to the host via ssh as remote commands.

Source code here

https://github.com/theforeman/foreman_remote_execution

As per kb https://access.redhat.com/solutions/1169443, it seems it is fixed. please confirm