Some checks failed
CI / lint-and-test (push) Successful in 1m16s
CI / ansible-validation (push) Successful in 5m49s
CI / secret-scanning (push) Successful in 1m33s
CI / dependency-scan (push) Successful in 2m48s
CI / sast-scan (push) Successful in 5m46s
CI / license-check (push) Successful in 1m11s
CI / vault-check (push) Failing after 5m25s
CI / playbook-test (push) Successful in 5m32s
CI / container-scan (push) Successful in 4m32s
CI / sonar-analysis (push) Successful in 6m53s
CI / workflow-summary (push) Successful in 1m6s
- Fix UFW firewall to allow outbound traffic (was blocking all outbound) - Add HOST parameter support to shell Makefile target - Fix all ansible-lint errors (trailing spaces, missing newlines, document starts) - Add changed_when: false to check commands - Fix variable naming (vault_devGPU -> vault_devgpu) - Update .ansible-lint config to exclude .gitea/ and allow strategy: free - Fix NodeSource repository GPG key handling in shell playbook - Add missing document starts to host_vars files - Clean up empty lines in datascience role files Reviewed-on: #2
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
---
|
|
# Playbook: shell.yml
|
|
# Purpose: Configure shell environment (zsh, oh-my-zsh, plugins)
|
|
# Targets: all hosts
|
|
# Tags: shell
|
|
# Usage: make shell-all
|
|
|
|
- name: Configure shell environment
|
|
hosts: all
|
|
become: true
|
|
strategy: free
|
|
ignore_errors: true
|
|
ignore_unreachable: true
|
|
|
|
roles:
|
|
- {role: shell, tags: ['shell']}
|
|
|
|
pre_tasks:
|
|
- name: Check if NodeSource repository exists
|
|
ansible.builtin.stat:
|
|
path: /etc/apt/sources.list.d/nodesource.list
|
|
register: nodesource_repo_file
|
|
failed_when: false
|
|
|
|
- name: Check if NodeSource GPG key exists
|
|
ansible.builtin.stat:
|
|
path: /etc/apt/keyrings/nodesource.gpg
|
|
register: nodesource_key_file
|
|
failed_when: false
|
|
|
|
- name: Remove incorrectly configured NodeSource repository
|
|
ansible.builtin.file:
|
|
path: /etc/apt/sources.list.d/nodesource.list
|
|
state: absent
|
|
become: true
|
|
when:
|
|
- nodesource_repo_file.stat.exists
|
|
- not (nodesource_key_file.stat.exists and nodesource_key_file.stat.size > 0)
|
|
|
|
- name: Update apt cache
|
|
ansible.builtin.apt:
|
|
update_cache: true
|
|
ignore_errors: true
|
|
register: apt_update_result
|
|
|
|
- name: Display apt update status
|
|
ansible.builtin.debug:
|
|
msg: "Apt cache update: {{ 'Success' if apt_update_result is succeeded else 'Failed - continuing anyway' }}"
|
|
when: ansible_debug_output | default(false) | bool
|
|
|
|
tasks:
|
|
- name: Display completion message
|
|
ansible.builtin.debug:
|
|
msg: "Shell configuration completed successfully on {{ inventory_hostname }}!"
|