Add support for proxy networks & cleanup playbook vars

This commit is contained in:
2024-04-19 13:17:53 +01:00
parent a1296840f6
commit 5309683d94
30 changed files with 57 additions and 28 deletions

View File

@@ -1,4 +1,6 @@
---
- hosts: localhost
vars_files:
- vars/environment.yaml
roles:
- 1password

View File

@@ -2,10 +2,8 @@
- import_playbook: LinuxCLI.yaml
- import_playbook: UnixGUI.yaml
- hosts: localhost
vars:
github_auth_headers: >-
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
vars_files:
- vars/environment.yaml
roles:
- role: firefox
- role: kitty

View File

@@ -1,14 +1,14 @@
---
- hosts: localhost
vars:
github_auth_headers: >-
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
vars_files:
- vars/environment.yaml
roles:
- role: rpmfusion
when: ansible_os_family == 'RedHat' and ansible_distribution == 'Fedora'
- import_playbook: UnixCLI.yaml
- hosts: localhost
vars_files:
- vars/environment.yaml
roles:
- role: gdb
- role: podman

View File

@@ -1,9 +1,7 @@
---
- hosts: localhost
vars:
github_auth_headers: >-
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
vars_files:
- vars/environment.yaml
roles:
- role: sudo
when: ansible_user_id != "root"

View File

@@ -1,9 +1,7 @@
---
- hosts: localhost
vars:
github_auth_headers: >-
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
vars_files:
- vars/environment.yaml
roles:
- role: flatpak
when: ansible_os_family != "Darwin"

View File

@@ -1,9 +1,7 @@
---
- import_playbook: LinuxCLI.yaml
- hosts: localhost
vars:
github_auth_headers: >-
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
vars_files:
- vars/environment.yaml
roles:
- role: wsl

View File

@@ -1,9 +1,7 @@
---
- hosts: windows
vars:
github_auth_headers: >-
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
vars_files:
- vars/environment.yaml
roles:
- role: python
- role: git

View File

@@ -1,14 +1,14 @@
---
- import_playbook: UnixCLI.yaml
- hosts: localhost
vars_files:
- vars/environment.yaml
roles:
- role: system-info
- import_playbook: UnixGUI.yaml
- hosts: localhost
vars:
github_auth_headers: >-
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
vars_files:
- vars/environment.yaml
roles:
- role: mas

View File

@@ -0,0 +1,15 @@
---
# GitHub may rate limit unauthenticated API requests, this is more likely when
# behind a network proxy. Set the GITHUB_TOKEN environment variable to
# authenticate any GitHub API requests executed while playing roles.
github_auth_headers: >-
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
# When working behind a network proxy, set the http_proxy and https_proxy
# environment variables. These will be passed through to uses of the `get_url`
# module when playing roles.
proxy_environment: >-
{{ { 'http_proxy': lookup('env', 'http_proxy'),
'https_proxy': lookup('env', 'https_proxy') }
if lookup('env', 'http_proxy') and lookup('env', 'https_proxy') else {} }}