mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
- Add new role sys-util-git-pull as a generic system utility - Implement robust shallow clone/update logic in Python helper - Support detached-safe branch updates and optional tag pinning - Handle annotated vs lightweight tags and heal local tag conflicts - Provide deterministic Ansible change detection via machine-readable output - Add verbose logging to stderr for debuggability - Integrate sys-util-git-pull into pkgmgr role to replace inline git logic - Add comprehensive unit tests (option A: file-based import) for helper script - Add role README and meta information with platform-agnostic support - Ensure role conforms to existing test expectations (meta/main.yml present) https://chatgpt.com/share/69481902-a98c-800f-9b3f-9ee13e8e50b7
20 lines
908 B
YAML
20 lines
908 B
YAML
---
|
|
# run_once_sys_util_git_pull: deactivated
|
|
- name: Run sys-util-git-pull helper (verbose)
|
|
script: >-
|
|
sys_util_git_pull.py
|
|
--repo-url "{{ sys_util_git_pull_repo_url }}"
|
|
--dest "{{ sys_util_git_pull_dest }}"
|
|
--branch "{{ sys_util_git_pull_version }}"
|
|
--depth "{{ sys_util_git_pull_depth }}"
|
|
--remote "{{ sys_util_git_pull_remote }}"
|
|
--verbose
|
|
{% if sys_util_git_pull_pin_tag | length > 0 %} --pin-tag "{{ sys_util_git_pull_pin_tag }}" {% endif %}
|
|
{% if sys_util_git_pull_mark_changed_on_tag_move | bool %} --mark-changed-on-tag-move {% endif %}
|
|
{% for t in sys_util_git_pull_remove_tags %} --remove-tag "{{ t }}" {% endfor %}
|
|
register: sys_util_git_pull_run
|
|
changed_when: >
|
|
(sys_util_git_pull_run.stdout | default('')) is search('CHANGED=true')
|
|
become: "{{ sys_util_git_pull_become }}"
|
|
become_user: "{{ sys_util_git_pull_become_user | default(omit) }}"
|