iterate and enforce multiple git repos
Change-Id: Idee3a226b08c118905db0b0790b4a647ab60ef2d
diff --git a/README.rst b/README.rst
index c94acb1..d5bfc0c 100644
--- a/README.rst
+++ b/README.rst
@@ -69,10 +69,20 @@
heat:
client:
enabled: true
- source:
- engine: git
- address: git@repo.domain.com/heat-templates.git
- revision: master
+ template:
+ admin:
+ domain: default
+ source:
+ engine: git
+ address: git@repo.domain.com/admin-templates.git
+ revision: master
+ default:
+ domain: default
+ source:
+ engine: git
+ address: git@repo.domain.com/default-templates.git
+ revision: master
+
Heat system definition of several stacks/systems
diff --git a/heat/client.sls b/heat/client.sls
index e885147..0cca6da 100644
--- a/heat/client.sls
+++ b/heat/client.sls
@@ -12,16 +12,21 @@
file.directory:
- name: /srv/heat
-{%- if client.source.engine == 'git' %}
-{{ client.source.address }}:
+{%- for project_name, project in client.template.iteritems() %}
+
+{%- if project.source.engine == 'git' %}
+
+{{ project.source.address }}:
git.latest:
- - target: /srv/heat/env
- - rev: {{ client.source.revision }}
+ - target: /srv/heat/env/{{ project.domain }}/{{ project_name }}
+ - rev: {{ project.source.revision }}
- require:
- pkg: git_packages
- file: /srv/heat
{%- endif %}
+{%- endfor %}
+
{%- endif %}
\ No newline at end of file