From 153feac309fcbc2e70b752de35127ba375c93599 Mon Sep 17 00:00:00 2001 From: Kenneth Wilke Date: Fri, 23 Aug 2013 11:52:46 -0500 Subject: [PATCH 1/9] Edited master template made fileserver_backend and gitfs_remotes look more like expected --- salt/files/master | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/salt/files/master b/salt/files/master index bfa6640..e0a67d9 100644 --- a/salt/files/master +++ b/salt/files/master @@ -379,8 +379,12 @@ file_ignore_glob: # fileserver_backend: # - git # - roots -{{ get_config('fileserver_backend', '[]') }} - +{% if 'fileserver_backend' in master -%} +fileserver_backend: +{% for backend in master['fileserver_backend'] -%} + - {{ backend }} +{%- endfor %} +{% endif %} # Git fileserver backend configuration # When using the git fileserver backend at least one git remote needs to be # defined. The user running the salt master will need read access to the repo. @@ -393,8 +397,12 @@ file_ignore_glob: # environments. # Note: file:// repos will be treated as a remote, so refs you want used must # exist in that repo as *local* refs. -{{ get_config('gitfs_remotes', '[]') }} - +{% if 'gitfs_remotes' in master -%} +gitfs_remotes: +{% for remote in master['gitfs_remotes'] -%} + - {{ remote }} +{%- endfor %} +{% endif %} ##### Pillar settings ##### ########################################## From 92b25727348274c5fc5a463ea1e0ada56fe3453a Mon Sep 17 00:00:00 2001 From: Kenneth Wilke Date: Fri, 23 Aug 2013 11:54:12 -0500 Subject: [PATCH 2/9] newline fix --- salt/files/master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/files/master b/salt/files/master index e0a67d9..5eb13f8 100644 --- a/salt/files/master +++ b/salt/files/master @@ -383,7 +383,7 @@ file_ignore_glob: fileserver_backend: {% for backend in master['fileserver_backend'] -%} - {{ backend }} -{%- endfor %} +{% endfor -%} {% endif %} # Git fileserver backend configuration # When using the git fileserver backend at least one git remote needs to be @@ -401,7 +401,7 @@ fileserver_backend: gitfs_remotes: {% for remote in master['gitfs_remotes'] -%} - {{ remote }} -{%- endfor %} +{% endfor -%} {% endif %} ##### Pillar settings ##### From 98fd674c95298baa3ab71662271d0267ef8a55b5 Mon Sep 17 00:00:00 2001 From: Kenneth Wilke Date: Fri, 23 Aug 2013 11:55:09 -0500 Subject: [PATCH 3/9] indentation fix --- salt/files/master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/files/master b/salt/files/master index 5eb13f8..d41d43f 100644 --- a/salt/files/master +++ b/salt/files/master @@ -381,7 +381,7 @@ file_ignore_glob: # - roots {% if 'fileserver_backend' in master -%} fileserver_backend: -{% for backend in master['fileserver_backend'] -%} +{%- for backend in master['fileserver_backend'] %} - {{ backend }} {% endfor -%} {% endif %} @@ -399,7 +399,7 @@ fileserver_backend: # exist in that repo as *local* refs. {% if 'gitfs_remotes' in master -%} gitfs_remotes: -{% for remote in master['gitfs_remotes'] -%} +{%- for remote in master['gitfs_remotes'] %} - {{ remote }} {% endfor -%} {% endif %} From e83d25b80fe8d870661f44008aef1b8f738d109d Mon Sep 17 00:00:00 2001 From: Kenneth Wilke Date: Fri, 23 Aug 2013 11:57:45 -0500 Subject: [PATCH 4/9] newline fix --- salt/files/master | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/salt/files/master b/salt/files/master index d41d43f..06adb97 100644 --- a/salt/files/master +++ b/salt/files/master @@ -400,9 +400,8 @@ fileserver_backend: {% if 'gitfs_remotes' in master -%} gitfs_remotes: {%- for remote in master['gitfs_remotes'] %} - - {{ remote }} -{% endfor -%} -{% endif %} + - {{ remote }}{% endfor -%} +{%- endif %} ##### Pillar settings ##### ########################################## From c080cf37d6cf7043fef0ed93764a7b0694ba0949 Mon Sep 17 00:00:00 2001 From: Kenneth Wilke Date: Fri, 23 Aug 2013 12:01:36 -0500 Subject: [PATCH 5/9] ext_pillar fix --- salt/files/master | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/files/master b/salt/files/master index 06adb97..578dc04 100644 --- a/salt/files/master +++ b/salt/files/master @@ -403,6 +403,7 @@ gitfs_remotes: - {{ remote }}{% endfor -%} {%- endif %} + ##### Pillar settings ##### ########################################## # Salt Pillars allow for the building of global data that can be made selectively @@ -437,7 +438,7 @@ ext_pillar: {% for name, args in master['ext_pillar'].items() -%} - {{ name }}: {{ args }} {% endfor -%} -{% elif 'pillar_roots' in salt -%} +{% elif 'ext_pillar' in salt -%} ext_pillar: {% for name, args in salt['ext_pillar'].items() -%} - {{ name }}: {{ args }} From 426493b76dad77b48bc80bc4509d49d603f1295b Mon Sep 17 00:00:00 2001 From: Kenneth Wilke Date: Tue, 27 Aug 2013 10:20:42 -0500 Subject: [PATCH 6/9] fixed ext_pillar --- salt/files/master | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/salt/files/master b/salt/files/master index 578dc04..b574b49 100644 --- a/salt/files/master +++ b/salt/files/master @@ -435,13 +435,13 @@ pillar_roots: {% if 'ext_pillar' in master -%} ext_pillar: -{% for name, args in master['ext_pillar'].items() -%} - - {{ name }}: {{ args }} +{% for pillar in master['ext_pillar'] %} + - {{ pillar }} {% endfor -%} {% elif 'ext_pillar' in salt -%} ext_pillar: -{% for name, args in salt['ext_pillar'].items() -%} - - {{ name }}: {{ args }} +{% for pillar in salt['ext_pillar'] %} + - {{ pillar }} {% endfor -%} {% else %} # ext_pillar: From e104b3eb417789f0036575d475b8c1162d1fa879 Mon Sep 17 00:00:00 2001 From: Kenneth Wilke Date: Tue, 27 Aug 2013 10:28:33 -0500 Subject: [PATCH 7/9] fixed ext_pillar --- salt/files/master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/files/master b/salt/files/master index b574b49..9f74dbd 100644 --- a/salt/files/master +++ b/salt/files/master @@ -436,12 +436,12 @@ pillar_roots: {% if 'ext_pillar' in master -%} ext_pillar: {% for pillar in master['ext_pillar'] %} - - {{ pillar }} + - {{ pillar.items()[0] }}: {{ pillar.items()[1] {% endfor -%} {% elif 'ext_pillar' in salt -%} ext_pillar: {% for pillar in salt['ext_pillar'] %} - - {{ pillar }} + - {{ pillar.items()[0] }}: {{ pillar.items()[1] {% endfor -%} {% else %} # ext_pillar: From 1f71bef33bb78d21d8e718adf205bdf625282f85 Mon Sep 17 00:00:00 2001 From: Kenneth Wilke Date: Tue, 27 Aug 2013 10:30:23 -0500 Subject: [PATCH 8/9] jijna syntax fix --- salt/files/master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/files/master b/salt/files/master index 9f74dbd..b0ea341 100644 --- a/salt/files/master +++ b/salt/files/master @@ -436,12 +436,12 @@ pillar_roots: {% if 'ext_pillar' in master -%} ext_pillar: {% for pillar in master['ext_pillar'] %} - - {{ pillar.items()[0] }}: {{ pillar.items()[1] + - {{ pillar.items()[0] }}: {{ pillar.items()[1] }} {% endfor -%} {% elif 'ext_pillar' in salt -%} ext_pillar: {% for pillar in salt['ext_pillar'] %} - - {{ pillar.items()[0] }}: {{ pillar.items()[1] + - {{ pillar.items()[0] }}: {{ pillar.items()[1] }} {% endfor -%} {% else %} # ext_pillar: From e3a29bf69aa1af1c131b82fd88c2b6ee81d5f0d3 Mon Sep 17 00:00:00 2001 From: Kenneth Wilke Date: Tue, 27 Aug 2013 10:33:06 -0500 Subject: [PATCH 9/9] ext_pillar fix --- salt/files/master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/files/master b/salt/files/master index b0ea341..8461e50 100644 --- a/salt/files/master +++ b/salt/files/master @@ -436,12 +436,12 @@ pillar_roots: {% if 'ext_pillar' in master -%} ext_pillar: {% for pillar in master['ext_pillar'] %} - - {{ pillar.items()[0] }}: {{ pillar.items()[1] }} + - {{ pillar.items()[0][0] }}: {{ pillar.items()[0][1] }} {% endfor -%} {% elif 'ext_pillar' in salt -%} ext_pillar: {% for pillar in salt['ext_pillar'] %} - - {{ pillar.items()[0] }}: {{ pillar.items()[1] }} + - {{ pillar.items()[0][0] }}: {{ pillar.items()[0][1] }} {% endfor -%} {% else %} # ext_pillar: