Skip to content

Latest commit

 

History

History
305 lines (270 loc) · 10.7 KB

community.missing_collection.docker_registry_info_module.rst

File metadata and controls

305 lines (270 loc) · 10.7 KB

community.missing_collection.docker_registry_info

Get information from Docker Registry (v2).

Version added: 0.4.0

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

  • requests
Parameter Choices/Defaults Comments
get_manifest
boolean
    Choices:
  • no
  • yes
get image manifest repo_name and tag_name?
host
string
Default:
"localhost"
hostname/ip of docker registry.
limit
integer
Default:
1000
number of results retrieved in one call.
list_repos
boolean
    Choices:
  • no
  • yes
get all repositories?
list_tags
boolean
    Choices:
  • no
  • yes
get all repo_name tags?
password
string
password for docker registry username.
port
string
Default:
"5000"
port number of docker registry.
repo_name
string
repository name when list_tags is `True`.
scheme
string
    Choices:
  • http ←
  • https
http scheme for docker registry.
tag_name
string
image tag name when get_manifest is `True`.
username
string
docker registry username.

- name: connection test
  community.missing_collection.docker_registry_info:
    scheme: 'http'
    host: 'localhost'
    port: 5000

- name: get all docker repositories
  community.missing_collection.docker_registry_info:
    scheme: 'http'
    host: 'localhost'
    port: 5000
    list_repos: true
  register: '__'

- name: get all docker repository tags
  community.missing_collection.docker_registry_info:
    list_tags: true
    repo_name: '{{ __.result.repositories[0] }}'

- name: get image tag manifest
  community.missing_collection.docker_registry_info:
    get_manifest: true
    repo_name: '{{ __.result.repositories[0] }}'
    tag_name: '{{ tags.result.tags[0] }}'

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

Key Returned Description
result
dictionary
when success.
result of docker registry api.

Sample:
{'repositories': ['test-timedb']}


Authors