local/playbooks/UnixCLI.yaml
Kenneth Benzie (Benie) e711b9f3b2 Add optional GitHub API authentication headers
If the `GITHUB_TOKEN` is defined in the Ansible controller's
environment it is used to set the GitHub REST API authentication header.
This is they passed to all `uri` modules tasks which interact with the
GitHub REST API. If the `GITHUB_TOKEN` is not set, the authentication
header is not used.

Fixes #19
2024-04-06 16:35:01 +01:00

41 lines
734 B
YAML

---
- hosts: localhost
vars:
github_auth_headers: >-
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
roles:
- role: sudo
when: ansible_user_id != "root"
- role: python
- role: zsh
tags: unsafe
- role: neovim
- role: tmux
tags: unsafe
- role: ag
- role: bash
- role: bat
- role: curl
- role: editline
- role: fd
- role: fzf
- role: gh
- role: git
- role: glab
- role: htop
- role: jp
- role: jq
- role: readline
- role: ripgrep
- role: tidy
- role: tree
- role: watch
- role: wget
- role: yq
- role: llvm
- role: nodejs