-
Notifications
You must be signed in to change notification settings - Fork 0
/
apache_compile_simple.yml
67 lines (67 loc) · 2.08 KB
/
apache_compile_simple.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
- hosts: system2*
tasks:
- name: Download the Apache source file
get_url:
url: http://www-us.apache.org/dist//httpd/httpd-2.4.29.tar.gz
dest: /usr/src/
tags: download_source
- name: Extract the source file
unarchive:
src: /usr/src/httpd-2.4.29.tar.gz
dest: /usr/src/
remote_src: yes
tags: extract_source
- name: configure Apache
shell: /usr/src/httpd-2.4.29/configure --prefix=/usr/local --with-included-apr
register: proc_status
ignore_errors: true
tags: configure
- name: make apache
shell: chdir=/usr/src/httpd-2.4.29/ make
tags: make
- name: make install apache
shell: chdir=chdir=/usr/src/httpd-2.4.29/ make install
tags: make_install
- name: Install_dependencies
get_url: url={{ item }} dest=/usr/src/
with_items:
- http://www-eu.apache.org/dist//apr/apr-1.6.3.tar.gz
- http://www-eu.apache.org/dist//apr/apr-util-1.6.1.tar.gz
listen: "apr"
when: "proc_status.rc != 0"
- name: ex_apr_dir_exist
file:
path: /usr/src/httpd-2.4.29/srclib/apr
mode: 755
state: directory
register: dir1_status
listen: "apr"
when: "proc_status.rc != 0"
- name: Unarchive the apr build
unarchive:
src: /usr/src/apr-1.6.3.tar.gz
dest: /usr/src/httpd-2.4.29/srclib/apr
remote_src: yes
register: zip1_status
listen: "apr"
when: "proc_status.rc != 0"
- name: Make apr-util directory
file:
path: /usr/src/httpd-2.4.29/srclib/apr-util
mode: 755
state: directory
register: dir2_status
listen: "apr-util"
when: "proc_status.rc != 0"
- name: Unarchive the apr-utils build
unarchive:
src: /usr/src/apr-util-1.6.1.tar.gz
dest: /usr/src/httpd-2.4.29/srclib/apr-util
remote_src: yes
register: zip2_status
listen: "apr-util"
when: "proc_status.rc != 0"
- name: Re-try connfiguring Apache
shell: /usr/src/httpd-2.4.29/configure --prefix=/usr/local --with-included-apr
when: "proc_status.rc != 0"