xoxys.packages/tasks/repository.yml

28 lines
962 B
YAML
Raw Normal View History

2022-02-12 13:36:51 +00:00
---
- block:
- name: Add common package repositories
packages_repository:
name: "{{ item.name }}"
file: "{{ item.filename }}"
description: "{{ item.desc | default(omit) }}"
baseurl: "{{ item.baseurl | default(omit) }}"
gpgkey: "{{ item.gpgkey | default(omit) }}"
gpgcheck: "{{ item.gpgcheck | default('yes') }}"
sslverify: "{{ item.sslverify | default('yes') }}"
enabled: "{{ item.enabled | default('yes') }}"
state: "{{ item.state | default('present') }}"
loop: "{{ packages_repositories + packages_repositories_extra }}"
loop_control:
label: "{{ item.name }}"
notify: __packages_upgrade
- name: Remove repo files
file:
name: "/etc/packages.repos.d/{{ item }}"
state: absent
loop: "{{ packages_repofiles_remove }}"
loop_control:
label: "/etc/packages.repos.d/{{ item }}"
become: True
become_user: root