summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-04-20 23:14:05 +0200
committerChristian Pointner <equinox@spreadspace.org>2019-04-20 23:14:05 +0200
commitaa8041c8b9aa5696a374ccc5c75245a1ce6ea695 (patch)
tree1838d1d5e1191d5a2d6bccfcd46a08389c5c8c7b
parentchange default port for mz zone (diff)
mz-router: added dyndns
-rw-r--r--chaos-at-home/host_vars/mz-router.yml61
-rw-r--r--chaos-at-home/mz-router.yml8
-rw-r--r--inventory/host_vars/mz-router.yml13
3 files changed, 82 insertions, 0 deletions
diff --git a/chaos-at-home/host_vars/mz-router.yml b/chaos-at-home/host_vars/mz-router.yml
new file mode 100644
index 00000000..9d5b814b
--- /dev/null
+++ b/chaos-at-home/host_vars/mz-router.yml
@@ -0,0 +1,61 @@
+$ANSIBLE_VAULT;1.2;AES256;chaos-at-home
+65643339366566643435323363386430633134636135383962623132373433393832663837376539
+3235323334643539356336333737646438393664336265660a393134323731336665386165613435
+33393233666434643462323235656163373365333565373566616666666339616632663464326436
+3061343337356139330a653463376366343835616237646239643338333866653530613364323638
+35336561633037366437333866306231613738336339646538373261656365386231393265363130
+37303830386562646335353462353662383636393233623962376565363435643366633733626334
+35643363306163666662353962393231643939313230343961666661333334313438653234373733
+37376530633163323462366434623532626536323830333562316239306634303731643965386233
+32383466356366613262653731663665343036373136343731393332616435636165393639643165
+30363663376236613533393333663163376332326536396465656162653961316563373861323662
+64393265636566306631323937333164613165616232393633386438316362656635383062303337
+39333932616535613230346666373635653363333761373765346237313731343166666136323734
+31383930646434306137333262376264323539383365303931353666333738666639386537353831
+63616366346336326331663938383161373837356331633265303266353738633233303039383066
+62633738376139626662366632373435373337323737336639306339653231336433333863303130
+64663964393562616635633738333139646334636433316638393835306366363238623562626134
+39643465303936633564373933343163643637616239663534666631633536613165326663663431
+37623931303461376336653562646366383836343534386366306334666330306635396561303661
+62353830666234616438383565636638663436303830356535323935653034646366396530313336
+61646137336435313138326535376339333735393931373333323561373936396664333537336361
+61646332623639663264646362393133356562616338303835336330393265663432323139356233
+66356161366564316339623835613266343233373434666462326531303361313230633638353963
+34303262653534326562623138313566646631343136393766316434663735326661623930626539
+66363066363236363965613765666362616137333035383331666163623266316434353731306366
+32623733613165653265386430663361373466396430306262353631326238396130613165656332
+34373139313063336636626461646563373531383935376436653933306333346431393833656366
+61356437333031346634616539326438613931346666346234333365303463626465353039616437
+37613433396138636534326638393966356661386662396330623234616638633333333161653735
+38386261306561383632613065653538376136306239336663356662386638623338613462353663
+62373666633333333461333963386632613137326165396433633439363938623838656665326339
+30323765613437373539333339646136633263323061653764306264316437353832313263323139
+32323633323562626661313534616263326561613030656363616461393334363833396133323266
+66386139383163386537383433396261373766653164373736323235643631656161393262383738
+61316533336662646232303936356236366436663265646131363237366463363732343964363366
+37653037303630613330333663623535663739643430333263636539613632303738653031663936
+38623665643939353733386335356161336531663333623538343332336264376663623261656633
+30333638646363356236303532363532353039323862366135653166316336623062333537366335
+31633839396461336361643465636664646164663762346236363763396263383163326465653964
+34663134623430353432646130633661636237613435323836386262333363373139376462363765
+63623638366136646265396432333339653234643532336233383461386361616630313936303162
+35626366366262623934333961653363616135313836643365613836343438353365383264623037
+31663231316462616137373435663039633434623466356266633235313865323362393636393862
+64343062336433343137316565373535666337653833353136376635666539656662373763623238
+30666532633965386264323565353431306633666364656662333631646139386138393066356238
+62653837656664333462363334373664373937333932313465353237636134626466343735633466
+31643039333866303233613762323866333264313135373130623166393339613131323537373537
+35626633373838363766623233626130646332336435316333323439613636373536343233633137
+30363863656465636635633936356165386633653637333932396164653835313163376363616133
+35376637376630636336386538353235353364313464313231633663616536323532336432376232
+64396234303332313134366133643664643165393932323361616666383162303337626663396131
+35613865373635303834373062666539386462663238383332616565303866316239613361373661
+37346162623764336332663431303664343430366562633361623566356266616534656562363833
+63366238656261646564306133623433306663376531373563363032303938303538356630636466
+30616630306334616237346661346235376133303538306638663631376163383138636365326230
+32376139373030303239376631316166393363613465323436633932376463303531386161313264
+65323261326232366332396335386639313735353135356139343937386232653737393565376639
+31363530313038306131383236396364666165393837343538316539336263333663643031623136
+30316436633662353162363836633238613833613530613762383662653435393263626161373938
+61613133643937346433643862326165326233363335656431663064336165383462623636383334
+63313438346136633461
diff --git a/chaos-at-home/mz-router.yml b/chaos-at-home/mz-router.yml
index 7adc9b6a..2095632e 100644
--- a/chaos-at-home/mz-router.yml
+++ b/chaos-at-home/mz-router.yml
@@ -4,3 +4,11 @@
roles:
- role: openwrt/image
delegate_to: localhost
+
+ post_tasks:
+ - pause:
+ prompt: "\n****** copy and install image onto router and wait for it to come back ******\n"
+
+ - shell: "base64 -d | ssh chmz-router \"/bin/sh -c 'umask 077; cat > /etc/dyndns/id_rsa'\""
+ args:
+ stdin: "{{ vault_dyndns_ssh_key_b64 }}"
diff --git a/inventory/host_vars/mz-router.yml b/inventory/host_vars/mz-router.yml
index 356c54d0..f79de2b1 100644
--- a/inventory/host_vars/mz-router.yml
+++ b/inventory/host_vars/mz-router.yml
@@ -75,6 +75,19 @@ openwrt_mixin:
iptables -t nat -F POSTROUTING
}
+ /etc/dyndns/update.sh:
+ mode: "0755"
+ content: |
+ #!/bin/sh
+ /usr/bin/ssh -i /etc/dyndns/id_rsa -p 222 dyndns@dyn.schaaas.at mzl | logger -t dyndns
+
+ /etc/crontabs/root:
+ mode: "0755"
+ content: |
+ # run dyndns update script every 10 minutes
+ */10 * * * * /etc/dyndns/update.sh > /dev/null
+
+
openwrt_uci:
system:
- name: system