VZ
Size: a a a
VZ
AK
VZ
VZ
VZ
AK
VZ
AK
VZ
VZ
AK
VZ
VZ
VZ
VZ
VZ
VZ
VZ
{% for repo in yum_repos_item.repos %}
[{{repo.name}}]
name={{ repo.description }}
{% if repo.mirrorlist is defined %}
mirrorlist={{ repo.mirrorlist }}
{% else %}
baseurl={{ repo.base_url }}
{% endif %}
enabled={{ (repo.enabled) | ternary(1, 0) }}
{% if repo.gpgcheck %}
gpgcheck={{ (repo.gpgcheck) | ternary(1, 0) }}
gpgkey={{ repo.gpgkey }}
{% else %}
gpgcheck=0
{% endif %}
{% if repo.priority is defined %}
priority={{ repo.priority }}
{% endif %}
{% if repo.proxy is defined %}
proxy={{ repo.proxy }}
{% endif %}
{% endfor %}
VZ
- name: install repository
yum:
name: "{{ item.n }}"
state: "{{ item.s | default('present') }}"
with_items: "{{ yum_repositories }}"
VZ
- name: disable repository
command: "yum-config-manager --{{ item.d | default('disable') }} {{ item.s }}"
with_items: "{{ yum_disables }}"
changed_when: false