From b41bd432dfd6ebec14d8e5258e021d931b5979e3 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 27 Jun 2016 17:50:49 +0300 Subject: [PATCH] roles/nginx: Add "ansible managed" string to configs Generates a placeholder text to say that the file is managed by ansible. --- roles/nginx/templates/blank-vhost.conf.j2 | 2 ++ roles/nginx/templates/nginx_org_sources.list.j2 | 2 ++ roles/nginx/templates/vhost.conf.j2 | 2 ++ 3 files changed, 6 insertions(+) diff --git a/roles/nginx/templates/blank-vhost.conf.j2 b/roles/nginx/templates/blank-vhost.conf.j2 index 8c47cc3..64a2fca 100644 --- a/roles/nginx/templates/blank-vhost.conf.j2 +++ b/roles/nginx/templates/blank-vhost.conf.j2 @@ -1,3 +1,5 @@ +# {{ ansible_managed }} + # default blank vhost # # clients asking for "example.com" should only get a response if we have diff --git a/roles/nginx/templates/nginx_org_sources.list.j2 b/roles/nginx/templates/nginx_org_sources.list.j2 index 23ea97d..46d09aa 100644 --- a/roles/nginx/templates/nginx_org_sources.list.j2 +++ b/roles/nginx/templates/nginx_org_sources.list.j2 @@ -1,3 +1,5 @@ +# {{ ansible_managed }} + {% if ansible_distribution == 'Ubuntu' %} {% if nginx_version == "stable" %} deb http://nginx.org/packages/ubuntu/ {{ ansible_distribution_release }} nginx diff --git a/roles/nginx/templates/vhost.conf.j2 b/roles/nginx/templates/vhost.conf.j2 index ffe6456..34d946e 100644 --- a/roles/nginx/templates/vhost.conf.j2 +++ b/roles/nginx/templates/vhost.conf.j2 @@ -1,3 +1,5 @@ +# {{ ansible_managed }} + {# helper variables and per-site defaults that we can't set in role defaults #} {% set domain_name = item.domain_name %} {% set domain_aliases = item.domain_aliases | default("") %}