Prevent failures on Ansible 2.7 when no repo is set on RedHat.

This commit is contained in:
Jeff Geerling 2018-10-04 16:53:12 -05:00
parent 8912bc85fa
commit c01aecaa78
4 changed files with 5 additions and 9 deletions

View file

@ -3,5 +3,4 @@
apt: update_cache=yes cache_valid_time=3600
- name: Ensure Apache is installed on Debian.
apt: "name={{ item }} state={{ apache_packages_state }}"
with_items: "{{ apache_packages }}"
apt: "name={{ apache_packages }} state={{ apache_packages_state }}"

View file

@ -1,7 +1,6 @@
---
- name: Ensure Apache is installed on RHEL.
yum:
name: "{{ item }}"
name: "{{ apache_packages }}"
state: "{{ apache_packages_state }}"
enablerepo: "{{ apache_enablerepo }}"
with_items: "{{ apache_packages }}"
enablerepo: "{{ apache_enablerepo | default(omit) }}"

View file

@ -1,6 +1,5 @@
---
- name: Ensure Apache is installed on Solaris.
pkg5:
name: "{{ item }}"
name: "{{ apache_packages }}"
state: "{{ apache_packages_state }}"
with_items: "{{ apache_packages }}"

View file

@ -1,6 +1,5 @@
---
- name: Ensure Apache is installed on Suse.
zypper:
name: "{{ item }}"
name: "{{ apache_packages }}"
state: "{{ apache_packages_state }}"
with_items: "{{ apache_packages }}"