Skip to content

Latest commit

 

History

History
193 lines (159 loc) · 7 KB

community.missing_collection.docker_hub_personal_token_info_module.rst

File metadata and controls

193 lines (159 loc) · 7 KB

community.missing_collection.docker_hub_personal_token_info

Get information about docker hub personal tokens.

Version added: 0.4.0

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

  • requests
Parameter Choices/Defaults Comments
page
integer
Default:
1
page number of personal tokens retrieve call.
page_size
integer
Default:
100
number of personal tokens retrieved in one call.
token
string / required
jwt/Bearer token for docker hub api.
url
string
Default:
docker hub api.
uuid
string
uuid of personal token.
if defined, will fetch info about given uuid persona token only.
else all personal tokens will be fetched.

- name: get jwt token from docker hub
  community.missing_collection.docker_hub_token:
    username: 'testUser'
    password: 'aDL0xxxxxxxxxxoQt6'
  register: '__'

- name: get information about all personal tokens
  community.missing_collection.docker_hub_personal_token_info:
    token: '{{ __.token }}'
  register: '__all'

- name: get information about one personal tokens
  community.missing_collection.docker_hub_personal_token_info:
    token: '{{ __.token }}'
    uuid: '{{ __all.result.results[0].uuid }}'

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 hub api.

Sample:
{'count': 1, 'next': 'string', 'previous': 'string', 'active_count': 1, 'results': [{'uuid': 'b30bbf97-506c-4ecd-aabc-842f3cb484fb', 'client_id': 'HUB', 'creator_ip': '127.0.0.1', 'creator_ua': 'some user agent', 'created_at': '2021-07-20T12:00:00.000Z', 'last_used': 'string', 'generated_by': 'manual', 'is_active': True, 'token': '', 'token_label': 'My read only token', 'scopes': ['repo:read']}]}


Authors