community.general.github_secrets_info module – List GitHub repository or organization secrets
Note
This module is part of the community.general collection (version 12.6.1).
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 |
|---|---|
api_url string | The base URL for the GitHub API. Default: |
organization aliases: org, username string / required | The GitHub username or organization name. |
repository aliases: repo string | The name of the repository. If not provided, the listing will be at organization level. |
token string / required | The GitHub token used for authentication. |
Attributes
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full This action does not modify state. | Can run in |
diff_mode | 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 |
|---|---|
secrets list / elements=dictionary | The list of currently existing secrets. Returned: success Sample: |
|
created_at string |
The date and time when the secret was created. Returned: success |
|
name string |
The name of the secret. Returned: success |
|
updated_at string |
The date and time when the secret was last updated. Returned: success |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/community/general/github_secrets_info_module.html