Update yum.py (#67252)

Move the simpler name list example to the top of EXAMPLES.
Those with v2.11 loop deprecation warnings will be looking for a solution.
pull/67323/head
Matt Warren 5 years ago committed by GitHub
parent 7e83c40957
commit a8a89b7102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -246,7 +246,15 @@ EXAMPLES = '''
name: httpd name: httpd
state: latest state: latest
- name: ensure a list of packages installed - name: install a list of packages (suitable replacement for 2.11 loop deprecation warning)
yum:
name:
- nginx
- postgresql
- postgresql-server
state: present
- name: install a list of packages with a list variable
yum: yum:
name: "{{ packages }}" name: "{{ packages }}"
vars: vars:
@ -316,14 +324,6 @@ EXAMPLES = '''
name: sos name: sos
disablerepo: "epel,ol7_latest" disablerepo: "epel,ol7_latest"
- name: Install a list of packages
yum:
name:
- nginx
- postgresql
- postgresql-server
state: present
- name: Download the nginx package but do not install it - name: Download the nginx package but do not install it
yum: yum:
name: name:

Loading…
Cancel
Save