-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_apache.yml
More file actions
39 lines (32 loc) · 799 Bytes
/
install_apache.yml
File metadata and controls
39 lines (32 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
- hosts: all
become: true
tasks:
- name: update repository index
apt:
update_cache: yes
when: ansible_distribution_version == "Ubuntu"
- name: install apache2 package
apt:
name: apache2
state: latest
when: ansible_distribution == "Ubuntu"
- name: add php support for apache
apt:
name: libapache2-mod-php
state: latest
when: ansible_distribution == "Ubuntu"
- name: update repository index
dnf:
update_cache: yes
when: ansible_distribution_version == "CentOS"
- name: install apache2 package
dnf:
name: httpd
state: latest
when: ansible_distribution == "CentOS"
- name: add php support for apache
dnf:
name: php
state: latest
when: ansible_distribution == "CentOS"