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

Latest response

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.

Responses