summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-03-27 13:15:13 +0100
committermakefu <github@syntax-fehler.de>2014-03-27 13:15:13 +0100
commita592e32c69cdacbfad1c2ac7c2b54c42155c0524 (patch)
tree0ca3b80c59e8ee175a190329ba2508d9bb6f82d4
parent69a0b3b50de75a81dc95fe84d73895b753fc3cbe (diff)
remove legacy hosts
-rw-r--r--retiolum/hosts/chinaman11
-rw-r--r--retiolum/hosts/geisha11
-rw-r--r--retiolum/hosts/heidi10
-rw-r--r--retiolum/hosts/monitoring7
-rwxr-xr-xservices/bin/sync-host-to-services15
5 files changed, 15 insertions, 39 deletions
diff --git a/retiolum/hosts/chinaman b/retiolum/hosts/chinaman
deleted file mode 100644
index 60ea744e..00000000
--- a/retiolum/hosts/chinaman
+++ /dev/null
@@ -1,11 +0,0 @@
-Subnet = 10.243.64.163
-Subnet = 42:d3ef:d47b:531c:4314:ca07:a226:4064
-
------BEGIN RSA PUBLIC KEY-----
-MIIBCgKCAQEAyVYuNcqYublIdsVS6DEnfCoxQONH8keQai2wyJn4fIvCHlOY/nH1
-l0IsGAa6zsBrg+EMfPUr+0Cw/+X6UcYLuHS8Zapv30Ye+BNrVUd16Vom0rCrcVKB
-qweYoQGQPIWPNR5abVXwbP1zBuygzmBmEUFBzmYHFaRIMihqOii5wgBU2E9qaSs3
-wjT3ujARHYVoDRO6ifyzIqZ/F3DJ91j+FQkNfsgk8G2sV4h9WX4I13niwdzxGFHr
-lUZIt1OKjhfgYGqBoULZ6g7Wk/aNwfbzETvesjiVr92fvR6I/QsjZK9A4v3mAyQ4
-p2yYCmOLU2IV/Q9mFhX0Y40lq0hpKksRkwIDAQAB
------END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/geisha b/retiolum/hosts/geisha
deleted file mode 100644
index 6a3a2788..00000000
--- a/retiolum/hosts/geisha
+++ /dev/null
@@ -1,11 +0,0 @@
-Subnet = 10.243.175.29
-Subnet = 42:b6aa:9052:fffc:807b:4829:8756:860c
-
------BEGIN RSA PUBLIC KEY-----
-MIIBCgKCAQEA0kVV9ezFx/kZ6GvSALhXODkWlwHSjdA5hBJ90bdNcILeltVa3FIv
-K2E+L6EG/jsETWKutxOk08+B/Z3p1SONgEksTNBdXx/Crww5PZGN/ocVSKZj61/N
-lCej/Jcu88a4/R7JHIiSMdmqRCGHnwnxRA0iDQZIunriUH83NqMBQk6Drkphr/9a
-5U8PhlqC5oSzZrg0uReRuBK86KmU03vp9/DndaLn18G835dtWRBQ2aEfIrrlaTPJ
-ZKN/0xYZJU3v8YJYPi+UeRSymecSNgFQg36v95r3s4j3trk+yXVzVwT347AZRm4a
-d/AHdk0+blXyUr5CFBsjA71cJfzqIIJJrwIDAQAB
------END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/heidi b/retiolum/hosts/heidi
deleted file mode 100644
index 5ba59846..00000000
--- a/retiolum/hosts/heidi
+++ /dev/null
@@ -1,10 +0,0 @@
-Subnet = 10.243.0.45
-Subnet = 42:7555:0ab6:6de2:e50a:a702:45b5:9fae/128
------BEGIN RSA PUBLIC KEY-----
-MIIBCgKCAQEA3Mp0dxGooYuoh/f+V+gdfDoG3izloxsNIJT8jPxZUPR8GE+Sn/Yc
-bVfy7svy7AEyjQyxke5P58UpBB+D30XhO22Dr5mf9VGRcn6TYlM/u3FYxVNn+fhz
-iN5oHeRjvJg58z9pdH/kHOtAPnVVEmjOGZxVO786JZ1obtRJ5Mx4aOHEaab1aThR
-E7tcyT0xtPJfUARITVrLsFulGh0KaDb0bTADxBQiHSoRibCpraylOxF7tzbINqaX
-ogMfYooGLutlEQJfOYsbmoTJX0caSK+9Y4njqpwkAx14P2ME6hfdYPrp82TtpOS3
-kOY3HAVTnHEsTxM4wDS7et316S5/BuW5rQIDAQAB
------END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/monitoring b/retiolum/hosts/monitoring
deleted file mode 100644
index e51c309d..00000000
--- a/retiolum/hosts/monitoring
+++ /dev/null
@@ -1,7 +0,0 @@
-Subnet = 42:82cb:f60c:6f27:611a:42f8:906c:2c70/128
-Subnet = 10.243.97.250/32
------BEGIN RSA PUBLIC KEY-----
-MIGJAoGBAMjS8WxgbfJKVGRIFD0Bv+odQ7THNWDIcr1p4riVbOUPxtce+abasYGl
-DOwaejcHP5bF11EAOOvdEtrivZReIZqYbMz5oWHLO6GCJn7nOCZVCW4LnUuNP3u8
-KQEU5oKj7LsKrBEEOtwpfNoWuZFzuzF0A6A2n+YYoea/Ak+hEbSbAgMBAAE=
------END RSA PUBLIC KEY-----
diff --git a/services/bin/sync-host-to-services b/services/bin/sync-host-to-services
new file mode 100755
index 00000000..ed795fb6
--- /dev/null
+++ b/services/bin/sync-host-to-services
@@ -0,0 +1,15 @@
+#!/bin/sh
+green='\e[0;32m'
+red='\e[0;31m'
+nc='\e[0m'
+
+outdir=${1?please provide services-outdir}
+find /etc/tinc/retiolum/hosts/ -type f | while read hostfile;do
+ host=$(basename "$hostfile")
+ if test -e "$outdir/$host";then
+ echo "${green}$host already exists$nc"
+ else
+ echo "${red}$host missing, adding${nc}"
+ cat ../services.txt | sed "s#{{hostname}}#$host#" > $outdir/$host
+ fi
+done