2022-10-16 02:49:05 +00:00
|
|
|
- name: Put in custom config directory
|
|
|
|
copy:
|
2022-10-16 04:32:44 +00:00
|
|
|
src: "files/pacman.conf"
|
2022-10-16 02:49:05 +00:00
|
|
|
dest: /etc/pacman.conf
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
|
|
|
|
- name: Put in mirrolist
|
|
|
|
copy:
|
2022-10-16 04:32:44 +00:00
|
|
|
src: "files/mirrorlist"
|
2022-10-16 02:49:05 +00:00
|
|
|
dest: /etc/pacman.d/mirrorlist
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
|
|
|
|
- name: Create pacman conf directory
|
|
|
|
file:
|
|
|
|
name: /etc/pacman.d/conf.d
|
|
|
|
state: directory
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0755
|
|
|
|
|
|
|
|
- name: Check that paths exist
|
|
|
|
stat:
|
|
|
|
path: "{{ item }}"
|
|
|
|
register: file_exists
|
|
|
|
no_log: True
|
|
|
|
loop:
|
|
|
|
- /etc/pacman.d/conf.d/blank.conf
|
|
|
|
|
|
|
|
- name: Create blank file to match glob
|
|
|
|
file:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: touch
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
loop:
|
|
|
|
- /etc/pacman.d/conf.d/blank.conf
|
2023-12-17 17:33:30 +00:00
|
|
|
when: "file_exists | community.general.json_query(sub_query) | first | default(False) == False"
|
2022-10-16 02:49:05 +00:00
|
|
|
vars:
|
|
|
|
sub_query: "results[?stat.path=='{{ item }}'].stat.exists"
|
|
|
|
|
|
|
|
- name: Additional pacman configs
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item }}"
|
|
|
|
dest: /etc/pacman.d/conf.d/
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
loop:
|
|
|
|
- freeze_firefox.conf
|
2023-12-17 17:33:30 +00:00
|
|
|
|
2023-02-18 19:49:00 +00:00
|
|
|
- name: Install packages
|
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- archlinux-keyring
|
|
|
|
state: present
|