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)
- name: install apache (yum)
package: name={{ item }} state=present
with_items:
- httpd
- httpd-tools
- name: install apache (package)
package:
state: present
name:
- httpd
- httpd-tools
tags:
- packages
- apache
when: ansible_distribution_major_version|int < 22
# 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
when: ansible_cmdline.ostree is not defined
- name: set apache running/enabled
service: name=httpd enabled=yes