Conversation
This adds support for using docker-compose (formerly fig) as a module. For more information, see here: http://docs.docker.com/compose/
The exception handling is too generic, errors will depend on |
description: | ||
- Select the compose action to perform | ||
required: true | ||
choices: ['build', 'kill', 'pull', 'rm', 'scale', 'start', 'stop', 'restart', 'up'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command is not a pattern we like to follow, we prefer a more imperative 'state', in this case some I would need to know more about some of the options which don't seem to fit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean s/imperative/declarative/ right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ what he said.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case though, 'state' isn't really accurate. state=scale doesn't make much sense to me. state=up and state=start are two different commands and I think it would lead to confusion.
I noticed that this module lacks the .py extension. In current ansible, the ansible modules are python modules as well so they need to be named like docker_compose.py |
To be clear, for error handling the expectation is to catch errors from docker-compose and have an explict message in the module instead of passing up the exceptions message? |
no, normally the APIs give generic messages and are not very helpful to map to the ansible input, we prefer to use exception handling on 'connect/create/destroy' and return a message with the action attempted + the underlying exception. |
closing and reopening to kick travis, since there are a bunch of unrelated failures here |
I am going to have to abandon this for now. Each new revision of docker-compose is changing key parts of the structure. Almost like it wasn't meant to be a library to be imported ;) I am going to wait for that structure to stabilize before attempting. If someone else wants to continue the work they can go for it |
Thanks @SamYaple. |
This adds support for using docker-compose (formerly fig) as a module.
For more information, see here: http://docs.docker.com/compose/