Access to different gateways by using a list of passwords.

24 views
Skip to first unread message

Niyazi Gökberg Gündüz

unread,
Nov 30, 2022, 6:15:31 AM11/30/22
to Ansible Project
Hi,  I have over 300 gateways which I need to connect by using passwords which is a list of couple different passwords for the first time, then I will deploy the ssh keys. To connect those gateways, I need to loop over a list of vaulted passwords on each gateway. Any idea how to do that?
Thanks in advance.
Berk

Rowe, Walter P. (Fed)

unread,
Nov 30, 2022, 6:22:32 AM11/30/22
to ansible...@googlegroups.com
Perhaps use a filter to create a combined JSON list of inventory and passwords that ends up with something like this:

{ machine: machineA, password: password1 },
{ machine: machineA, password: password2 },
{ machine: machineA, password: password3 },
{ machine: machineB, password: password1 },
{ machine: machineB, password: password2 },
{ machine: machineB, password: password3 },
{ machine: machineC, password: password1 },
{ machine: machineC, password: password2 },
{ machine: machineC, password: password3 }

You would then loop through this and use item.machine / item.password?

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0012422d-5cdd-4022-8118-3697fde865can%40googlegroups.com.

Message has been deleted

Niyazi Gökberg Gündüz

unread,
Nov 30, 2022, 6:29:45 AM11/30/22
to Ansible Project
thanks for the quick response Walter, I will try that, and I think I can also register that correct passwords for each gateway in this case. Thanks!
best.

Reply all
Reply to author
Forward
0 new messages