I have my GitHub Personal Access Token (PAT) stored as a credential in Ansible Tower.
How can I reference this value in my playbook?
I've searched for examples for other Credential Types like "How to use Ansible Tower login credentials in playbook?", but I haven't found one for my use case.
The official documentation also doesn't seem to have examples of how to use this type in a playbook.
Below is an example on how to use "AWS Credential" in a playbook.
vars:
aws:
access_key: '{{ lookup("env", "AWS_ACCESS_KEY_ID") }}'
secret_key: '{{ lookup("env", "AWS_SECRET_ACCESS_KEY") }}'
security_token: '{{ lookup("env", "AWS_SECURITY_TOKEN") }}'
Similarly there should be a syntax for "Github Personal Access Token" credential too but I'm unable to find that info. Ideally it should look something like below
vars:
git:
token: '{{ lookup("env", "GITHUB_PAT") }}'