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 apt: update_cache=yes cache_valid_time=3600
- name: Ensure Apache is installed on Debian. - name: Ensure Apache is installed on Debian.
apt: "name={{ item }} state={{ apache_packages_state }}" apt: "name={{ apache_packages }} state={{ apache_packages_state }}"
with_items: "{{ apache_packages }}"

View file

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

View file

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

View file

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