Adjust for dnf vs yum
This commit is contained in:
parent
439955157d
commit
7eebae7c89
1 changed files with 13 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
# install apache(httpd)
|
# install apache(httpd)
|
||||||
- name: install apache
|
- name: install apache (yum)
|
||||||
yum: name={{ item }} state=present
|
yum: name={{ item }} state=present
|
||||||
with_items:
|
with_items:
|
||||||
- httpd
|
- httpd
|
||||||
|
@ -8,6 +8,18 @@
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
- apache
|
- 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 > 22
|
||||||
|
|
||||||
- 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