mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-12 12:16:06 +00:00
This commit updates multiple roles to ensure compatibility with Ansible 2.20. Several include paths and task-loading mechanisms required adjustments, as Ansible 2.20 applies stricter evaluation rules for complex Jinja expressions and no longer resolves certain relative include paths the way Ansible 2.18 did. Key changes: - Replaced legacy once_finalize.yml and once_flag.yml with the new structure under tasks/utils/once/finalize.yml and tasks/utils/once/flag.yml. - Updated all include_tasks statements to use 'path_join' with playbook_dir, ensuring deterministic and absolute file resolution across roles. - Fixed all network helper includes by converting direct relative paths such as 'roles/docker-compose/tasks/utils/network.yml' to proper Jinja-evaluated paths. - Normalized MATOMO_* variable names for consistency with the updated variable scope behavior in Ansible 2.20. - Removed deprecated patterns that were implicitly supported in Ansible 2.18 but break under the more strict variable and path resolution model in 2.20. These changes are part of the full migration step required to ensure the infinito-nexus roles remain stable, deterministic, and forward-compatible with Ansible 2.20. Details of the discussion and reasoning can be found in this conversation: https://chatgpt.com/share/69300a8d-24d4-800f-bec0-e895a695618a
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
- name: Include dependencies
|
|
include_role:
|
|
name: '{{ item }}'
|
|
loop:
|
|
- dev-git
|
|
- dev-make
|
|
- dev-python-yaml
|
|
|
|
- name: Ensure GitHub host key is in known_hosts
|
|
known_hosts:
|
|
path: "~/.ssh/known_hosts"
|
|
name: github.com
|
|
key: "{{ lookup('pipe', 'ssh-keyscan -t ed25519 github.com | grep -v \"^#\"') }}"
|
|
become: true
|
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
|
|
|
- name: Create installation directory for Kevin's Package Manager
|
|
file:
|
|
path: "{{ PKGMGR_INSTALL_PATH }}"
|
|
state: directory
|
|
mode: '0755'
|
|
become: true
|
|
|
|
- name: Clone Kevin's Package Manager repository
|
|
git:
|
|
repo: "{{ PKGMGR_REPO_URL }}"
|
|
dest: "{{ PKGMGR_INSTALL_PATH }}"
|
|
version: "HEAD"
|
|
force: yes
|
|
become: true
|
|
|
|
- name: create config.yaml
|
|
template:
|
|
src: config.yaml.j2
|
|
dest: "{{ PKGMGR_CONFIG_PATH }}"
|
|
become: true
|
|
|
|
- name: Run the Package Manager install command to create an alias for Kevins package manager
|
|
shell: |
|
|
source ~/.venvs/pkgmgr/bin/activate
|
|
make setup
|
|
args:
|
|
chdir: "{{ PKGMGR_INSTALL_PATH }}"
|
|
executable: /bin/bash
|
|
become: true
|
|
|
|
- name: "Update all repositories with pkgmgr"
|
|
command: "pkgmgr pull --all"
|
|
when: MODE_UPDATE | bool
|
|
|
|
- include_tasks: utils/once/finalize.yml |