updated tasks so they are only run once

This commit is contained in:
Matthew Stobbs
2025-03-03 12:04:09 -07:00
parent a2718521a5
commit 2ce49c9b85
117 changed files with 2129 additions and 991 deletions

View File

@@ -1,13 +1,29 @@
- name: Ensure pkg_deps are added
loop: "{{ hyprlang.pkg_deps }}"
loop_control:
loop_var: pkg_dep
vars:
pkg: "{{ pkg_dep }}"
ansible.builtin.include_tasks:
file: addpkg.yml
# vim: set filetype=yaml.ansible :
---
- name: Add hyprlang
when:
- hyprlang_configured
block:
- name: Load hyprlang config
when:
- hyprlang is undefined
ansible.builtin.include_tasks:
file: config/hyprlang.yml
- name: Append to pkg_src
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + hyprlang.build_deps }}"
pkg_src: "{{ pkg_src + ['hyprlang'] }}"
- name: Ensure pkg_deps are added
loop: "{{ hyprlang.pkg_deps }}"
loop_control:
loop_var: hyprlang_pkg_dep
vars:
pkg: "{{ hyprlang_pkg_dep }}"
ansible.builtin.include_tasks:
file: "pkgs/{{ hyprlang_pkg_dep }}.yml"
- name: Append to pkg_src
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + hyprlang.build_deps }}"
pkg_src: "{{ pkg_src + ['hyprlang'] }}"
- name: Set hyprlang_configured
ansible.builtin.set_fact:
hyprlang_configured: true