From 316622ef9b7c37708ec2ea95ecf59575f40922c8 Mon Sep 17 00:00:00 2001 From: Charles McLaughlin Date: Wed, 7 Jun 2017 13:38:21 -0700 Subject: [PATCH] Remove "source" comments from Saltify configs I use Salt environments to provide each of my team mates the ability to develop and test their Salt changes. And I've found that when we run this formula from our environments against our salt-master, comments in some files change. For us this represents an unwanted and unplanned change. I understand the intention - to identify how or why the file changed, but I firmly believe that we should be able to run highstsate with test=True and only see intended changes. Here's an example: ID: salt-cloud-providers Function: file.recurse Name: /etc/salt/cloud.providers.d Result: None Comment: #### /etc/salt/cloud.providers.d/saltify.conf #### The file /etc/salt/cloud.providers.d/saltify.conf is set to be changed Started: 20:01:28.586441 Duration: 75.185 ms Changes: ---------- /etc/salt/cloud.providers.d/saltify.conf: ---------- diff: --- +++ @@ -1,4 +1,4 @@ -# This file is managed by Salt via salt://salt/files/cloud.providers.d/saltify.conf?saltenv=myenv +# This file is managed by Salt via salt://salt/files/cloud.providers.d/saltify.conf?saltenv=dev saltify: provider: saltify --- salt/files/cloud.maps.d/_saltify.conf | 2 +- salt/files/cloud.profiles.d/_saltify.conf | 2 +- salt/files/cloud.providers.d/_saltify.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/salt/files/cloud.maps.d/_saltify.conf b/salt/files/cloud.maps.d/_saltify.conf index e7e3858..92427ab 100644 --- a/salt/files/cloud.maps.d/_saltify.conf +++ b/salt/files/cloud.maps.d/_saltify.conf @@ -1,4 +1,4 @@ -# This file is managed by Salt via {{ source }} +# This file is managed by Salt make_salty: - someinstance: ssh_host: somehost.somedomain diff --git a/salt/files/cloud.profiles.d/_saltify.conf b/salt/files/cloud.profiles.d/_saltify.conf index b837f4d..6ec7fe9 100644 --- a/salt/files/cloud.profiles.d/_saltify.conf +++ b/salt/files/cloud.profiles.d/_saltify.conf @@ -1,3 +1,3 @@ -# This file is managed by Salt via {{ source }} +# This file is managed by Salt make_salty: provider: saltify diff --git a/salt/files/cloud.providers.d/_saltify.conf b/salt/files/cloud.providers.d/_saltify.conf index 4ff5b1b..9edb96d 100644 --- a/salt/files/cloud.providers.d/_saltify.conf +++ b/salt/files/cloud.providers.d/_saltify.conf @@ -1,4 +1,4 @@ -# This file is managed by Salt via {{ source }} +# This file is managed by Salt {% set cloud = salt['pillar.get']('salt:cloud', {}) -%}