Skip to content

Latest commit

 

History

History
152 lines (119 loc) · 5.15 KB

community.missing_collection.docker_volume_info_module.rst

File metadata and controls

152 lines (119 loc) · 5.15 KB

community.missing_collection.docker_volume_info

Get information about Docker Volumes.

Version added: 0.4.0

The below requirements are needed on the host that executes this module.

  • docker
Parameter Choices/Defaults Comments
base_url
string
Default:
"unix://var/run/docker.sock"
docker unix sock location.
id
string
id of docker volume

- name: get all volumes
  community.missing_collection.docker_volume_info:
  register: '__'

- name: get info about one volume
  community.missing_collection.docker_volume_info:
    id: '{{ __.volumes[0].id }}'

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
attrs
dictionary
when success and defined id.
attributes of given volume

Sample:
{'CreatedAt': '2021-09-23T21:01:17Z', 'Driver': 'local', 'Labels': None, 'Mountpoint': '/var/lib/docker/volumes/34a961a26cd0cb99cdb2e5912b28f02f3460081590243067d1c6cedf50cb8e02/_data', 'Name': '34a961a26cd0cb99cdb2e5912b28f02f3460081590243067d1c6cedf50cb8e02', 'Options': None, 'Scope': 'local'}
volumes
list
when success.
list of all the docker volumes.

Sample:
[{'id': '34a961a26cd0cb99cdb2e5912b28f02f3460081590243067d1c6cedf50cb8e02', 'name': '34a961a26cd0cb99cdb2e5912b28f02f3460081590243067d1c6cedf50cb8e02'}]


Authors