Skip to content

Instantly share code, notes, and snippets.

View freedomfury's full-sized avatar

afigs freedomfury

View GitHub Profile
@jadkik
jadkik / validate-nginx-config.sh
Created August 24, 2017 07:06
Used to validate nginx templated config files before actually using them. For use with Ansible.
#!/usr/bin/env bash
# Example usage from an Ansible playbook:
# - name: Copy the nginx validate script
# copy: src=validate-nginx-config.sh dest=/opt/validate-nginx-config.sh mode=0744
#
# - name: Update main nginx config file
# template:
# src: nginx.conf.j2
# dest: /etc/nginx/nginx.conf