You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to leverage the aws inventory plugin for an action. I would like my action to run against ec2 instances deployed in aws. The aws inventory plugin allows me to dynamically look up the instances I want to run against using the aws API.
I would also like to leverage the aws ssm connection plugin.
What I Did
I am running ansible-rulebook pointed to my aws inventory. This is the same inventory I want my action to use.
Here is the output when ansible-rulebook attempts to run the action build_server.
2/3/2023, 2:16:41 PM | PLAY RECAP *************** | eda-demo
2/3/2023, 2:16:41 PM | skipping: no hosts matched | eda-demo
2/3/2023, 2:16:41 PM | [WARNING]: * Failed to parse /tmp/run_playbookmfk3b58g/inventory/hosts with | eda-demo
2/3/2023, 2:16:41 PM | yaml plugin: Plugin configuration YAML file, not YAML inventory | eda-demo
2/3/2023, 2:16:41 PM | [WARNING]: * Failed to parse /tmp/run_playbookmfk3b58g/inventory/hosts with | eda-demo
2/3/2023, 2:16:41 PM | ini plugin: Invalid host pattern 'compose:' supplied, ending in ':' is not | eda-demo
2/3/2023, 2:16:41 PM | allowed, this character is reserved to provide a port. | eda-demo
2/3/2023, 2:16:41 PM | [WARNING]: Unable to parse /tmp/run_playbookmfk3b58g/inventory/hosts as an | eda-demo
2/3/2023, 2:16:41 PM | inventory source | eda-demo
2/3/2023, 2:16:41 PM | [WARNING]: Unable to parse /tmp/run_playbookmfk3b58g/inventory as an inventory | eda-demo
2/3/2023, 2:16:41 PM | source | eda-demo
2/3/2023, 2:16:41 PM | [WARNING]: No inventory was parsed, only implicit localhost is available | eda-demo
2/3/2023, 2:16:41 PM | [WARNING]: provided hosts list is empty, only localhost is available. Note that | eda-demo
2/3/2023, 2:16:41 PM | the implicit localhost does not match 'all' | eda-demo
2/3/2023, 2:16:41 PM | [WARNING]: Could not match supplied host pattern, ignoring: build_server | eda-demo
From the output, it appears the action run is looking for a default host file and not the inventory that ansible-rulebook was passed. What inventory do the actions use? Is it possible to get an action to use a custom inventory?
The text was updated successfully, but these errors were encountered:
Hello @quietjoy
Ansible-rulebook doesn't process inventories through ansible plugins. Currently only static inventories in yaml format are supported. We have plan to extend the support in the future.
0.10.1
3.11.0
fedora:37
Description
I am trying to leverage the aws inventory plugin for an action. I would like my action to run against ec2 instances deployed in aws. The aws inventory plugin allows me to dynamically look up the instances I want to run against using the aws API.
I would also like to leverage the aws ssm connection plugin.
What I Did
I am running ansible-rulebook pointed to my aws inventory. This is the same inventory I want my action to use.
My rulebook...
The file
tasks/build_server.yml
My inventory leveraging the aws inventory plugin
Here is the output when ansible-rulebook attempts to run the action
build_server
.From the output, it appears the action run is looking for a default host file and not the inventory that ansible-rulebook was passed. What inventory do the actions use? Is it possible to get an action to use a custom inventory?
The text was updated successfully, but these errors were encountered: