mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Add tests/lint/repository/test_name_emoji_and_length.py: every Ansible task name and GitHub Actions workflow/job/step name must start with an emoji (first char not 0-9/A-Za-z) and be <= 80 chars. - emit emoji names at the source: cli/build/include generator now writes "🔧 setup <app>" / "🚿 flush handlers after <app>" so generated tasks/groups/*-roles.yml satisfy the convention too - convert existing task/step/job/workflow names to emoji-prefixed, choosing a task-fitting icon per action (📦 install, ✅ ensure, 🔍 probe, 🥾 bootstrap, 🚀 deploy, 🧩 service-module load, ⬇️ checkout, 📂 include-routines, ...) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
---
|
|
- name: ✅ Ensure dotlinker user is defined
|
|
ansible.builtin.assert:
|
|
that:
|
|
- dotlinker_user is defined
|
|
- dotlinker_user | length > 0
|
|
fail_msg: "dotlinker_user must be provided by the calling role."
|
|
|
|
- name: ✅ Ensure dotlinker config directory exists
|
|
ansible.builtin.file:
|
|
path: "{{ dotlinker_config_path | dirname }}"
|
|
state: directory
|
|
owner: "{{ dotlinker_user }}"
|
|
group: "{{ dotlinker_user }}"
|
|
mode: "0755"
|
|
|
|
- name: 📝 Register mappings in dotlinker
|
|
ansible.builtin.command:
|
|
argv: >-
|
|
{{
|
|
([dotlinker_cli_name, '-c', dotlinker_config_path, 'add']
|
|
+ (['--replace'] if (dotlinker_replace | bool) else [])
|
|
+ ['-N', item.name, '-b', item.backend, '-s', item.src]
|
|
+ (['-d', item.dest] if item.backend == 'cloud' else [])
|
|
)
|
|
}}
|
|
become: true
|
|
become_user: "{{ dotlinker_user }}"
|
|
loop: "{{ dotlinker_mappings }}"
|
|
loop_control:
|
|
label: "{{ item.name }}"
|
|
when: dotlinker_mappings | length > 0
|
|
|
|
- name: 📌 Apply dotlinker mappings (pull)
|
|
ansible.builtin.command: >
|
|
{{ dotlinker_cli_name | quote }}
|
|
-c {{ (dotlinker_config_path ) | quote }}
|
|
pull
|
|
become: true
|
|
become_user: "{{ dotlinker_user }}"
|
|
when:
|
|
- dotlinker_apply | bool
|
|
- dotlinker_mappings | length > 0
|