variation must now be a complete salt configuration, including a top.sls file. The scripts will clone the repository in /etc/salt/srv which is considered as the salt-master repository.
authorPaul Tonelli <paul.tonelli@logilab.fr>
Mon, 15 Apr 2013 16:32:35 +0200
changeset 113 e274a7faca62
parent 112 1a3ea03a1668
child 114 79ef182dcc5e
variation must now be a complete salt configuration, including a top.sls file. The scripts will clone the repository in /etc/salt/srv which is considered as the salt-master repository. Previously, the variation was a directory containing an init.sls file and used as an independant state closes #215392
ami_pre/files.sls
update.sls
variation.top.sls
--- a/ami_pre/files.sls	Mon Apr 15 11:50:00 2013 +0200
+++ b/ami_pre/files.sls	Mon Apr 15 16:32:35 2013 +0200
@@ -78,15 +78,6 @@
 {% if 'ami.hg_rev_variation' in grains %}
         - rev: {{ grains['ami.hg_rev_variation'] }}
 {% endif %}
-        - target: /mnt/variation/etc/salt/srv/variation
+        - target: /mnt/variation/etc/salt/srv
         - require:
             - mount.mounted: mounted_variation
-
-variation.top.sls:
-    file.managed:
-        - name: /mnt/variation/etc/salt/srv/top.sls
-        - source: salt://variation.top.sls
-        - mode: 644
-        - require:
-            - mount.mounted: mounted_variation
-
--- a/update.sls	Mon Apr 15 11:50:00 2013 +0200
+++ b/update.sls	Mon Apr 15 16:32:35 2013 +0200
@@ -9,6 +9,7 @@
       - glance
       - vim
 
+    
 {% if 'ami.hg_address_server' in grains %}
 hg_code:
     hg.latest:
@@ -20,3 +21,25 @@
         - require:
             - pkg: my_pkgs
 {% endif %}
+
+rc.local:
+    file.managed:
+        - name: /etc/rc.local
+        - source: salt://others/rc.local
+        - mode: 755
+{% if 'ami.hg_address_server' in grains %}
+    require:
+        - hg.latest: hg_code
+{% endif %}
+
+minion:
+    file.managed:
+        - name: /etc/salt/minion
+        - source: salt://minion
+        - mode: 755
+{% if 'ami.hg_address_server' in grains %}
+    require:
+        - hg.latest: hg_code
+{% endif %}
+
+
--- a/variation.top.sls	Mon Apr 15 11:50:00 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-# /srv/salt/top.sls
-base:
-  '*':
-    - variation