-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathapache-playbook.yml
More file actions
54 lines (48 loc) · 1.15 KB
/
apache-playbook.yml
File metadata and controls
54 lines (48 loc) · 1.15 KB
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
43
44
45
46
47
48
49
50
51
52
---
- name: "Play 1- cgi website configuration"
hosts: webservers
become: yes
tasks:
- name: "install apache"
yum:
name: "{{ packages }}"
state: present
vars:
packages:
- httpd
- vim
- wget
- tree
- git
tags:
- install-repo
- name: "Create a directory - doc root"
file:
path: /var/www/html/learnwithproject.com
state: directory
mode: '0755'
owner: root
group: root
tags:
- create-directory
- name: "Configure Apache with docroot & Timeout 300 secs"
copy:
src: /etc/ansible/learnwithprojects.com/httpd.conf
dest: /etc/httpd/conf/httpd.conf
owner: root
group: root
mode: '0644'
tags:
- configure-apache
- name: "code copy"
git:
repo: 'https://github.com/mailrahulsre/learnwithprojects.com.git'
dest: /var/www/html/learnwithproject.com
version: master
force: yes
tags: code-copy
- name: "restart apache"
service:
name: httpd
state: restarted
tags: start-apache