apache: Convert from dnf/with_items to package/name.
This commit is contained in:
parent
60c2d50072
commit
fc0ae206cc
1 changed files with 7 additions and 17 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue