-
Notifications
You must be signed in to change notification settings - Fork 8
/
arch_install_packages.yaml
43 lines (39 loc) · 1.18 KB
/
arch_install_packages.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Ansible playbook to install packages on Arch based distros
- name: Install packages
hosts: localhost
#when: ansible_facts['os_family'] == "Archlinux"
vars_files:
- './vars/terminal_apps.yaml'
- './vars/gui_apps.yaml'
- './vars/arch_apps.yaml'
- './vars/linux_apps.yaml'
- './vars/linux_services.yaml'
tasks:
- name: Upgrade, equivalent of "pacman -Syu"
community.general.pacman:
update_cache: yes
upgrade: yes
extra_args: '--noconfirm'
- name: Install apps and tools
community.general.pacman:
name: '{{ item }}'
state: present
with_items:
- '{{ terminal_apps }}'
- '{{ gui_apps }} '
- '{{ linux_apps }}'
- '{{ arch_apps }}'
- name: Install apps from AUR
command: '/usr/bin/yay -S --noconfirm --nodiffmenu {{ item }}'
become: yes
become_user: 'user'
with_items:
- '{{ aur_terminal_apps }}'
- '{{ aur_gui_apps }}'
- name: Enable services
ansible.builtin.service:
name: '{{ item }}'
enabled: yes
with_items: '{{ linux_services }}'
- name: Cleanup
ansible.builtin.shell: ./scripts/arch-cleanup.sh