]> Frank Brehm's Git Trees - salt/pillar.git/commitdiff
Reorganized locations
authorFrank Brehm <frank@brehm-online.com>
Thu, 21 Apr 2016 05:27:08 +0000 (07:27 +0200)
committerFrank Brehm <frank@brehm-online.com>
Thu, 21 Apr 2016 05:27:08 +0000 (07:27 +0200)
common.sls
location/default.sls [new file with mode: 0644]
location/gridscale.sls [new file with mode: 0644]
location/hetzner.sls [new file with mode: 0644]
location/pb-fra.sls [new file with mode: 0644]
location/pb-las.sls [new file with mode: 0644]
networking/has_public_v6.sls [new file with mode: 0644]
networking/no_public_v6.sls [new file with mode: 0644]
top.sls

index 87f8e872031881ae00b21519ac85fa312f0053f2..2a7b807f4583a7409e75ac8b5033a7cdd8b1ce06 100644 (file)
@@ -5,36 +5,6 @@ logrotate:
   verbose: False
 {%- endif %}
 
-networking:
-{%- if salt['grains.get']('fqdn') == 'ns3.uhu-banane.de' %}
-  has_public_ipv6: True
-{%- elif salt['grains.get']('fqdn') in ('liz.nexunus.net', ) %}
-  has_public_ipv6: True
-{%- else %}
-  has_public_ipv6: False
-{%- endif %}
-
-location:
-{%- if salt['grains.get']('fqdn') == 'ns3.uhu-banane.de' %}
-  provider: gridscale
-{%- elif salt['grains.get']('fqdn') in ('liz.nexunus.net', ) %}
-  provider: hetzner
-{%- else %}
-  provider: profitbricks
-{%- endif %}
-{%- if salt['grains.get']('fqdn') == 'ns2.uhu-banane.de' %}
-  country: us
-{%- else %}
-  country: de
-{%- endif %}
-{%- if salt['grains.get']('fqdn') == 'ns2.uhu-banane.de' %}
-  dc: pb-las
-{%- elif salt['grains.get']('fqdn') == 'ns1.uhu-banane.de' %}
-  dc: pb-fra
-{%- else %}
-  dc: unknown
-{%- endif %}
-
 git:
   deploy:
     pub-key-type: ssh-rsa
diff --git a/location/default.sls b/location/default.sls
new file mode 100644 (file)
index 0000000..c6b595f
--- /dev/null
@@ -0,0 +1,4 @@
+location:
+  provider: profitbricks
+  country: de
+  dc: unknown
diff --git a/location/gridscale.sls b/location/gridscale.sls
new file mode 100644 (file)
index 0000000..cff88f5
--- /dev/null
@@ -0,0 +1,2 @@
+location:
+  provider: gridscale
diff --git a/location/hetzner.sls b/location/hetzner.sls
new file mode 100644 (file)
index 0000000..48ae052
--- /dev/null
@@ -0,0 +1,2 @@
+location:
+  provider: hetzner
diff --git a/location/pb-fra.sls b/location/pb-fra.sls
new file mode 100644 (file)
index 0000000..eae1831
--- /dev/null
@@ -0,0 +1,3 @@
+location:
+  provider: profitbricks
+  dc: pb-fra
diff --git a/location/pb-las.sls b/location/pb-las.sls
new file mode 100644 (file)
index 0000000..14efac6
--- /dev/null
@@ -0,0 +1,4 @@
+location:
+  provider: profitbricks
+  country: us
+  dc: pb-las
diff --git a/networking/has_public_v6.sls b/networking/has_public_v6.sls
new file mode 100644 (file)
index 0000000..cfcdd2a
--- /dev/null
@@ -0,0 +1,3 @@
+networking:
+  has_public_ipv6: True
+
diff --git a/networking/no_public_v6.sls b/networking/no_public_v6.sls
new file mode 100644 (file)
index 0000000..cf63f4c
--- /dev/null
@@ -0,0 +1,3 @@
+networking:
+  has_public_ipv6: False
+
diff --git a/top.sls b/top.sls
index dc4a5647a8c629c672217a2324b0422fe7e00e64..6ac6ad6350823df9169c350e2010db1d04253391 100644 (file)
--- a/top.sls
+++ b/top.sls
@@ -1,6 +1,11 @@
 base:
-  'ns1.uhu-banane.de':
+  '*':
     - common
+    - location.default
+    - networking.no_public_v6
+
+  'ns1.uhu-banane.de':
+    - location.pb-fra
     - postfix.satellite
     - debian.openssh
     - resolver.common
@@ -9,7 +14,7 @@ base:
     - bind.secondary
 
   'ns2.uhu-banane.de':
-    - common
+    - location.pb-las
     - postfix.satellite
     - debian.openssh
     - resolver.common
@@ -18,7 +23,8 @@ base:
     - bind.secondary
 
   'ns3.uhu-banane.de':
-    - common
+    - location.gridscale
+    - networking.has_public_v6
     - postfix.satellite
     - debian.openssh
     - resolver.common
@@ -26,6 +32,11 @@ base:
     - bind.primary
 
   'liz.nexunus.net':
-    - common
+    - location.hetzner
+    - networking.has_public_v6
+    - resolver.nexunus
+
+  'be.nexunus.net':
+    - location.hetzner
     - resolver.nexunus