
Previously we checked for false in the result. The behavior of Ansible has probably changed, as failed is always in the result dictionary - just with the value "false". Tested with Ansible 2.5.11. Change-Id: Idfa2f33dd6641031ea8a287d74b6dbbfa578c9ab
29 lines
1.3 KiB
YAML
29 lines
1.3 KiB
YAML
---
|
|
|
|
- name: Install custom repositories
|
|
yum_repository:
|
|
name: "{{ item.key }}"
|
|
description: "{% if 'description' in item.value %}{{ item.value.description }}{% else %}{{ item.key }} repository{% endif %}"
|
|
baseurl: "{{ item.value.baseurl }}"
|
|
file: "{{ item.value.file | default(omit)}}"
|
|
gpgkey: "{{ item.value.gpgkey | default(omit)}}"
|
|
gpgcheck: "{{ item.value.gpgcheck | default(omit)}}"
|
|
cost: "{{ item.value.cost | default(omit)}}"
|
|
enabled: "{{ item.value.enabled | default(omit)}}"
|
|
gpgcakey: "{{ item.value.gpgcakey | default(omit)}}"
|
|
metadata_expire: "{{ item.value.metadata_expire | default(omit)}}"
|
|
mirrorlist: "{{ item.value.mirrorlist | default(omit)}}"
|
|
mirrorlist_expire: "{{ item.value.mirrorlist_expire | default(omit)}}"
|
|
priority: "{{ item.value.priority | default(omit)}}"
|
|
proxy: "{{ item.value.proxy | default(omit)}}"
|
|
proxy_password: "{{ item.value.proxy_password | default(omit)}}"
|
|
proxy_username: "{{ item.value.proxy_username | default(omit)}}"
|
|
repo_gpgcheck: "{{ item.value.repo_gpgcheck | default(omit)}}"
|
|
sslverify: "{{ item.value.sslverify | default(omit)}}"
|
|
with_dict: "{{ yum_custom_repos }}"
|
|
register: register_yum_command
|
|
retries: 3
|
|
delay: 10
|
|
until: register_yum_command is success
|
|
become: true
|