Skip to content

Commit

Permalink
Merge pull request #26 from farridav/farridav/avoid_recompiling_nginx
Browse files Browse the repository at this point in the history
Avoid recompiling nginx, FIXES #10
  • Loading branch information
pjan committed Jan 26, 2015
2 parents 82e1a3e + a6a59bf commit 289e677
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tasks/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,24 @@
- name: Nginx | Unpack the compressed Nginx source
command: tar -xvzf /tmp/nginx-{{nginx_source_version}}.tar.gz chdir=/tmp creates=/tmp/nginx-{{nginx_source_version}}/README

- name: Nginx | Write out the version and flags used for the build
template:
src: .nginx_compilation_flags.j2
dest: "{{nginx_dir}}/.nginx_compilation_flags"
register: nginx_flags

- name: Kill Nginx (old threads)
command: pkill nginx
ignore_errors: yes
when: nginx_flags.changed

- name: Nginx | Compile the Nginx source
shell: >
cd /tmp/nginx-{{nginx_source_version}} &&
./configure {{nginx_source_configure_flags}} &&
make &&
make install
when: nginx_flags.changed

- name: Nginx | Update the symbolic link to the nginx install
file:
Expand Down
3 changes: 3 additions & 0 deletions templates/.nginx_compilation_flags.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file is used to track the nginx build flags, DO NOT CHANGE MANUALLY
{{nginx_source_version}}
{{nginx_source_configure_flags}}

0 comments on commit 289e677

Please sign in to comment.