mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-07-17 12:10:34 +08:00
apache: Convert from dnf/with_items to package/name.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user