Run once on multiple Inventory Hosts with same ansible_host value
19 views
Skip to first unread message
Kevin Knox
unread,
Oct 11, 2023, 3:46:25 PM10/11/23
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 Project
I am importing my inventory from ServiceNow, so I have to go with what I'm given. I'm given multiple WebLogic Nodes per individual server, that is per ansible_host. I'd like the user to be able to pull all Inventory Hosts, but have the process run once per "ansible_host" sometimes and other times have the process run against each Inventory Host separately, so multiple times per ansible_host.
Is this possible without writing a "lock file" solution?
Thank you.
Brian Coca
unread,
Oct 11, 2023, 4:20:35 PM10/11/23
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
No need for lockfiles, I would use groups instead. Setup a group that
has one instance of inventory_hostname per ansible_host, then target
that group when you want to do 'single operation per real host'. for
'all' just use the all group.
--
----------
Brian Coca
Kevin Knox
unread,
Oct 11, 2023, 7:15:13 PM10/11/23
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
Lovely idea! Thank you!
Kevin
Sent from my iPhone
> On Oct 11, 2023, at 4:20 PM, Brian Coca <bc...@redhat.com> wrote:
>
> No need for lockfiles, I would use groups instead. Setup a group that