write debug lists to files

This commit is contained in:
Matthew Stobbs
2025-03-25 13:49:53 -06:00
parent 3598dc11bb
commit 9a17894bc9
2 changed files with 45 additions and 29 deletions

View File

@@ -73,79 +73,93 @@
when:
- ansible_system == 'Linux'
- pkg_appimage|length > 0
ansible.builtin.debug:
var: pkg_appimage
ansible.bulitin.copy:
content: "{{ pkg_appimage | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_appimage.yml"
- name: List archives
when:
- pkg_archive|length > 0
ansible.builtin.debug:
var: pkg_debug
ansible.bulitin.copy:
content: "{{ pkg_archive | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_archive.yml"
- name: List cargo
when:
- pkg_cargo|length > 0
ansible.builtin.debug:
var: pkg_cargo
ansible.bulitin.copy:
content: "{{ pkg_cargo | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_cargo.yml"
- name: List casks
when:
- ansible_system == 'Darwin'
- pkg_cask|length > 0
ansible.builtin.debug:
var: pkg_cask
ansible.bulitin.copy:
content: "{{ pkg_cask | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_cask.yml"
- name: List flatpak remotes
when:
- ansible_system == 'Linux'
- flatpak_remote|length > 0
ansible.builtin.debug:
var: flatpak_remote
ansible.bulitin.copy:
content: "{{ flatpak_remote | to_yaml }}"
file: "{{ d_tempdir.path }}/flatpak_remote.yml"
- name: List flatpaks
when:
- ansible_system == 'Linux'
- pkg_flatpak|length > 0
ansible.builtin.debug:
var: pkg_flatpak
ansible.bulitin.copy:
content: "{{ pkg_flatpak | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_flatpak.yml"
- name: List go
when:
- pkg_go|length > 0
ansible.builtin.debug:
var: pkg_go
ansible.bulitin.copy:
content: "{{ pkg_go | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_go.yml"
- name: List npm
when:
- pkg_npm|length > 0
ansible.builtin.debug:
var: pkg_npm
ansible.bulitin.copy:
content: "{{ pkg_npm | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_npm.yml"
- name: List pipx
when:
- pkg_pipx|length > 0
ansible.builtin.debug:
var: pkg_pipx
ansible.bulitin.copy:
content: "{{ pkg_pipx | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_pipx.yml"
- name: List source
when:
- pkg_src|length > 0
ansible.builtin.debug:
var: pkg_src
ansible.bulitin.copy:
content: "{{ pkg_src | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_src.yml"
- name: List system
when:
- pkg_sys|length > 0
ansible.builtin.debug:
var: pkg_sys
ansible.bulitin.copy:
content: "{{ pkg_sys | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_sys.yml"
- name: List homebrew taps
when:
- ansible_system == 'Darwin'
- brewtap|length > 0
ansible.builtin.debug:
var: brewtap
ansible.bulitin.copy:
content: "{{ brewtap | to_yaml }}"
file: "{{ d_tempdir.path }}/brewtap.yml"
- name: List taps
when:
- ansible_system == 'Darwin'
- pkg_tap|length > 0
ansible.builtin.debug:
var: pkg_tap
ansible.bulitin.copy:
content: "{{ pkg_tap | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_tap.yml"
- name: List snaps
when:
- ansible_system == 'Linux'
- pkg_snap|length > 0
ansible.builtin.debug:
var: pkg_snap
ansible.bulitin.copy:
content: "{{ pkg_snap | to_yaml }}"
file: "{{ d_tempdir.path }}/pkg_snap.yml"
- name: Flush handlers to ensure dependencies are installed
ansible.builtin.meta: flush_handlers
@@ -241,6 +255,8 @@
file: "src/{{ pkg }}.yml"
- name: Cleanup {{ d_tempdir.path }}
when:
- not debug
ansible.builtin.file:
state: absent
path: "{{ d_tempdir.path }}"

View File

@@ -9,7 +9,7 @@
- Depend cargo
changed_when: true
ansible.builtin.set_fact:
pkg_cargo: "{{ pkg_cargo + ['starship'] }}"
pkg_cargo: "{{ pkg_cargo + [{'name': 'starship', 'locked': true}] }}"
- name: Set starship_configured
ansible.builtin.set_fact: