Create tailscale role, add vars, basic skeleton.

master
josiah 2 years ago
parent a38d722e3c
commit 66520d97cf

@ -1,94 +1,102 @@
$ANSIBLE_VAULT;1.1;AES256
37646362333463313538373433666337623238333436663038653934363462666661343436653862
3839303733356638386166386662376535616639303966660a616137393162616163653233383637
30626266353833323837353031303463376461386630333063346335366162386563373633626436
3135653362666563630a633832343962613336376636646161323632376333353634393661353232
66663134353464393137383836383961616532633638346565353165363830353664613361343038
65613437373339323562336435653239313561616330343536356561346137346539353231633133
61646131383462626531636233636666663030326635663431356266343734356661383637653161
62616330343266663032303335643662373238376665303037356633323563313632383833306266
66666364346531643732656666316534633737626262373436323462353832306561646333323135
34306563376639353164316636626431326437623634643933363966336564353835366438343761
66656535623636343861306638333739323437363831376638366130303930653035613237363834
31323433646464663131366234316233383337303762326335646331303535646464633736643361
37653133633963383539643861393265343362653863613634613634373334626136636466303263
62663336353637393230626536616466616665313938636537383239656234373136383432626237
32303263306636613766376466323461616634626466386130303533313434353866323166363737
62376263636536643931316361333461363033643932343632393735323736623334376164633266
62663137393738376237363965653932313934633365366630356264336165383238366465353237
64386639626132393563393632393162663266383765663031363262613366616261396133363737
35353033666533663138623861356231353762633731333966373965356633616132613837366236
31383530356539623065623466373033623662343333313234663536656337373231636166373138
66323933366238313437613239623761303861306132623763316537623133303538643061323735
30353333616437343666323866643539653965663439663331303066313435613330376630613031
31326333333831633833306130646664373930656261343033393732643536343061346634373939
65366433653562376231646665643666363336623836646364313938653063613334353266646166
63653732633037383033663762363133643534336231663439353938633561313061643933633761
30663765653932636365343133346336383638333631303133313262323365643464373862653538
37643639656131663962393839383334623439373238333036376566333334316136393934363661
31393731366236326464313035633234643165393262633336623062323061633762386332333730
38396435396338623662636636353437356161646634356266303961396566633336373238663765
33666632623432623339663763333730666634623233643066376331376532313835366637313461
36323535373330623834353634336462386235363933306565313636356639316439383566346233
62333330393937626666366334326334633434653839323461373536346364373438386339393330
66626132633065336366343563306431313262656437323834626136386439643133313336626463
32306661326533353764366335653435336162336661313533323034396130633033396266386664
64383466396132663765376530396562313864323831313731666431343937626331646463366230
66396666313730623137346166633266326263343533346135653066646465663262613438356632
66303233306361366635343364393137613231613635666365666634613036343764643736643435
37373065346661363164303463346433653564316236393534613363623735643534313539643964
62646263393130333962373764653139653664633734616535313365353065373030633137616363
38396538323063353636633166343364613564353963616663306635393563336432366563393064
33633762316163613833343439316434373635663032386630656637376138336366316536623565
35386661393366333538323235313065333934643133656436356261636430323061393738646335
38363461376362633363623135356133633836353961333164383061376665663065646161643138
35666434316131383536386338336633363337366632393633333932383034346662326436323565
31626138323832356634343030353762623062353261616163356433316537333663626433363631
61663863336466383135313333636430383436323665396234303462323138633137396233346462
31623434663363353530326337623736363939633465353838613438316365303666343161373031
36393536643433623034323038323266343030363563376665323538643634653438636336333361
36616537303362313237353635633962313331383938646665303238336331353039333230333635
66333863396461353666346262663936616564663762636534373963306665656131383863666535
65396436323565623937663861636162373039666563326531363939613130633464633133353737
38663438633566626337323739333836353534353932303366383266336631646633623637373532
66646230613834613733313533653062313166613039326634353562303566636439366237663031
66356438646537643132323536386132383838376433326266353635313031313965633132663032
34323333636132326133613833646462323534643330636534306634613964393230393930353532
63663831653430626634316130303538303439303133616563666531633835313434663863343061
64373233343862373934336663393433646538333338306536376639663961313735643634656239
38666431333334653832313932396264663436633332386233663937386132383630303430613637
37636333666563346332316138386639656631373739353131353635383639366431373563646361
36663839363635373465346366313039383137313162323432343837353934666634343538366664
31396235646463633361326239646539663561663838373937373763303430323634653264353731
64306239316433333033356437316135633336356366363436303133333139383131353032376666
37613430656564363163313835636165363636306637626532326564623736376663613636653735
32633861306131303231376439643139336231323463663830336339376265663866616238396462
33353530343635353662323162633665616435356633356264663037396561623566386338666163
33616236386164346262313235643639656538313964323964633730386134323764646535633032
62333032396562303665653866306136633061643363306531383430323339363432653166633264
36323932616332383938346664353935373532626430373234393433366565353161313732353662
62343462356135366433633131643062626365636331313362663634333130303631353466316664
34333331313834363833333530613737653762633265346163363438666262336162363262613430
38643437626565343133616437623131346566353936376265656137653461623366613862376434
66363439353239356434306333653738343434333936613233363136303838323730396634393364
66333462346539386434316534383735333331373935623863333336633337366439623330353335
66356166356265313739346136653135373736326432623464366466396363346330376339316530
31623431346639393863623439663436376634386634393263653233393161663232343061623236
63313965663037323565353432666662353839366132666135363632653337396436313039373231
64343063333532663837646461326530356137343036633338343836393638666461343130363332
35333631343262663233336330313839363866626537393838626466303965396165613535306261
63656636626432393332353534383938616234626439393037316236336564373261313131393133
64353636633333323935623864353033393838633939383937663437383336623034656535656266
62303633316466343163653737346633626231613435653330653266396462343538376230313132
35653766646430396664363635616530616235376235363261613535633831646162613337323631
37653333363234343436303235666265646337666534396335646663323633623066373861666563
33623166353563653965393538323663313334623937663030393262646436643132633738643334
31333337353562613432633834323439626266326333663338303039643533666362663636333837
33323337383030353039383963346534636232323032626434633264323438663039666162343134
61356536346563663837323031636261326665346331636136646261633438653839363563383433
65343435343461623639313034386334316661396664376537663136373465643166653636353031
30646231653537323837383161313234386338623237356431363833346263316530626430343766
38353030633933306461616264313166366231326432623832383864326134343939386333326363
62303763393665626362396132633830626434323737393364386531333263646465643234333635
39356436326239373932383238626439396339613438373761316132633065323332633539313233
6566
63343662613331383034316139666635383361646466323038663866633166356666336134333932
6333613961323930643834326239343432653934313534320a323964366638353535353566336438
32633338363565636135353031316132653261653236623565626230646239373161386336353534
6432626436306665380a646463316632646133313163393531316237653931353233316333303464
62303136313230623831366461326636373232623738663264393138333463376338633430316662
33363365633864636335383431646438616233383536373432396263373333393331366631623235
37666338633061663532396561336135393435646133343163633731306537383732396261633263
66323531613539353233326633306266623563323964383135616463346536626639373637396230
61663437373765643762306133346633626664383664663135303861326465333439346261393038
36313437653661613264373366303331343235336662666239353466333866356566303864363063
34356438646432336131653234373132303366373138386364646666336164643232366139393137
38363931373532343530363465363664353662346137313862396332356439653562313132663633
62363531343837616533656237303661323064636534643664393461373936383161663762633336
61623435663134323536316536666132376562303134633661356563643666373234393737373136
33616361346464326337626136616532343130666563613161653064633531623661303134653238
37313930336439636635323864386233323732653130633636343633303432383435653662653132
34616462366362633036363739623935333965333739303565656639616666613837653561336438
37643562396437653830303466316339313932646463383833313437373061303935396130646464
38396464363732386261373664313461363862626138346161373362323837393462393266656137
30393161313739633738353030316563353236393330326663636538653761343266336363653139
34323236383535323230666635343130303632313832623566393934333730336433343261346334
37386165653162623939363036653964663966303066373535626161326435653830613837333830
61356435656662396236306539646232626436306335376237306534613934303431303561383138
35373432623835383534643939396566313963663732323534643732333066306530386131343964
35313063376663306461353532396562646639343734366234363837353837666434353066633466
34613030343966353935663231373162363264356364376639303538396537343832643331636662
61316231383335323332613866396265336339363563303064636630373033333465316535353630
65396435363964363431373031663265626635663965616136323436396263396463303339356462
63376463396537613335396331643831303734343364633338333461303033353164323166613736
61356336643336626531663037363134383139313138333532343234646664353961343865323839
65326166616263323333363832363064383464633830666139663938343430336435373430616261
31396531643264306666633038623839353238633136306439613165373037393438313666376464
38366234656231353362653630336639353830333732653431613062653031643034333966373134
30666166616636393665626130636130613661316265376362613936303133333832326463643738
66343663393961623036356130323231663839353531316130396364353162323866303036636335
61383935306633353434626437653466656633656164633134613763623762383964313130396164
34656639323731356438383262316461393933663136336262393637323962333265663037353566
64646530656564633532333466346366323162393639353936393331643633316537383637353939
66613233396337326161316535313733643664383032366535333166366663343738646662663163
64323262636163373836393839316661333164343630323534383634316564323236356366353836
61366331303565636438323637626634633533376130643765383139373263666434323636303836
31343066303135303930343363373764373539303462383365313432373932333233626437316436
38336663663165636338373933613135316131616334393739623535323664326466306534666265
33623132633631386235613863616434333266303661613731653931373738666163646265666337
66376534306233343830623039316565386539376563366132323739666266363136653966636134
37346130353961313534303862666532346331646135326330356461306362393264313634623935
30333136646362316137313730666338346633656532633739656164393663343230656631663162
62626566626132383938376335623136313132356262623637303065613433306433353437646561
34306365613432323036336463666431393534336361613536646538663134353432316633653632
63666261313834636665376636356463666166636562366538333732323830643937633336306533
34366462343531396239303933663966613566616563346639633630333739383133396361613034
62386631393561356331633661653433636335373064656231646232393565616338383164623030
64343632363636306232326364653035633032313561393563653939653061643130383761643030
63346631373864343231303339383438636637353431396462623938646165356538333266663464
37356164353939643133363564616135303231353738346663363738633031393638666364373163
38633537373339656633373536343833323933353861616236636433353032643933633465333361
35333164306235343633393637656665306234656634346235303135386361626166396561346461
33653363616665383563623863373162633134346637393164663964326161373639636631653435
31643163333566656439626133383539383931313865663261633862623936356438336438363064
33386330383035336262633736306261386230383130363538326339346463303966383166653030
65383536303533666136353863393232383263623833663738326136656531313562386564643461
61373163386666366264316566633238666631356532346139636666343663316162633337663861
36356535633737363637386138313430663734393239313964373235643361343939343138623338
65313334623136343130613465323232323230333230626332303132643163313335316461636639
66326139613430303862336532346266303564663433643633383362633262663631616139346232
39393339636233616562373938626161643934363566646332346135626534303933633634303734
35626566366166346533386636663063333362633163383661363665376365643236393336303430
37363834306338346663383638373535343966643139333364656133616463306464613030623166
34343563366133363538326537346365393430356163303035363531666366613465643261663863
31386562343566353033333637343837306664613530353532626330326163373338636464666639
32306232353961623064363936306564643337623436376132313539393633666266636338373763
33356266656539323532663937316664623432363835623164343063663036633934316563633230
31626238656635633838303432383037613231613863623663643935306363653135396437336163
32323166653937303135646137656339396330306264666165353064313137393564326564353562
61313731333063636239626632656337393638666631313237393239303066656466626362333836
32303239613838303431353833653031626537386639396637373061353063636630313638623966
34656534306631356534303732323234653135396561373633373236393563643936333935633032
31663764626665646232613231393262313464616666653065626134333563353364656364633434
37396163333436333830396237373839396231623231653064616633373435326335633262393634
36616162393531396462383835653437636464356336636565393835373436333736386138393265
39313532363061616362373337366335303166646262366135373264666465646263313934343463
35373338363931383138336635656137353361363636306437383932623863343161636261383632
33666136366438626432363463626130663061613738653463643461336137376435343263313939
64653038386632653538616137623765613132643938353734363763623739316631356530643231
37323463343665393636643763633466646632623731313131356232653039626431316138323032
30333836376664626335303263613433666463343564663733373135336538613561343862626339
36393464306430643635303633393061623566346539353734623537356166643663323762346366
30666430333565646536656633313762373536386163343833313261643234623338623430313238
32373638663036326537313665666362303936633534343533386135626261373130386463663563
35386433323836373937346664343962393862323436613731626566383266346436613939303339
30643836643333346534393632666261336534626532353163376662646431646564326633303663
34393561613263623764363134653632656535373239356266633764366230346562303937643233
32643561653335623362326539666432376566393363633861316131373362633334363236323966
62393662373034393864363433663235333734383830653439633035353238356462313739663336
32386566323938633134373231623263343865646263356663313034323532623664626164393834
63386535373366313466313365376638316165356661366566336461653032383363326261613334
31646265323633316362396265366361373232653463336336396631393632306261613365623931
39383765656132653432356431313661636133623033623161383631383637663363333136343963
30326263393834313538336432666563396637323731613561333937356666366464336331656230
31333933396535353635356132363964346465623164643437653534623965613131373266313565
66393931303431316562636434653539623135396563316436633131323830346235

@ -0,0 +1,5 @@
---
tailscale_auth_key: "{{ vault_tailscale_auth_key }}"
# note that ^ expires every 90 days right now, I think
# far from ideal

@ -0,0 +1,2 @@
* tailscale ansible role
- prior art: https://github.com/mbialon/ansible-role-tailscale

@ -0,0 +1,43 @@
---
- name: Add Tailscale repository key (ubuntu)
apt_key:
url: "https://pkgs.tailscale.com/stable/ubuntu/{{ ansible_distribution_release }}.gpg"
state: present
become: true
when: ansible_distribution == "Ubuntu"
- name: Add Tailscale repository (ubuntu)
apt_repository:
repo: "deb https://pkgs.tailscale.com/stable/ubuntu {{ ansible_distribution_release }} main"
filename: tailscale
state: present
become: true
when: ansible_distribution == "Ubuntu"
- name: Add Tailscale repository key (debian)
apt_key:
url: "https://pkgs.tailscale.com/stable/debian/{{ ansible_distribution_release }}.gpg"
state: present
become: true
when: ansible_distribution == "Debian"
- name: Add Tailscale repository (debian)
apt_repository:
repo: "deb https://pkgs.tailscale.com/stable/debian {{ ansible_distribution_release }} main"
filename: tailscale
state: present
become: true
when: ansible_distribution == "Debian"
- name: Install packages
apt:
name:
- tailscale
state: present
become: true
- name: Connect machine to your Tailscale network
command: tailscale up -authkey {{ tailscale_auth_key }}
changed_when: no
become: true

@ -0,0 +1,8 @@
---
- name: cloud wg config
hosts: vpn
tasks:
- debug: msg="Deploying wg to cloud server"
roles:
- { name: tailscale, tags: ['tailscale'] }
Loading…
Cancel
Save