diff options
Diffstat (limited to 'roles/workstation')
-rw-r--r-- | roles/workstation/defaults/main.yml | 3 | ||||
-rw-r--r-- | roles/workstation/tasks/os_archlinux.yml | 10 | ||||
-rw-r--r-- | roles/workstation/tasks/yay.yml | 19 |
3 files changed, 32 insertions, 0 deletions
diff --git a/roles/workstation/defaults/main.yml b/roles/workstation/defaults/main.yml index aff0a65..340dd36 100644 --- a/roles/workstation/defaults/main.yml +++ b/roles/workstation/defaults/main.yml @@ -1,5 +1,8 @@ workstation_user: qwd +workstation_yay_repo: https://aur.archlinux.org/yay-bin.git +workstation_yay_dir: /tmp/yay + workstation_pkgs: common: - dmenu diff --git a/roles/workstation/tasks/os_archlinux.yml b/roles/workstation/tasks/os_archlinux.yml index 40b264b..3fc49f6 100644 --- a/roles/workstation/tasks/os_archlinux.yml +++ b/roles/workstation/tasks/os_archlinux.yml @@ -33,3 +33,13 @@ - name: enable battery optimization include_tasks: tlp.yml when: ansible_form_factor in ["Laptop", "Notebook"] + +- name: retrieve installed packages + package_facts: + register: package_facts + +- name: install yay + include_tasks: yay.yml + when: + - "'yay' not in package_facts.ansible_facts.packages" + - "'yay-bin' not in package_facts.ansible_facts.packages" diff --git a/roles/workstation/tasks/yay.yml b/roles/workstation/tasks/yay.yml new file mode 100644 index 0000000..cafbc9c --- /dev/null +++ b/roles/workstation/tasks/yay.yml @@ -0,0 +1,19 @@ +- name: clone yay repository + git: + repo: "{{ workstation_yay_repo }}" + dest: "{{ workstation_yay_dir }}" + version: origin/master + become: true + become_user: "{{ workstation_user }}" + +- name: make yay package # noqa: no-changed-when + command: + cmd: makepkg -fs + chdir: "{{ workstation_yay_dir }}" + become: true + become_user: "{{ workstation_user }}" + +- name: install yay package # noqa: no-changed-when + shell: + cmd: pacman --noconfirm -U *.zst + chdir: "{{ workstation_yay_dir }}" |