Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Create just one Job (hammer job-invocation create) for a list of servers listed in a file

    Posted on

    Hello everyone,

    I'm having this issue about creating a job for several servers listed in a file.

    For example I have this:

    FILE:
    hostA
    hostB
    hostC
    ....

    And I would like to do something like: hammer job-invocation create --job-template "Run Command - SSH Default" --inputs command="df -h" --search-query "name ($FILE)"

    Could you tell me the proper way to do this? Do I have to format the file to have the following format: "hostA, hostB, hostC..." ?

    I know that I can do something like "--search-query "name ^ (hostA, hostB, hostC)" but there is any way to do that the way I need it? Meaning to use a FILE in the "search query" parameter?

    Would it be possible without having to format the file?

    Thanks in advance.

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat