The ara-clients standalone repository is being discontinued.
The clear and logical separation of components was nice but the overhead
in complexity was not worth it.
Change-Id: Ie548db190c5cb1e3634ff056727f0ee81986ce1e
There are new jobs defined in ara-infra for testing ara-plugins with
the other ARA components. Add them to the check and gate pipelines.
Depends-On: https://review.openstack.org/#/c/630303
Change-Id: I1582084a73b5d1afb75cc07c718de643934678f8
Ansible 2.8 will release with a new way of recovering CLI options.
We need to keep handling the previous method as long as all releases
that don't contain ansible.context have not been retired.
Change-Id: I47dbe579c78bc9e46db8d9f92c2eed92e490da9d
This simplifies the code in ara plugins and leaves the logic of client
selection to ara.clients.
Change-Id: I707efa35507ae9f292d21816c0606ee541df9f6c
Depends-On: https://review.openstack.org/#/c/631828/
Hosts in Ansible are unique per playbook because there is no concept
of persistence between different playbook runs. A host could be named
"webserver" and be a completely different host in two playbook runs.
In order to make it possible to track a given host across different
playbook runs, it is now possible to set a host alias.
Host aliases are explicitely provided by the user as the "ara_host_alias"
hostvar which defaults to the inventory hostname if it is not set.
Change-Id: Iaa3b0ce57968b9e4977d25a559e21e67a37b1d62
This allows users to give arbitrary names to their playbooks based
on the "ara_playbook_name" Ansible variable that can be supplied either
as a literal Ansible variable or as an extra_var.
Change-Id: I8bbe644003a1a277a9639167effdee1146907c6f
Files and hosts can be created from different places and as such,
we need to double check if they have not already been created
whenever we might want to create them.
It should not be possible to have the same file or the same host
more than once in a given playbook due to unique constraints.
Change-Id: I6023949f4ad026086ba690789ddeebf5bb1d0a0d
Depends-On: https://review.openstack.org/#/c/625948/
Depends-On: https://review.openstack.org/#/c/625961/
This is the equivalent of the 0.x "python -m ara.setup.callback_plugins"
and "python -m ara.setup.action_plugins".
This allows users to run "python -m ara.plugins" in order to determine
the location of the plugins.
Change-Id: I8fddf3507916ae58c83af5e8400e7f7af83ba98c
This port uses the (outdated) flask 1.0 as a base [1] since it had
already been switched to use the flask API and required less changes.
It otherwise doesn't change how the module itself works or the use
case for it.
The only tricky part in this implementation revolves around letting
the action plugin recover the playbook id for the playbook the plugin
is running from.
One one end, the callback saves the play uuid [2][3].
The play uuid is available to the action plugin by recursing through
its task inheritance to find the parent play's uuid.
Once the plugin has the play uuid, it is able to search for it and
recover the parent playbook's id.
[1]: 0d915282e6/ara/plugins/actions/ara_record.py
[2]: https://review.openstack.org/#/c/609076/
[3]: https://review.openstack.org/#/c/609078/
Change-Id: I396ff26a53caedef7dfbd7dafa7eba9a515ea7a3
Depends-On: https://review.openstack.org/#/c/618228/
This is the client-side implementation of playbook.status.
The logic is simple -- if there's a failure or an unreachable task,
the playbook is a failure.
It is created as 'running' by the playbook and transitions to
'completed' or 'failed' depending on the statistics at the end.
Change-Id: Ife3f4fe75a1eb2a627a52d289867b854c075ecd6
It's possible in ARA 0.x for users to specify playbook parameters
that won't be saved by ARA.
Add this to the 1.0 callback and rename them to arguments instead
of parameters.
Depends-On: https://review.openstack.org/610389
Change-Id: I517dd6f90eaee15f0d762242750c10a5fc9fc955
This will allow clients and plugins running within Ansible to identify
which play they are in and which playbook they are in.
Change-Id: I734999473423992d69555bb84bf601acf62d1eb8
Depends-On: https://review.openstack.org/#/c/609076/
This is the first iteration that allows us to save results
and host facts using the API in the callback.
Change-Id: I9d6450c7721887e7893dc966055a89787d9bd228
This implements adding hosts through the callback with the API.
TODO: Make sure hosts are added when recording results. That
ensures we take into account tasks such as add_host.
Change-Id: I2f750319a2cddbceab166d323c4bf11aee4c7bb4
Naming the callback simply 'default' overrides the actual Ansible
default callback. Name it something else so it doesn't clash.
Change-Id: I3a4269c5a4ec1bee3bd090c57e696032c2508a62
ara-plugins (callback modules, action plugins, etc.) requires
ansible and ara-clients so the plugins can communicate with the
API.
Change-Id: Ice090181f410b97ad9971d1d9a725a4d557c1442
This is a structure that will allow us to install everything under
"ara" as separate packages but inside the same module.
For example, installing ara-server will provide ara.server and
ara.api.
Installing ara-clients will provide ara.clients, ara-plugins will
supply ara.plugins, etc.
Change-Id: I4fc9a06b1da720120567a476c17e9543828adfa1