Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is it possible to use wildcards or ranges of hosts or IP address? #294

Locked Answered by pkittenis
jringoot asked this question in Q&A
Discussion options

In parallel you can introduce a hostrange with {n..N} in the name or ip address
In ansible one can introduce ranges with [n:N] in the name or ip address
Is this possible in parallel-ssh? What is the syntax?

You must be logged in to vote

Thanks for the interest.

No. Generate the host list in python.

hosts = [f"192.168.1.{x}" for x in range(1,10)]
client = ParallelSSHClient(hosts)

Replies: 1 comment 2 replies

Comment options

Thanks for the interest.

No. Generate the host list in python.

hosts = [f"192.168.1.{x}" for x in range(1,10)]
client = ParallelSSHClient(hosts)
You must be logged in to vote
2 replies
Comment options

Thanks for your quick response, apparently backticks are accepted, which is also cool, see screenshot.
But I dont get the output

Screenshot from 2021年04月13日 21-31-34

Comment options

No idea what's been shown there. parallel-ssh cmd line script does not come from this project.

If you have a question or a bug, please make a new question or raise an issue that shows some python code using this library.

There are no restrictions in what the cmd can be in the library.

Answer selected by pkittenis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /