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