From 316622ef9b7c37708ec2ea95ecf59575f40922c8 Mon Sep 17 00:00:00 2001 From: Charles McLaughlin Date: Wed, 7 Jun 2017 13:38:21 -0700 Subject: [PATCH 1/2] 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', {}) -%} From 3a261c7da009e0c014e3da9e94a47642b277208d Mon Sep 17 00:00:00 2001 From: Charles McLaughlin Date: Wed, 7 Jun 2017 14:55:25 -0700 Subject: [PATCH 2/2] Update comment for consistency --- 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 92427ab..cf89330 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 +# This file is managed by Salt! Do not edit by hand! 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 6ec7fe9..d65c846 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 +# This file is managed by Salt! Do not edit by hand! make_salty: provider: saltify diff --git a/salt/files/cloud.providers.d/_saltify.conf b/salt/files/cloud.providers.d/_saltify.conf index 9edb96d..5d3d2e3 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 +# This file is managed by Salt! Do not edit by hand! {% set cloud = salt['pillar.get']('salt:cloud', {}) -%}