2022-12-19 12:59:24 +00:00
|
|
|
---
|
2022-03-23 01:03:04 +00:00
|
|
|
- name: Install packages
|
|
|
|
when: update
|
2022-03-14 00:16:44 +00:00
|
|
|
block:
|
2022-03-23 01:03:04 +00:00
|
|
|
- name: Install packages (pacman)
|
2022-03-24 15:18:47 +00:00
|
|
|
when: package_manager == 'pacman' or 'pacman' in group_names
|
2022-03-14 00:16:44 +00:00
|
|
|
tags: pacman
|
2022-03-23 01:03:04 +00:00
|
|
|
block:
|
|
|
|
- name: Install the good stuff (pacman)
|
|
|
|
pacman: name={{ item }} state=latest
|
2022-12-19 12:59:24 +00:00
|
|
|
ignore_errors: true
|
2022-03-23 01:03:04 +00:00
|
|
|
with_items:
|
|
|
|
- "{{ extra_packages }}"
|
|
|
|
- "{{ packages }}"
|
|
|
|
rescue:
|
|
|
|
- name: Uninstall the good stuff (pacman)
|
|
|
|
pacman: name={{ item }} state=absent
|
|
|
|
with_items:
|
|
|
|
- "{{ extra_packages }}"
|
|
|
|
- "{{ packages }}"
|
|
|
|
|
|
|
|
- name: Install packages (apk)
|
2022-03-24 15:18:47 +00:00
|
|
|
when: package_manager == 'apk' or 'apk' in group_names or 'alpine' in group_names
|
2022-03-14 00:16:44 +00:00
|
|
|
tags: apk
|
2022-03-23 01:03:04 +00:00
|
|
|
block:
|
|
|
|
- name: Install the good stuff (apk)
|
|
|
|
apk: name={{ item }} state=latest
|
2022-12-19 12:59:24 +00:00
|
|
|
ignore_errors: true
|
2022-03-23 01:03:04 +00:00
|
|
|
with_items:
|
|
|
|
- "{{ extra_packages }}"
|
|
|
|
- "{{ packages }}"
|
|
|
|
rescue:
|
|
|
|
- name: Uninstall the good stuff (apk)
|
|
|
|
apk: name={{ item }} state=absent
|
|
|
|
with_items:
|
|
|
|
- "{{ extra_packages }}"
|
|
|
|
- "{{ packages }}"
|
|
|
|
|
|
|
|
- name: Install packages (apt)
|
2022-03-24 15:18:47 +00:00
|
|
|
when: package_manager == 'apt' or 'apt' in group_names
|
2022-03-14 00:16:44 +00:00
|
|
|
tags: apt
|
2022-03-23 01:03:04 +00:00
|
|
|
block:
|
|
|
|
- name: Install the good stuff (apt)
|
|
|
|
apt: package={{ item }} state=latest
|
2022-12-19 12:59:24 +00:00
|
|
|
ignore_errors: true
|
2022-03-23 01:03:04 +00:00
|
|
|
with_items:
|
|
|
|
- "{{ extra_packages }}"
|
|
|
|
- "{{ packages }}"
|
|
|
|
rescue:
|
|
|
|
- name: Uninstall the good stuff (apt)
|
|
|
|
apt: package={{ item }} state=absent
|
|
|
|
with_items:
|
|
|
|
- "{{ extra_packages }}"
|
|
|
|
- "{{ packages }}"
|
2022-03-14 00:16:44 +00:00
|
|
|
|
2022-03-23 01:03:04 +00:00
|
|
|
- name: Configure system packages
|
|
|
|
when: "'system' in setup"
|
|
|
|
block:
|
2022-03-14 00:16:44 +00:00
|
|
|
- name: Add /etc/doas.conf
|
|
|
|
copy: src=doas.conf dest=/etc/doas.conf owner=root group=root mode=0644
|
|
|
|
tags: system
|
|
|
|
|
2022-03-23 01:03:04 +00:00
|
|
|
- name: Configure user configs
|
2022-03-24 15:18:47 +00:00
|
|
|
when: "'user' in setup and ('neofetch' in packages or 'neofetch' in extra_packages)"
|
2022-03-23 01:03:04 +00:00
|
|
|
block:
|
|
|
|
- name: Add ~/.config/neofetch/
|
2022-03-24 15:18:47 +00:00
|
|
|
copy: src=neofetch dest={{ home }}/.config owner={{ name }} group={{ group }} mode=0755
|
2022-03-23 01:03:04 +00:00
|
|
|
tags: config
|