xoxys.yum/tasks/repository.yml

28 lines
923 B
YAML
Raw Normal View History

2018-11-15 21:38:39 +01:00
---
2019-11-21 12:49:57 +01:00
- block:
- name: Add common yum repositories
yum_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') }}"
2020-10-17 11:19:33 +02:00
loop: "{{ yum_repositories + yum_repositories_extra }}"
2019-11-21 12:49:57 +01:00
loop_control:
label: "{{ item.name }}"
notify: __yum_upgrade
- name: Remove repo files
file:
name: "/etc/yum.repos.d/{{ item }}"
state: absent
loop: "{{ yum_repofiles_remove }}"
loop_control:
2019-11-21 15:03:26 +01:00
label: "/etc/yum.repos.d/{{ item }}"
2018-11-15 21:38:39 +01:00
become: True
become_user: root