--
"E' assurdo impiegare gli uomini di intelligenza eccellente per fare
calcoli che potrebbero essere affidati a chiunque se si usassero delle
macchine"
Gottfried Wilhelm von Leibnitz, Filosofo e Matematico (1646-1716)
"Internet è la più grande biblioteca del mondo.
Ma il problema è che i libri sono tutti sparsi sul pavimento"
John Allen Paulos, Matematico (1945-vivente)
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hello,
-user can just specify one user, but what I need is to specify multi users in one command line, like "user1@ip1, user2@ip2"
Luca 'remix_tj' Lorenzetto
unread,
Sep 28, 2022, 3:17:41 AM9/28/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
Hello,
On Wed, Sep 28, 2022 at 9:14 AM Cola CoCo <wangj...@gmail.com> wrote:
>
> Hello,
> -user can just specify one user, but what I need is to specify multi users in one command line, like "user1@ip1, user2@ip2"
>
No way to do it without using an inventory.
Luca
Rowe, Walter P. (Fed)
unread,
Sep 28, 2022, 7:12:49 AM9/28/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
I agree. This has to be done in the inventory. No way to do this on the command line. Inventories can be powerful and help you not have to specify so many things on the command line. You can have group vars and host vars in an inventory.
Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
the 'command line inventory' is still an inventory, by default handled
by the `host_list` plugin, you can also use the 'advanced_host_list`
plugin or develop your own that can handle any notation you throw at
it.
--
----------
Brian Coca
Brian Coca
unread,
Sep 28, 2022, 9:36:30 AM9/28/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
the issue is that user@ip breaks the 'address parsing' that would
separate ip:port, while user@ip is 'valid' as a hostname and when
passed to ssh 'just works'tm
So you would just need to modify the plugin to extract user@host
(puting the 'user' value into ansible_user) before calling the
parse_address function.