Created
December 18, 2013 15:18
-
-
Save Xerkus/8024034 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Test | |
hosts: 127.0.0.1 | |
connection: local | |
gather_facts: no | |
vars: | |
- modules: ['--with-http_image_filter_module', '--with-http_xslt_module'] | |
- recompile: false | |
tasks: | |
- name: Get installed modules | |
shell: nginx -V | |
register: nginx_flags | |
ignore_errors: True | |
- set_fact: | |
recompile: true | |
when: "item not in nginx_flags.stderr" | |
with_items: modules | |
- name: Configure nginx | |
debug: msg="./configure --prefix=/opt/nginx {{modules|join(' ') }}" | |
when: recompile == true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment