machine_setup/ansible/roles/package_manager/tasks/linux.yaml

55 lines
1.1 KiB
YAML
Raw Normal View History

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
when: "{{ file_exists | community.general.json_query(sub_query) | first | default(False) }} == False"
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