add nwg-hello

This commit is contained in:
Matthew Stobbs
2025-03-11 21:20:14 -06:00
parent a7bb81db9c
commit a9d817ce05
6 changed files with 181 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
- name: Remove existing install
when:
- hyprland_clean
become: "{{ ext_become }}"
become: true
loop: "{{ aquamarine.installed_files }}"
loop_control:
loop_var: file

42
tasks/src/nwg_hello.yml Normal file
View File

@@ -0,0 +1,42 @@
- name: Remove existing install
when:
- nwg_hello.clean
become: true
loop: "{{ nwg_hello.installed_files }}"
loop_control:
loop_var: file
ansible.builtin.file:
state: absent
path: "{{ file }}"
- name: Check if nwg-hello is installed
register: stat_nwg_hello_inst
ansible.builtin.stat:
path: /etc/nwg-hello
- name: Build and install nwg-hello
when:
- not stat_nwg_hello_inst.stat.exists
block:
- name: Clone git repository
ansible.builtin.git:
depth: 1
dest: "{{ nwg_hello.git_path }}"
repo: "{{ nwg_hello.git_repo }}"
version: "{{ nwg_hello.vers }}"
- name: Apply patch if it exists for {{ ansible_os_family }}
ignore_failures: true
ansible.posix.patch:
basedir: "{{ nwg_hello.git_path }}"
src: nwg-hello/{{ ansible_os_family }}.patch
state: present
- name: Install nwg-hello
become: true
ansible.builtin.command:
creates: /etc/nwg-hello
chdir: "{{ nwg_hello.git_path }}"
argv:
- sh
- install.sh