remove old loop syntax
This commit is contained in:
parent
4f9463be1a
commit
d120f0a5aa
@ -17,8 +17,10 @@ yum_cron_email_to: root
|
||||
yum_cron_emit_via: stdio
|
||||
yum_cron_random_sleep: 360
|
||||
|
||||
# yum_repositories: (defaults to not set)
|
||||
# epel:
|
||||
yum_repositories: []
|
||||
## Example:
|
||||
# yum_repositories:
|
||||
# - name: epel
|
||||
# filename: Extra-EPEL
|
||||
# desc: Extra Packages for Enterprise Linux (EPEL)
|
||||
# baseurl: "http://download.fedoraproject.org/pub/epel/$releasever/$basearch/"
|
||||
|
@ -4,14 +4,14 @@
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
loop:
|
||||
- "{{ yum_packages_uninstall | default([]) }}"
|
||||
|
||||
- name: Install common packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
loop:
|
||||
- "{{ yum_packages_install | default([]) }} + {{ yum_packages_extra_install | default([]) }}"
|
||||
become: True
|
||||
become_user: root
|
||||
|
@ -1,15 +1,15 @@
|
||||
---
|
||||
- name: Add common yum repositories
|
||||
yum_repository:
|
||||
name: "{{ item.key }}"
|
||||
file: "{{ item.value.filename }}"
|
||||
description: "{{ item.value.desc }}"
|
||||
baseurl: "{{ item.value.baseurl }}"
|
||||
gpgkey: "{{ item.value.gpgkey }}"
|
||||
enabled: "{{ item.value.enabled }}"
|
||||
with_dict: "{{ yum_repositories | default({}) }}"
|
||||
name: "{{ item.name }}"
|
||||
file: "{{ item.filename }}"
|
||||
description: "{{ item.desc }}"
|
||||
baseurl: "{{ item.baseurl }}"
|
||||
gpgkey: "{{ item.gpgkey }}"
|
||||
enabled: "{{ item.enabled }}"
|
||||
loop: "{{ yum_repositories }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
label: "{{ item.name }}"
|
||||
notify: __yum_upgrade
|
||||
become: True
|
||||
become_user: root
|
||||
|
@ -26,7 +26,7 @@
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
loop:
|
||||
- /etc/cron.daily/0yum-daily.cron
|
||||
- /etc/cron.hourly/0yum-hourly.cron
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user