-
-
Save gtherond/43123125a2bf49d1c177e8256a3b5d9e to your computer and use it in GitHub Desktop.
Ansible loop-notify debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: REMOVE unused default repositories | |
yum_repository: | |
file: "{{ item }}" | |
name: "{{ item }}" | |
state: absent | |
loop: "{{ default_centos_repos }}" | |
notify: yum-clean-all | |
tags: repos | |
- name: IMPORT GPG Key for mirror repositories | |
rpm_key: | |
key: "{{ mirror.baseurl }}{{ mirror.type }}/{{ mirror.version }}/{{ item.value.gpgkey }}" | |
state: present | |
loop: "{{ mirror.repository | dict2items }}" | |
when: item.value.gpgkey | length > 0 | |
tags: repos | |
- name: ADD RPM repositories | |
yum_repository: | |
name: "{{ item.key }}" | |
description: "{{ item.key }}" | |
baseurl: "{{ mirror.baseurl }}{{ mirror.type }}/{{ mirror.version }}/{{ item.value.packages }}" | |
gpgcheck: "{{ 'yes' if item.value.gpgkey | length > 0 else 'no' }}" | |
enabled: yes | |
loop: "{{ mirror.repository | dict2items }}" | |
when: item.value.type == 'rpm' | |
notify: yum-clean-all-and-update | |
tags: repos | |
- name: INSTALL pip repository configuration file. | |
template: | |
src: pip.conf.j2 | |
dest: "/etc/pip.conf" | |
when: mirror.repository.python is defined | |
tags: repos | |
- name: INSTALL setuptool repository configuration file. | |
template: | |
src: pydistutils.cfg.j2 | |
dest: "~/.pydistutils.cfg" | |
when: mirror.repository.python is defined | |
tags: repos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment