apache: Convert from dnf/with_items to package/name.

This commit is contained in:
James Antill 2019-06-11 10:23:44 -04:00 committed by pingou
parent 60c2d50072
commit fc0ae206cc

View file

@ -1,25 +1,15 @@
--- ---
# install apache(httpd) # install apache(httpd)
- name: install apache (yum) - name: install apache (package)
package: name={{ item }} state=present package:
with_items: state: present
name:
- httpd - httpd
- httpd-tools - httpd-tools
tags: tags:
- packages - packages
- apache - apache
when: ansible_distribution_major_version|int < 22 when: ansible_cmdline.ostree is not defined
# install apache(httpd)
- name: install apache (dnf)
dnf: name={{ item }} state=present
with_items:
- httpd
- httpd-tools
tags:
- packages
- apache
when: ansible_distribution_major_version|int > 21 and ansible_cmdline.ostree is not defined
- name: set apache running/enabled - name: set apache running/enabled
service: name=httpd enabled=yes service: name=httpd enabled=yes