From 40a8d4348aadd729367f371c4e87aa716cfc79dd Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Tue, 16 May 2023 17:55:01 +0800 Subject: [PATCH] add hourly restarts and make keys diff per-host --- host_vars/eu/healthchecks.yaml | 11 ++++++++++ host_vars/eu/privfrontends_secrets.yaml | 20 ++++++++++++++++++ host_vars/in/healthchecks.yaml | 11 ++++++++++ host_vars/in/privfrontends_secrets.yaml | 20 ++++++++++++++++++ host_vars/us/healthchecks.yaml | 11 ++++++++++ host_vars/us/privfrontends_secrets.yaml | 20 ++++++++++++++++++ privfrontends/playbook.yaml | 14 +++++++++++++ secrets.enc | 28 +++++++------------------ 8 files changed, 114 insertions(+), 21 deletions(-) create mode 100644 host_vars/eu/healthchecks.yaml create mode 100644 host_vars/eu/privfrontends_secrets.yaml create mode 100644 host_vars/in/healthchecks.yaml create mode 100644 host_vars/in/privfrontends_secrets.yaml create mode 100644 host_vars/us/healthchecks.yaml create mode 100644 host_vars/us/privfrontends_secrets.yaml diff --git a/host_vars/eu/healthchecks.yaml b/host_vars/eu/healthchecks.yaml new file mode 100644 index 0000000..d3b0eb4 --- /dev/null +++ b/host_vars/eu/healthchecks.yaml @@ -0,0 +1,11 @@ +$ANSIBLE_VAULT;1.1;AES256 +61353335333766313361356562623335303363653831383165636530333234383030303962613931 +6131353234313634623166333539326635643939343030370a326435323338343535303030393233 +34333764386332663139353665613935623230343335336235643634666362356339313165663132 +3335633432303033390a326564346637363534383239333031313361333234653136653231373363 +38663465656539653864313330313238383861373065356562373231613930653931306239356230 +63363130323235346162316361383639386531303661313531373535313563623531376161356435 +64363730663430343737353331323061303434363263313435363033613435313735333835393863 +36363861353835356238643739633139313136343830613564623764646230323566353236636666 +31626338313336616330333866326534306331373666663430313438383163643837376166316633 +3263366236656464623063636333323465363338326366663838 diff --git a/host_vars/eu/privfrontends_secrets.yaml b/host_vars/eu/privfrontends_secrets.yaml new file mode 100644 index 0000000..5ff42ad --- /dev/null +++ b/host_vars/eu/privfrontends_secrets.yaml @@ -0,0 +1,20 @@ +$ANSIBLE_VAULT;1.1;AES256 +39646133643236626162346636373830663432373861663535343834653965353035303164623831 +3032326366363466373337356466623232366334343736660a663664643837333333316163666538 +31303735346236313233356564356436383539633138366261646162326262303236346361386562 +6635613334363339630a313736373532613064396364396662646131393136363665333565323966 +64643437356465653035646565356466613832323638343133363531313864393339653934383139 +37653235323739336466333361333265306565633738333039373063396263333938623066613066 +37663239306438343061383335376364363463666363613430346237306531333033333636666262 +31316362333664666262373432313131613439383435373430653630653465303466333136636436 +65666363373163393231363530303138356635626230323836623431376263336538326531303939 +65303431376261356530383038643536336535306234336530323435313462646635343639663137 +66613135336666346533616637333061313966656463363363663431326138656437386630306561 +35643239366266363339633533366261313532303139613037663137306435653031376434353837 +39613733666562646332643835613766626637303736373438623461353633336363336266303865 +37383130396563623539646262653134623930376531346563616562623361346163393039336138 +66333539383265653733653637663762326261396565616366333666383238613338616638373331 +34646439336639326163363261393531336637303039663561663031633631306536356437623630 +64623830383265653764333036353461613763333662343232373563613132616137663938656536 +35383032643330653261333838306636383230663236353530313337653737306430386262303035 +376637333861323464356439313363386536 diff --git a/host_vars/in/healthchecks.yaml b/host_vars/in/healthchecks.yaml new file mode 100644 index 0000000..f367cee --- /dev/null +++ b/host_vars/in/healthchecks.yaml @@ -0,0 +1,11 @@ +$ANSIBLE_VAULT;1.1;AES256 +38626431346431393962623738643565313736393130653265373038393538633431333634376134 +3733626230643163366565333763626536633666373466300a616337623935326538363866643465 +32663835333930393631623836633865393938353331396164623465326233363034303965393133 +6165633030366266330a643339626531303766383366663065353239346139663730663539653034 +38363266393734376139396638356264326166343964323065373732626134643133386330653233 +63336663366165643561356131336566393532393537303235663866353261343033616530353839 +38656536306561613237386339663636633036386438326162653863363139393862356434353463 +34313135643736663564626666643030646561363037383536656661316564356133396535613137 +34633763306139613363616366343062613730353938373465373135636230316236643365393764 +6461333665333538303466336363376435363966393538663265 diff --git a/host_vars/in/privfrontends_secrets.yaml b/host_vars/in/privfrontends_secrets.yaml new file mode 100644 index 0000000..528bbbc --- /dev/null +++ b/host_vars/in/privfrontends_secrets.yaml @@ -0,0 +1,20 @@ +$ANSIBLE_VAULT;1.1;AES256 +64346462636531653932386537343939653733326236376434623139343837393364306238376563 +3933613335653263356565343536613262336466653633660a626338636263366265626233313730 +32316139343564666534363631613461376539653832386531313061373666633331616338663165 +3233346264323938620a613039353135633063373536613836646330663236363434376332646336 +30356137333932666333376463653830663064306366663331643933653862343234393535613238 +35666564633835353734666432333938343635656364356138386238386362663532643664643034 +64303861346439653133333633663932653135303338396534666663396665346265656463633761 +39383835643933313930303666303738666239643230613732663133653439333263333439616231 +61356164646635613136623233303939366333333734653731653861373339303139373334373530 +31363031343965623936623961643161646432303135633135336231366236656537663639653663 +66383731333164643331343133656563636333393538326336333762623362656163663363646234 +36356339386631616336376337613136663136373134356162666561303631386438306230383662 +62663464646131613861396563326636343136306564306165376530633062653762646261316461 +62626466613463363761646563336539386330333864343835636563323337616334363862336637 +64613132663230633264363034323163373065393737363130346232643931333635323735663230 +33656463326135353564666265383539353537343662346630373930313361323736633332336464 +63316135353238303032333831313865373364653131363938386465623235333536656331333232 +62376130633233396166663862646161343433663835626136303935373961643932653832613638 +366536376530363632643732323135656631 diff --git a/host_vars/us/healthchecks.yaml b/host_vars/us/healthchecks.yaml new file mode 100644 index 0000000..fa30bca --- /dev/null +++ b/host_vars/us/healthchecks.yaml @@ -0,0 +1,11 @@ +$ANSIBLE_VAULT;1.1;AES256 +32353133376437383030636135373334663838383965303761373666656236653335656430633735 +3861393933636337646535393837663336303538346635340a316664366632363461663734326437 +30623838643565633464393837343133313337393431613562303631366262646135633965346465 +3138613663343966310a353062613134393933373364373432356565363465316431613535393363 +37393935303434636365616235613831666231386632636161656135633734343266653636313261 +39623632376536643065313137396135623165356362616538386664393333333232383930663263 +38336439633239636339363961623837396334343064313736666235333434383762663231323263 +61633961623464643138633131666266323339363862326461323133383938356337393933613436 +38396563373133356330316333613263363935663163363337373836396238636637373735383833 +3037653434623331633666633533363561346364373965336432 diff --git a/host_vars/us/privfrontends_secrets.yaml b/host_vars/us/privfrontends_secrets.yaml new file mode 100644 index 0000000..87a7e8e --- /dev/null +++ b/host_vars/us/privfrontends_secrets.yaml @@ -0,0 +1,20 @@ +$ANSIBLE_VAULT;1.1;AES256 +32613339666634363330653932366630643231623765363966653866656439363262383230343836 +3536666230383762623838666331353465333863393261650a653266633036646636623638633539 +65333864316332393565313239313136626366663339303235323331636337396535366662306530 +6135363132643035350a303830306266333065323037666236623634656232626437363832336630 +64336631346362306564616363326331616362316261303865343632623631356230653564313130 +39366438373739653264373439656564303438313166663333383365653730396335316334333366 +36326531643639646362323431323234326235356532623935383236373037323961613031366534 +35333732656236646666396137336166613238373866373838346137306538313065323635373338 +34613664313530656538643639643639393739373439353036633565636439373234316466636533 +39396631626662616135636130643662363236356532616238616234633833343163633230383134 +66633764633932613439636639373066333637653764653233353563326338303866323364313937 +65616533376430656262376634623331363830613634613731613936323235346633653663656336 +35656239653837663635363665653162303837326639653765616331383832666466656463303431 +35376237623365373764373866306462643333623438343934616662393134363036623232613437 +64376538393534386132383837306131336366323034373464356135343539373661636566383866 +38323861636561333063363935336339353830656563313432326539323963383634623461316539 +36393736353330353961613866316437376364623035636230666362633962323235396461343261 +36323561316533666130396432353735303239303661653331346333666439663532303065623137 +306166356434303664653536616366393864 diff --git a/privfrontends/playbook.yaml b/privfrontends/playbook.yaml index 09dab11..725fbbb 100644 --- a/privfrontends/playbook.yaml +++ b/privfrontends/playbook.yaml @@ -45,3 +45,17 @@ - name: Update docker compose files and restart those with changes (Privacy Frontends but without Pizza1) include_tasks: docker-tasks.yaml with_items: "{{ non_pizza_docker_services }}" + +- name: Setup cron jobs + hosts: privfrontends + tasks: + - name: Restart invidious every hour + cron: + name: "hourly invidious restart" + special_time: hourly + job: "docker restart invidious-invidious-1 && curl https://healthchecks.projectsegfau.lt/ping/{{invidious_hc_uuid}}" + - name: Restart teddit every hour + cron: + name: "hourly teddit restart" + special_time: hourly + job: "docker restart teddit && curl https://healthchecks.projectsegfau.lt/ping/{{teddit_hc_uuid}}" diff --git a/secrets.enc b/secrets.enc index e2d1f35..671d63b 100644 --- a/secrets.enc +++ b/secrets.enc @@ -1,22 +1,8 @@ $ANSIBLE_VAULT;1.1;AES256 -32316630323862343738306231666531626333396630366537373664396636313737356665306530 -3736386466623363383038393933343964316230636237380a343933626632663633376532663332 -31353534613239613632653362616465393264336134656365353238336537626239393333646235 -3139656638336630610a383666383336643331323930626131383865336263643632353335613432 -38343533396530303734663135326462656230333062653566663666346663313637313166663261 -65636635396465666630633335613465333763363530313930643533303763366163393364613232 -63353861386530363665633266653330363433653731663936613139356663623933373731336665 -34346336643965373566663362643766623364633233333531313165316665363132666466666333 -36666331323966353632326433326232643533636564383734626462336564663663656234643863 -33386138393934623735653437613135383936373231363966656535386530343566643265373463 -36333139333535383135333133646630343431323835346662313062373337393161323330353131 -64313230646230653664633034373462653764373033323333386638303737383461646630643835 -32303863306663326364633530613934663635316261316431633932633465646538353834663663 -36313830393264313232616638303839653637366366313132656438623432643666303362343564 -38343439373736376362663939353130643464623733633334386632333239663935346363633238 -31633366363634613365643333616439303435616338303836323932346465343035653535663437 -61616430336265323336353866306366346639366366313365353039336333613162303864646462 -36323661303164363462626664366162623631643963313232623661343766343165656335663162 -64393162643861373734316535376534373665393561303265643939323632646162663661333561 -35306639643764623862663930663339653064626331393863386538353763383838643332356339 -30336238366634313762393334653466396139383735623132366132616264386465 +30366366316131343265303362623939653433343438313263376234356334633735333138663535 +6536366438653031346361343137346337623437303230340a386332396135303634376439663066 +35633161396431663834313262313734373036333838633463393534373064336530353766393065 +3934323661626637370a316464353939393237346336376663616536653361333736373533633039 +37623362313061646332633664303763346334343064383236656337383834346565636261336135 +37333234373862626462653037653234396662323964343065393135316463656164323364386539 +663038613439316436643435633433333064