]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/ansible: Add/remove hosts
authorJuan Miguel Olmo Martínez <jolmomar@redhat.com>
Fri, 1 Feb 2019 11:06:04 +0000 (12:06 +0100)
committerJuan Miguel Olmo Martínez <jolmomar@redhat.com>
Thu, 21 Feb 2019 11:01:53 +0000 (12:01 +0100)
commitb6e8da7e5597033fe25e2ae4695576e6de933fb5
treef034fcf97bf6bf5c413e65817da02bf1f07cf679
parentc927900456b33388d1150baa75735827d1094772
mgr/ansible: Add/remove hosts

- Implementation of operations add/rm hosts
- Improvement of error management in Ansible Runner Service Client

- Addressed @sebastian-philipp suggestions and findings
- Remove the <role> parameter of hosts operations.
Now all the hosts are placed by default in a specific Ansible Inventory group called <orchestrator>.
Discussion on-going about to keep Host management API endpoint or not.
If hosts management is removed, further modifications will be needed to:
- Keep updated the <host inventory> in the orchestrator
- Manage hosts groups when operations are executed
- Adapted new commands (host add/rm) to use to the new <orchestrator_cli> syntax

- Improved error management
- Added return information to Add/remove host methods docstring

- Removed redundant exceptions following @sebastian-philipp suggestion

- Removed duplicated code
- Removed extra space

- Fixed unit tests
- Improved error management in launch playbook

- removed unused param in docstring (orchestrator.py)

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
src/pybind/mgr/ansible/ansible_runner_svc.py
src/pybind/mgr/ansible/module.py
src/pybind/mgr/ansible/tests/test_client_playbooks.py