From dcd497a42ddab15bf4cc73a14a3ffef3806de5e5 Mon Sep 17 00:00:00 2001 From: tolerryan <105945216+tolerryan@users.noreply.github.com> Date: Mon, 29 Sep 2025 23:09:57 -0500 Subject: [PATCH] update vault with netbird token, cleanup orivider, add post install steps to setup-netbird.yml --- .ansible.d/vault | 140 ++++++++++++++++++++++++++++-------- provider.tf | 2 - roles/lib/setup-netbird.yml | 27 ++++++- 3 files changed, 135 insertions(+), 34 deletions(-) diff --git a/.ansible.d/vault b/.ansible.d/vault index 7b7e32f..4690732 100644 --- a/.ansible.d/vault +++ b/.ansible.d/vault @@ -1,30 +1,112 @@ $ANSIBLE_VAULT;1.1;AES256 -31376333323862323764646330396335616231663032363037346437343333363961363832363063 -6661616138373738316565356561333863633435366331350a383866336130646139363461633862 -66653933363737616230356438663365383963656538633539663933633531613264343734313132 -3662616330666563340a656265393631393435666237613164656636646338636565373136333735 -39383031623361613634343033623332373131313961346637353333613234346164396562643166 -64396162373930656665303664346562383066646139383839353633383231653437376661633934 -63633764643832626566643862316364316334623931363032616561663330383538363731653237 -37643032326231363931623539333336653466343964346435626236633536363232376465613030 -61323334373261313861373239333963383163353737653232333336623734393665316133613063 -38393566386166613135353161613564643739626463366330306330633137666434393765623761 -33373066646630306264663365363631303864396561656237613263373261656361396562356232 -31303763656532393830653331633839643135646539333066613061326463373939643231383666 -32326233336235633430326639656163386636306532653166323335373863396266656331623232 -30363366663038373736643837386166396231643530306561616261623261363938666538343334 -34383236313561666661373937633732663261613264616531616566653837343637623136363066 -39303134643633663864396466366363653134326630316139323462613764336139303966653337 -39316636643238393836373932383866336234626263363263396438616334353534386263343061 -34336335646435346337376635303935633632636131346364306437633761623531623135366138 -30376438376438313162303932313838323430396466656239393838326266383535656434326565 -65303661333630633331336632326662333031343138386437666465643332633237373864396261 -63356333656665363139396261666661313035653364643361356332356236663739376339616162 -62366131333731343536373638303365373663663330373637346263663634326264303166383963 -30316363643966616162323032316439393862323032383436636334363262616464396461373165 -63656563313764613535353936306262343032306530303831616434366535616464643964616564 -35386661393864343361356366646262643634633332623734653163346338313863343030333330 -38393738313633373863386632383138666339666461633239326364653865373039346235323666 -33346530353564353865616265646238313565363439646364646362663435323861616363383761 -33396133623639623337636439313037613962363035663631396661343765356663336138623434 -6333 +39633161663666306431656635386139633861376339613338353533336464383833646465303865 +6635393037373136333664303963393736343639653534610a393434623066363230326331303731 +34656562323861663062663266363838633330323363343333356239303833333633303639663833 +3964653130666165340a323238636337373261653530313763306361376233326239656437666364 +62313333306631386266646637633635363036306336613964313530373634306330626233633063 +39643737303938643035316563643635383039343962303137343636383732663161343366666238 +62373435396533353466373139356432303634393161663835633937636662633264313964343136 +32383532643236373937616466303432623833336635656135616166333936333463366533373738 +64346135373539353665333531363832373564303838333935656332346230333130663132633661 +33383137346266373534346433306534376432333566316563643766373762336633613830663730 +36636162373731303462303162353535383031383631323030653161616537326465613463623533 +63623466623665633238626530613331383863656433333832336339323034633736643465663363 +36663432653739306439346263303366363836616539646663643833626634653435656530653431 +65363539383962316430303932373762616132383664353364636635656565373932316634643661 +62643562626433383838373564393164616238316139666166333831386361346539343730363438 +63633733313063313037393733656665303438663335633766396566393038313039336132613735 +61653636356238336637336263643463333531633461626139343530353632343365336433343666 +33356162626161636336626336623866393033393963663864306537326239393665333630653063 +38666636333633386534666332396631376234613463383031663935373431306437366564636634 +62646131666161373439316135373162656161663730306261643337393537626631326631346363 +32386562366263393764623233306464353733383565316335313337366164623739623064616464 +36356535313736636263336563623065356562663261623332383830313934613439343935313565 +65326239343230363037383036383939383233356631333963623634663238646561663664636663 +35626636313762356164323161393834646566623835666663326438383332373030306332393430 +63356537663966633833366437306131663435643334666366333835663164326136393434316631 +61376461336535393333663364323935316165333764613434623763333534626633386635613338 +35373665646238623532323136633932643465616363623135366431376235333463623336636433 +32623237353730333661356535366164363735623237636663353965626462303932316162303133 +65396237646538386136383933613366656134336437343531386135336539353737653734326431 +36393131353339306531363436373462616231613037323737636233626535333134666532343830 +32633161363337663764373437323835366361376361393636353439353736613735386339353632 +63653432323433346332386464363062343766626638623863613833633732393338316437633064 +66396631376237323536373036346333386565363032343862623035333833373631663931356632 +34326139656231373431326337663663643338616235343234363963636438366138393138333866 +64396564666432636439386131333539323739366337633862633035663365346134376132656565 +38623139383766356533333863353034353630353037353664663762336130376662643661393038 +33623933383334373535373562666337323036626135316439333134373161383830636634366638 +33613665363737343339656561643861336437303230386530353536353839386564343836656131 +63366561633737343736353561653330323331393533333238373232376463306461366238643036 +36313835363432373233626633663562306363363434656164616237383664333733323434333765 +64373638383539316131626131336431663337653366653530346338333336373162313730663461 +32653534333932303437653332363536386563623765643563643539613136383135313833373036 +33653233666538636337393265396338393735306332656261636131643164613438613631323531 +38386565363866653237323130363062316133386331333038386332303130383235616234373663 +33333464326563613432653461633834313730653534646466346565336365633733393663356238 +65306237633034613139316135653435323162613835386535366533393234653963353764393830 +66373231313236633830346165616532623861643762363137343831343031353238383866633234 +32333135346135313166653838616334346131393732626334643662326535366634343664383632 +34333034383362366362663765643630623139396534393739316639303739613837323538376666 +65383666373131323337363236343132663232343137356235376230303536323365383165306164 +64363161666366356533386337383830613963666530313264353639323865363936656630303166 +37313861376336363364313638376562613064656632383932346436633461633734303861316139 +37366435636236633039633134343339313433313765653335656165366566653638343361363566 +34346333303931346664646361363532623261323233633131636231323164616636613533313537 +63366630396265353232623436623166633662393037356262623331303233383437316361356134 +30313436633335393135326633653265333432366639333338326539643137326533393637623633 +30323332356363656439393933376562363139303735353765623030643936663437326330376431 +37393936613534313033353465343033346333356634343335656538383065373336353632663161 +30613534383133346338366634343436663862386464633864646336323030373231636464323036 +39633861636236326632373132633439373831343734613936666639613336356639306231643361 +37633864313166396632396564623063383332343634386334366532626637346263306665353833 +62313233356432326561343766303833626433363131323931386666343337633732626339636164 +33636636666630326639356134363633636465623139663562383761613235633764366634656664 +39353935643832333463646238383761383061393938303134353863346161323937623562386161 +35663861353562303063653635636231346235613731346439313664666639363632316131663966 +36383763373431666163303634343631356263393533656231383032653831393432373365626130 +63386334363735376238616664653538376134353839663535393031633131363333623062346136 +63316131653861613362633633363632633834386662316438313962326539653264623033346663 +39663266313333326137393663383563383936366465656333663561643831666265353637623739 +32393238663731383664323432656365613433623761393733353538316466666166646439343637 +62393533376264356135313036646432323731366362333661326437316234396533353737626532 +62333961626130633663393136313466336163393163383464643336366365376334343766353635 +64666239663532616336363035346437376362633661636566386566396430663965626566356663 +61653362336234363736646536623034633731313337366639316135346665363866626561656138 +38343166316265633935366263636137613238653038656439636663663934363363353034323661 +35333730303830343738663135653637376239633232333363373237643437363135323532633462 +62613363386563306430393237623566623264333936623132313364333539653038666262303865 +63386165366364383364343039306666616261323562663733653732656665616361623838313538 +64376664343133353433636235643365333262656539613861353030646364376461313531316132 +32613530393734313065383832313765623734633339643333396133306663653333363731356237 +31326234383339386235623538316366363262393833656634316432663932303263366537373464 +62646337366334616466316636386462376335323031373339336139343334366131653539616461 +62383139613236353361373961363265373933393139363765323733356436386265303131643265 +33346536353239363430343664353132653864333236383034333462633139343133353864656138 +39626263663536633266623161336365663335343230333364633664353939333763356537303738 +35623336626232356265363534613438306662386364356233626261313634323466663766353438 +38636632373237663132636263326364653265336366326530323331666363646361386564343434 +61646561386264363062363934306330323631343530323932616363373830323037373265313032 +39356365663061656137643732303436666536653063353432393736653038306630333239643434 +30353962313432343935353062343530663161636632653062316536366165323235663661393133 +65366334363062323063333461343138326363376236363037333965373931396261356561373238 +61616134383232306364303461383466393631626565323530633034353766653033313865326665 +61346433353435666236303333656464643734326566643262633464376431313430646263393263 +36343335323730643166633664613833376131643539383135373466343530306262326364653361 +65643365623936646530613062393261643361663839653664336631646435316634336638666466 +39333632626532613830373931316664613431363764346330663761616338346464353239613364 +35363937643239623963323631343136323533353362383439383438636561666663356237613132 +63646536366435656362383033316133626266666663633265383336623730646336636633623238 +39633231323261646630376337336664376566316162346135303963336431623431663061636537 +61643837396364313464663633613935636231393636623763616162323263316134623362633035 +66373466353335633463316562646363653738643235613632323233316437313038383463353861 +38636633333038363735313037363433363964363630366663396166386465666661333763656664 +62376462366264363132323330663838323337373166616336303738373033353836653731323064 +34623965646236613131353831383765336564343834336538373630386533393735646330623036 +36643633396433323565613265393336663137643965383463656564366230613332383635326233 +37636531333563626131643132386666336631653766623131663337373163633865663766323065 +30386139343836396137326632333661663039336433663965623036666662653437383531643632 +36316665303231333933323535356335636434646164336538353832373561366630386666666134 +34393734306230616634366633623438306663363530346262306337313864363937346461363664 +30306132653763663566313130393736646133313733316262393461626563323162363732373661 +303066396331643535393634313030663634 diff --git a/provider.tf b/provider.tf index 5345342..553987b 100644 --- a/provider.tf +++ b/provider.tf @@ -4,8 +4,6 @@ terraform { - #required_version = "= 0.13.0" - required_providers { proxmox = { source = "Telmate/proxmox" diff --git a/roles/lib/setup-netbird.yml b/roles/lib/setup-netbird.yml index 23e0ec3..b6d2a13 100644 --- a/roles/lib/setup-netbird.yml +++ b/roles/lib/setup-netbird.yml @@ -26,9 +26,30 @@ state: present update_cache: yes - - name: Enable netbird service systemd: name: netbird - state: start - enabled: yes \ No newline at end of file + state: started + enabled: yes + + - name: Check NetBird service status + service_facts: + services: + - Netbird + register: netbird_status + + - name: Display status + retries: 5 + delay: 10 + debug: + var: netbird_status.ansible_facts.services.Netbird.state + failed_when: netbird_status.ansible_facts.services.Netbird.state != "running" + + - name: Check NetBird status + ansible.builtin.command: netbird status + register: netbird_status + ignore_errors: yes + + - name: Start NetBird if needed + ansible.builtin.command: netbird up --management-url https://api.netbird.io --setup-key "{{ netbird_setup_key }}" + when: "'Daemon status: NeedsLogin' in netbird_status.stdout" \ No newline at end of file