Moved software list to automatrop

What an organization. Hoping to be flexible enough.
This commit is contained in:
Geoffrey Frogeye 2021-06-13 14:45:20 +02:00
parent cd9cbcaa28
commit 4919fbea0e
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
31 changed files with 442 additions and 44 deletions

View file

@ -9,13 +9,6 @@
ubuntu: "{{ ansible_distribution == 'Ubuntu' }}"
tags: softwarelist
# TODO Is this used?
- name: Set secondary variables
set_fact:
pacman: "{{ arch_based }}"
apt: "{{ termux or debian }}"
sudo: "{{ not termux }}"
# TODO Install python if not done
# Or maybe not, it requires a lot of automation for something that can be done
# very quickly manually and is usually uneccessary
@ -80,18 +73,19 @@
name:
- fakeroot
- base-devel
when: arch_based
become: "{{ sudo }}"
become: yes
when: arch_based and root_access
- name: Install AUR package manager (Arch)
aur:
name: yay-bin
when: arch
when: arch and root_access
- name: Install AUR package manager (Manjaro)
pacman:
name: yay
when: manjaro
become: yes
when: manjaro and root_access
# Not sure if regular Manjaro has yay in its community packages,
# but Manjaro-ARM sure does
@ -103,18 +97,7 @@
- name: Generate list of packages for package manager
set_fact:
packages: "{{ query('template', 'package_manager.j2')[0].split('\n')[:-1]|sort }}"
tags: softwarelist
- name: Install packages (Arch-based)
aur:
name: "{{ packages }}"
extra_args: "--asdeps"
# Nothing is set as installed manually so it can
# be removed by dependency check.
# Current packages will be kept by the meta package
use: yay
when: arch_based
packages: "{{ query('template', 'package_manager.j2')[0].split('\n')[:-1]|sort|unique }}"
tags: softwarelist
- name: Check if list of packages changed
@ -124,3 +107,13 @@
notify: "software changed"
tags: softwarelist
- name: Install packages (Arch-based)
aur:
name: "{{ packages }}"
extra_args: "--asdeps --needed"
# Nothing is set as installed manually so it can
# be removed by dependency check.
# Current packages will be kept by the meta package
use: yay
tags: softwarelist
when: arch_based and root_access