Hammer command fails with Too Many Arguments Error.

Solution Verified - Updated -

Issue

  • Hammer command fails with below error:
# hammer job-invocation create --job-template "Run Command - Script Default" --search-query "hostgroup = HG_TEST" --inputs command="export TEST_HOST=HOST_FQDN;export HOST_PORT=443;export HOST_PROTOCOL=https;export HOST_KEY="79cf6a85b0a6e1568957a7df13b23bd3dfa309e9bf31a4e7751486f75e56c288";yum -y install host_agent mutt;yum list host_agent>/tmp/install_host_agent.txt;echo|mutt -s "install_host_agent `hostname -s`" -a /tmp/install_host_agent.txt -- customer@example.com"
Error: Too many arguments.

Environment

  • Red Hat Satellite 6.
  • Hammer Command Line.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content