mirror of https://github.com/ansible/ansible.git
docker_service: make PyYAML requirement explicit
The "Developing Modules" documentation states: Include a minimum of dependencies if possible. If there are dependencies, document them at the top of the module file, and have the module raise JSON error messages when the import fails. When docker_service runs on a remote host without PyYAML it crashes with ImportError. This patch raises a JSON error message when import fails, but only if the PyYAML module is actually used. It's only needed when the "definition" parameter is given. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>reviewable/pr18780/r1
parent
1eb63c7567
commit
8254e2b547
Loading…
Reference in New Issue