Don't use loops with package task
We can directly pass a list of packages to the package task in ansible, this will help save us some times on run times. Change-Id: I9b26f4f4f9731dc7d32186584620f1cec04b7a81 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
ad0e8bd241
commit
30c2e03281
@ -1,8 +1,7 @@
|
|||||||
- name: Install base packages
|
- name: Install base packages
|
||||||
package:
|
package:
|
||||||
state: present
|
state: present
|
||||||
name: '{{ item }}'
|
name: "{{ base_packages }}"
|
||||||
loop: '{{ base_packages }}'
|
|
||||||
|
|
||||||
- name: Include OS-specific variables
|
- name: Include OS-specific variables
|
||||||
include_vars: "{{ lookup('first_found', params) }}"
|
include_vars: "{{ lookup('first_found', params) }}"
|
||||||
@ -15,8 +14,7 @@
|
|||||||
- name: Install distro specific packages
|
- name: Install distro specific packages
|
||||||
package:
|
package:
|
||||||
state: present
|
state: present
|
||||||
name: '{{ item }}'
|
name: "{{ distro_packages }}"
|
||||||
loop: '{{ distro_packages }}'
|
|
||||||
|
|
||||||
- name: Increase syslog message size in order to capture python tracebacks
|
- name: Increase syslog message size in order to capture python tracebacks
|
||||||
copy:
|
copy:
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
- name: Install pip and virtualenv
|
- name: Install pip and virtualenv
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name:
|
||||||
loop:
|
- python3-pip
|
||||||
- python3-pip
|
- python3-virtualenv
|
||||||
- python3-virtualenv
|
|
||||||
|
@ -16,10 +16,9 @@
|
|||||||
- name: Install puppet packages
|
- name: Install puppet packages
|
||||||
package:
|
package:
|
||||||
state: present
|
state: present
|
||||||
name: '{{ item }}'
|
name:
|
||||||
loop:
|
- puppet
|
||||||
- puppet
|
- ruby
|
||||||
- ruby
|
|
||||||
# wipe out templatedir so we don't get warnings
|
# wipe out templatedir so we don't get warnings
|
||||||
- name: Remove templatedir
|
- name: Remove templatedir
|
||||||
lineinfile:
|
lineinfile:
|
||||||
@ -54,4 +53,4 @@
|
|||||||
name: puppet
|
name: puppet
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: no
|
enabled: no
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -11,10 +11,9 @@
|
|||||||
- name: Install puppet packages
|
- name: Install puppet packages
|
||||||
package:
|
package:
|
||||||
state: present
|
state: present
|
||||||
name: '{{ item }}'
|
name:
|
||||||
loop:
|
- puppet
|
||||||
- puppet
|
- ruby
|
||||||
- ruby
|
|
||||||
|
|
||||||
# wipe out templatedir so we don't get warnings
|
# wipe out templatedir so we don't get warnings
|
||||||
- name: Remove templatedir
|
- name: Remove templatedir
|
||||||
|
Loading…
Reference in New Issue
Block a user