Skip to content

Commit 289e677

Browse files
committed
Merge pull request #26 from farridav/farridav/avoid_recompiling_nginx
Avoid recompiling nginx, FIXES #10
2 parents 82e1a3e + a6a59bf commit 289e677

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tasks/source.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,24 @@
2222
- name: Nginx | Unpack the compressed Nginx source
2323
command: tar -xvzf /tmp/nginx-{{nginx_source_version}}.tar.gz chdir=/tmp creates=/tmp/nginx-{{nginx_source_version}}/README
2424

25+
- name: Nginx | Write out the version and flags used for the build
26+
template:
27+
src: .nginx_compilation_flags.j2
28+
dest: "{{nginx_dir}}/.nginx_compilation_flags"
29+
register: nginx_flags
30+
31+
- name: Kill Nginx (old threads)
32+
command: pkill nginx
33+
ignore_errors: yes
34+
when: nginx_flags.changed
35+
2536
- name: Nginx | Compile the Nginx source
2637
shell: >
2738
cd /tmp/nginx-{{nginx_source_version}} &&
2839
./configure {{nginx_source_configure_flags}} &&
2940
make &&
3041
make install
42+
when: nginx_flags.changed
3143

3244
- name: Nginx | Update the symbolic link to the nginx install
3345
file:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This file is used to track the nginx build flags, DO NOT CHANGE MANUALLY
2+
{{nginx_source_version}}
3+
{{nginx_source_configure_flags}}

0 commit comments

Comments
 (0)