community.general.github_secrets_info module – List GitHub repository or organization secrets
Note
This module is part of the community.general collection (version 12.5.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.general.
To use it in a playbook, specify: community.general.github_secrets_info.
New in community.general 12.5.0
Synopsis
List secrets in a GitHub repository or organization.
Parameters
Parameter |
Comments |
|---|---|
The base URL for the GitHub API. Default: |
|
The GitHub username or organization name. |
|
The name of the repository. If not provided, the listing will be at organization level. |
|
The GitHub token used for authentication. |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full This action does not modify state. |
Can run in |
|
Support: N/A This action does not modify state. |
Returns details on what has changed (or possibly needs changing in |
Examples
- name: List Github secret
community.general.github_secrets_info:
token: "{{ lookup('ansible.builtin.env', 'GITHUB_TOKEN') }}"
repository: "ansible"
organization: "ansible"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The list of currently existing secrets. Returned: success Sample: |
|
The date and time when the secret was created. Returned: success |
|
The name of the secret. Returned: success |
|
The date and time when the secret was last updated. Returned: success |