-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathapache.yml
More file actions
50 lines (47 loc) · 1.24 KB
/
apache.yml
File metadata and controls
50 lines (47 loc) · 1.24 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
---
- name: "Play 1- Website COnfiguration"
hosts: webservers
become: yes
tasks:
- name: ensure a list of packages installed
yum:
name: "{{ packages }}"
state: present
vars:
packages:
- httpd
- httpd-tools
- git
- vim
- wget
- tree
- name: Create a apache docroot directory if it does not exist
file:
path: /var/www/html/learnwithproject.com
state: directory
mode: '0755'
owner: root
group: root
recurse: yes
- name: "Configure Apache with docroot & Timeout 300 secs"
copy:
dest: /etc/httpd/conf/httpd.conf
group: root
mode: "0644"
owner: root
src: /etc/ansible/learnwithprojects.com/httpd.conf
- name: Remove file (delete file)
file:
path: /etc/httpd/conf.d/virtual.conf
state: absent
- name: "code copy"
git:
dest: /var/www/html/learnwithproject.com
repo: "https://github.com/mailrahulsre/learnwithprojects.com.git"
version: master
force: yes
tags: git_clone
- name: Start service httpd, if not started
service:
name: httpd
state: restarted