-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_apache.yml
44 lines (34 loc) · 1.01 KB
/
install_apache.yml
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
40
41
42
---
- hosts: all
become: true
tasks:
- name: install apache2 and php support packages and update cache
yum:
update_only: yes
update_cache: yes
when: (ansible_os_family == "RedHat") or (ansible_distribution == "CentOs")
- name: install apache2 and php support packages and update cache
apt:
name:
update_only: yes
update_cache: yes
when: (ansible_os_family == "Debian") or (ansible_distribution == "Ubuntu")
- hosts: web_servers
become: true
tasks:
- name: install apache2 and php support packages and update cache
apt:
name:
- apache2
- libapache2-mod-php
state: latest
update_cache: yes
when: (ansible_os_family == "Debian") or (ansible_distribution == "Ubuntu")
- name: install apache2 and php support packages and update cache
apt:
name:
- apache2
- libapache2-mod-php
state: latest
update_cache: yes
when: (ansible_os_family == "Debian") or (ansible_distribution == "Ubuntu")