diff options
author | Brian Coca <bcoca@ansible.com> | 2016-03-02 10:06:49 -0500 |
---|---|---|
committer | Brian Coca <bcoca@ansible.com> | 2016-03-02 10:06:49 -0500 |
commit | cc6adf44b6486dac74af7b0732edebfb69d2b7fb (patch) | |
tree | 5b3d2eec8f3acf87c325727b3e8fc4ea2ff15e77 | |
parent | 7779e372831d8b858e6d76cbc7aee3bbbecf0a51 (diff) | |
parent | 804c6f9c09e4d0004f5f69fe734e531313cf4ba8 (diff) | |
download | ansible-cc6adf44b6486dac74af7b0732edebfb69d2b7fb.tar.gz |
Merge pull request #14738 from chouseknecht/docker_volume_proposal
Adding docker_volume module proposal
-rw-r--r-- | docs/proposals/docker/docker_files_module.md | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/docs/proposals/docker/docker_files_module.md b/docs/proposals/docker/docker_files_module.md new file mode 100644 index 0000000000..4a9d5e47a8 --- /dev/null +++ b/docs/proposals/docker/docker_files_module.md @@ -0,0 +1,82 @@ +# Docker_Volume Modules Proposal + +## Purpose and Scope + +The purpose of docker_volume is to manage volumes. + +Docker_volume will manage volumes using docker-py to communicate with either a local or remote API. It will +support API versions >= 1.14. API connection details will be handled externally in a shared utility module similar +to how other cloud modules operate. + +## Parameters + +Docker_volume accepts the parameters listed below. Parameters for connecting to the API are not listed here, as they +will be part of the shared module mentioned above. + +``` +driver: + description: + - Volume driver. + default: local + +force: + description: + - Use with state 'present' to force removal and re-creation of an existing volume. This will not remove and + re-create the volume if it is already in use. + +name: + description: + - Name of the volume. + required: true + default: null + +options: + description: + - Dictionary of driver specific options. The local driver does not currently support + any options. + default: null + +state: + description: + - "absent" removes a volume. A volume cannot be removed if it is in use. + - "present" create a volume with the specified name, if the volume does not already exist. Use the force + option to remove and re-create a volume. Even with the force option a volume cannot be removed and re-created if + it is in use. + default: present + choices: + - absent + - present +``` + +## Examples + +``` +- name: Create a volume + docker_volume: + name: data + +- name: Remove a volume + docker_volume: + name: data + state: absent + +- name: Re-create an existing volume + docker_volume: + name: data + state: present + force: yes +``` + +## Returns + +``` +{ + changed: true, + failed: false, + rc: 0, + action: removed | created | none + results: { + < show the result of docker inspect of an affected volume > + } +} +```
\ No newline at end of file |