sync all
This commit is contained in:
@@ -7,11 +7,11 @@ proxmox_password: "{{ vault_proxmox_root_password }}"
|
||||
proxmox_host: "main-street-usa"
|
||||
|
||||
# DNS variables
|
||||
dns_server: "infra01" # .int.mk-labs.cloud"
|
||||
dns_admin: "admin"
|
||||
dns_server: "monorail" # .local.mk-labs.cloud"
|
||||
#dns_admin: "admin"
|
||||
base_domain: "local.mk-labs.cloud"
|
||||
# DHCP server
|
||||
dhcp_server: "matchbox"
|
||||
#dhcp_server: "matchbox"
|
||||
|
||||
# Terraform variables
|
||||
terraform_server: "infra01"
|
||||
|
||||
@@ -1,155 +1,162 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
33636666323832646139323162666263383232643233633539303464363730636163343162663930
|
||||
6132323032626433306635626239643764653966316262650a316366343264303835633063613961
|
||||
38386666623865633236616364303864663133396562313664313030393435613065636265383333
|
||||
6366643932666265610a373331363731343531363763626337313664633933383163363635336136
|
||||
35376131363764616139333734623930373233653961383535623861373361643433313761623663
|
||||
32633836333063313630633936346366306637323638326337376630646435306163366262373037
|
||||
66613765633463333934373264633332333532376461313137333133356333313964663233313632
|
||||
35396630396135643761336237636463313233623064316233666237343562343936346530393230
|
||||
66616638316665353232353738616532393638396364313433646134373336313631396633313731
|
||||
32363361366563643039383735643132643465326331613564306261376332656136656438313738
|
||||
33316432633231313837376238396538666562323662393634393661643966393262323238363639
|
||||
66366564356431653664633663366564303561313134653866396134386561396635343230643331
|
||||
38346661333436356237323136306238636337396266363265393865363535636164633036613730
|
||||
30386637363834633934343839323238366639383964646531393862363363626538303035343938
|
||||
38323166653835343961653664666432616162386532353563346663373536613233623035643431
|
||||
35323136643236366463646365343266383937643062363232336435616134666338646361383864
|
||||
37393633313531643064643336646161323930363032356630313438396134646361373466396533
|
||||
33653335316162373832336665353334613031316436393664343963316330333062633737636264
|
||||
63343766666639626235623535316432373431363931623432643566366130303166353866376464
|
||||
38313332613333656236333832363136323563633966386666323666396536336637373562383962
|
||||
31643966383465356464306530623437663139633761316161313532656662616139323461636133
|
||||
39336534366632363935386236353336656239363131313333653966633561396230613665613261
|
||||
35383735323237323838366637313765623132346230393633653063613034373263353866613734
|
||||
39316431306430316536346334623563653762333030656632336537363562666265316633373836
|
||||
33383766363361616663376630356561323565316531623138356135353139616465663138373634
|
||||
31326539626331383839343332653230653337393031353934663634386133616437633834383437
|
||||
61663561353837353831363931663434363137326264613465366438323763303465366238643233
|
||||
37646337323363333166643366363434366336383736623561616665613232643438356432626363
|
||||
35616162663730636163383233633263626435626331343635663130303633643538373136653936
|
||||
65323731316464326364343061353561623535653530623636396165343134393865666133356466
|
||||
37643137306235663635643166363364323135613736363261393739376531363863653136313133
|
||||
30306566346533343963386432396431393738396531373862316461633765353766646533326461
|
||||
36316430326430353333306261353633343035383139303866656431626364646636656131363332
|
||||
31396635663362373731313265643336626266306333336130323761383262333032626662346666
|
||||
62356635393032393837356166306335326462393365346639623237346438353637323038613834
|
||||
64633439633237666131646664326531343836393538376237363338626634336431663561353663
|
||||
35343837366263353635396538626262653930653961393166646261393763643135386630653666
|
||||
34373464663065656365336536666631663831363832333136653065626436356266633735663834
|
||||
32343133623835353062353733663530323138666232633961393365393563326462653164633266
|
||||
32353839393635616661646133356538373938613232303837326439623839333637313138666535
|
||||
38316161633365376438616261663463386334633436353530663965376432313834396638306237
|
||||
36613665383965636533353532396566343661633763363638343064393031653230393037666166
|
||||
30613039376365666236366263623361643266633236336633386438663938663938656565316136
|
||||
36656237376366616163623334316130383363393834643033363338343362313863313638383433
|
||||
63313264336632316663306665653630376266656233353439646637356365353063613961376231
|
||||
61643137623365393132353462386134333430663466666165613937333964373230396535393134
|
||||
30396134616463656464343637656562646165396635353066646633373832356261626634366138
|
||||
62326138343435666662396630363136393634306335653063396134383731383165663432373131
|
||||
34326363643037326465326435616164393033363565366135313133393866396136356137663139
|
||||
66316138663732393430633338346136353738626534633164623830663734343337636562316538
|
||||
61323566326434643036363866363263616435356466303464653131633937353233376539616465
|
||||
36303738343262373761326538616632393761383662656231336434383334333735613264393662
|
||||
37653336336666333765663434393765313664316332643030333464376566306666323833663036
|
||||
62653964643532306436626261363161633937323835663036343133353065313866373639313633
|
||||
31663635376266653639626365383430346666363262666638323564353661386137313865653337
|
||||
62306530383332343931653137353139363236393137613437663333633664653230306264316432
|
||||
61353132656564383437386237323765393034393237376531343331623966343636626534616232
|
||||
61613538396636633737643331663333336666313966633739633936333535376264346231363939
|
||||
39353133396562623466646237303639313665613863633531396235306166333936373733396532
|
||||
32663737363765663638633739336438613663363430386338373361306636313366356135363362
|
||||
62316666356331623965333930336566393032386364336266636338323337353661653638663663
|
||||
38623463353061663134313265323530346266636665373833653461353237366135623832643732
|
||||
65613231646431373537636663386237613435373734633763306434393133653133333830626365
|
||||
62376166316639366161616635616234316234383230376539616337656637663332306136333662
|
||||
35396166303166373163383836303963343434343735383665376533613532363331613437656164
|
||||
38386336653361633866623136666131356537303038343061313034623761656234396266306233
|
||||
33616338393662303737643932653738303438393335623162363732363339363231396432343361
|
||||
30646539306332333639343737326366653433386363373033363562353535623431316363363736
|
||||
64663863653664366136643234626261653039393031363161333337643166366634303631633261
|
||||
30323866643266333132326564376263333434343565343738613632393838346331616165663766
|
||||
32343735316334653136393838363763333939646261646333633030383932373461373266346134
|
||||
36306336346339646639326333353531393563323265303936663036653334333065313033613936
|
||||
63643036336562346261316434646539333163323233393638636165383935633535366637623431
|
||||
34373731306436613964646138353539393231633336373937613165636535613731353830616535
|
||||
63326632303662323433656133626266613566663730386532393431333862656239646633663663
|
||||
66353363663135613761616136326134633538373661396666643832376137346132666232623939
|
||||
66323139623332393834633532396230666463656637336634356365363731633061646631326434
|
||||
39353134303932313134313836653163383566653832643435653166396533353062373537616234
|
||||
31316432623439303261353333643130653562366666306239633139313939303330346130663637
|
||||
30656238626131343131363530306431336366303735653532666231656531343230306232393130
|
||||
30343537343064626531343530373435373561623231336539373331316231366461616464383461
|
||||
37326139633636656632663362613530636436323832613633336339346634616239386363363964
|
||||
61383538636433316133323263326265313661646439393162393735313036363361653638353665
|
||||
62326565343431343962316339653237613735643934363661326534643663383666343165653937
|
||||
66633863666537663366653565386335663663353863666632316334306562656666666532326666
|
||||
36376435373530303530666535356435663735353233633561306564326231653563663862303137
|
||||
61616432366566333733333765356561613538383836363338386435373561626133303938353735
|
||||
39333236346135343930393930353433393136613537383736356661383133623334636263383130
|
||||
32626431333532326238373466663732346331393463643936343635303837623531356334383031
|
||||
36326364333266633938386330623833356662373634363865306162666639613537376130363534
|
||||
33393566356137353539633932643065313733633838336531306433633063306635616163363064
|
||||
35646436646633373834343561383237633131643233326133663835383838616162333831363766
|
||||
38376265333835373836343964633366623561386565623734373661333238646630326439643539
|
||||
65306366333863636634623763356534323132346566393733633564643966663962653236363933
|
||||
61336233383133616138303661623764303865313230366162653066623737383261363633623339
|
||||
30666230343830323634363465313132623132336436346138386266383364363131613433646435
|
||||
38333332326363326262353234376434656231336136366430303434303032623238633362343330
|
||||
37333935626264353637666666316564653966376365373464616563353861343166316165303563
|
||||
39653763393131356661386634653237633130663533356234656465356533343963653330356137
|
||||
35353763373363313061653637333166323834333033653332316432623938393966303632383065
|
||||
63656237616231636564386438333564613935313835326536383064656464363261643164623863
|
||||
64356435626539623230323132333364386362323533303961396337336438353264643265626464
|
||||
66666266613036613835313130646638613532373062663132326162396636623931363734613262
|
||||
39396232646235666130386334633665643833326138663534376562393936616264623161626164
|
||||
62663361336466636436383663663132356161393462373263373132633835663730346231396166
|
||||
33363738343531653636313236666231393538653934613639383366386136386133623937626337
|
||||
61373333366630396162656138343537363338326239373938376465376538666236313932373364
|
||||
34333165393331313331393736623362366637383231666664383133323135646163306639396162
|
||||
62353366343839666333376530326334303936666139383936363462393566653732353431656530
|
||||
33336237666535646565383731333966626632383661653666316339623631373532383937643932
|
||||
65373535626537393632333366613530393265323763316533386335343737313462343562333338
|
||||
30663130623633376465333665333738653566656237323563653230653130653938373966626635
|
||||
34356432303938613231316663326662333733363036333265393233343862356233383961323464
|
||||
30346162383137373735646336343463376534383235626233306538373463366264393130663066
|
||||
32333236313531613238396136343538343439343062353266643838363136343433623837313631
|
||||
64313865383762396231643265613839643539306137363834373165313832633631373234626439
|
||||
61333533383236333432613564643431613039366661663262626330376133616331363037343838
|
||||
34336365663730356433613734393639333139323436316635656539626261326336343039666262
|
||||
61653766363430383037326532323834373663346563393766313335383531323537626537643335
|
||||
32373034636461353635643731346239333634353361326237303134666632383266303166363932
|
||||
39653734636137393635343131383766356136383965336536343039613266373738393737643564
|
||||
66353766666633626261653863363331386534663965333130353764396263323536316162643730
|
||||
36386162613537626164386335363737613361653831376265623939633362343065626633363363
|
||||
35323166663634373563396234663263363064363930656434323864616463613233666632363635
|
||||
37623565646131633433386633376230643332626564333565373362363561656366393931366231
|
||||
38356131343837663031366133666263633330656339633237376362323765373064323236653264
|
||||
36333163393565393138306435353839343062356530633966633235656531616363313432636163
|
||||
33323934323731323338383230393465646664396535353535336130363864306631353164373238
|
||||
35383637653161356233306165363564636130613538663363653134643439393931393266323564
|
||||
37336534353836656462393339623333363132663539313665626462303866316463626330373733
|
||||
31363636363038636661373062383762323335326163353634643237393563303139643034636532
|
||||
30643836306262393335376461333762346439646433643037393438353339653730393830383935
|
||||
61326333643862333365636535396433313235666433333563656330663763353833326630356164
|
||||
65346636393061653039643436353763343839326131383534663137313637313265666431666461
|
||||
38656634633731303036376537313465393234616436353566396338393534613935656561666133
|
||||
33613936336530303763616664323433656362643334343061333563656634313864633032616366
|
||||
62363133336138613366313135643633643135613963303466633330303633626435373632303938
|
||||
62613332353033396636333365346439373539343037313065333733613962343737336531636537
|
||||
36646233623463343530346162346230343037323366363730376532326633323334663765323762
|
||||
66616138313434623032623437343438343530363132613564353532363235643962306162643035
|
||||
33633234613336386234653036333462336539356530393032303662323032616536323264363862
|
||||
37626437353232393335373765333732616532383333373438623439393932613330373264393731
|
||||
62633936303436656661303130336363633637666531343263373633663334386434393762633732
|
||||
36333430653037643339363330376163396132343830396161643864376436393964646264636239
|
||||
33623733303163316137616533646462633866343932656539383363333631316338653239343734
|
||||
32666130633238313763313437643038616430363566313337363465353335353630333362373265
|
||||
38363338383261663636366233346262333431393766613236383830393662363033326535376137
|
||||
64666338343630373066663363393939383436623535663362656637323833363061313936343831
|
||||
36353166666239303032666466333662613935393634663534646534313766316533666539626636
|
||||
64353063373539363136303731313130343439643562623433636630616238343339346362383036
|
||||
30353031353366343332613461623837353736316665316234643235366661626464386534353332
|
||||
30313662313665343138656430353562343366626130383639663964396633343865613333363233
|
||||
65303831343537393834663930303164653164376466336562333633623039613734663132333665
|
||||
6636323466636239373237353264623363383330623932373133
|
||||
35616466656362396235346561343838343634666539663537353635316361353566383531623266
|
||||
3934346664633933666162376430626165626132376637630a356261613130306538633933653931
|
||||
34383032376664306663353836356165373861383932333737336633366362373962663533366235
|
||||
6663393939396563660a373031353531646165336239656534613330663266666361613834326532
|
||||
64313632643565666139303464356339383834303262323933326133663163386465323431633332
|
||||
38616266353430316133313135643164366464346134316462343536636532323432356362623366
|
||||
63383331663535663739386338376561383962316462613432323938373437646136613564393464
|
||||
64633530633635633634366135353730343037306437383861363230333036396164656637373864
|
||||
39383963623865303630376437663861303935363234383539323263303031373865386539346431
|
||||
64323335663134333738653732613761353938373830376261353737613865653537326561303964
|
||||
34613134323963663362303235613962303966323163316535386139366161363831656638383665
|
||||
31376561303733393464303039636565393537616363333431633863356135353038346562323930
|
||||
35376462623632633632303533313138373630393331616239656365626164613166663837373938
|
||||
37393064323761303434333265323039356265356532636133383362656634313431333262633566
|
||||
31363439656433333562316636636431326564346633623862383463613735396563343164326339
|
||||
39356337623264353363336538646366356631303438353236656234383836356363303436393137
|
||||
32633665636266623035616264393463363036373530386431653536306431366234353936373464
|
||||
64666133303734636135616636393165373530663031396139636561306336366636663335363139
|
||||
65356130666164353564343733623337393137326463306333323338386536333363313337363234
|
||||
39383666336535386331316162326264343966646562303030363766623936616263646364316432
|
||||
31326138323031356235316366313361353235346132383965623431353364623331326162663437
|
||||
37373630323232343662376437653337663166663562343066623363343064336230373964326132
|
||||
64383965626533663036616261303039663838623030396633393730336334373236366638633339
|
||||
61613561626664383063373530393130376539316637363964316532313034313065353530373761
|
||||
30386338386333323633333961636434316330613065643662356131623536323865393933326537
|
||||
61633231636638396164373635313434376533613334346238396462656334363036643235333839
|
||||
36643962353662373439366236333363343432643666363561633931323564316664316538363733
|
||||
30326632393638313665643562616230373335363831656136633633343234336465616361363537
|
||||
35623666303636303837623430373832663532323430383330313530646636316535336434613466
|
||||
35373666363665643536363863663161653330646462633239623466346265376231653363393366
|
||||
61343233326638386633343135316563653234336538613939623938366164326561323861373166
|
||||
39323462646530333737663039336530656534333332616661373037636336346137643861613930
|
||||
35613066346262346232643362373835333337626361316339636564663235323939633234363866
|
||||
38616662623665373139323031343462393135653463306333373665666431613264666661643434
|
||||
33393666633464636562393335323064636332656336373661353461323830386166656231383639
|
||||
33373631396439313265383063613638643633343861323733306335366163653332373865663863
|
||||
61653532643838636137353031323663613933656462333364656331373763323366316339653038
|
||||
36323831643566323039653566643635303232313137653130393165613633343364646366366532
|
||||
31386565366438613866346263653166343934323863303839303531346363663234343265393162
|
||||
31613936333138616237393065656430303436653466613632633335613136616534396434653235
|
||||
66373834363764333366343933333362363138303663333932643531363863313136633630343063
|
||||
36326336313733636564356235303664336131653639393964383132663230613264626131353037
|
||||
36363866636238353430396461616530356435386265393864343164613434376139333038336339
|
||||
35313964336462626365343135656466316562613935353431326332313461663937326338393536
|
||||
61663732313464383734323664663566313732323536666237653662393738333835613831623434
|
||||
38306430616333356436633330626537356265343936343764633638393262356266313130623632
|
||||
31616131356461656636396539636134616138306239653232613166333765326364666165623334
|
||||
62663533313064396635333830616362303332643163646138393761366139626363346537333235
|
||||
61616130366334366437633039343533626664343538396638633833336136336662643937366636
|
||||
66356665623361386362643237646464326566323865343437336130353031373663643132333630
|
||||
65656461643733643534363362336364613164383266393136343830663037313365343632363934
|
||||
32386335303638313734623633323564373163666465336563653934346435353766303331333032
|
||||
34303037626266366638663435663532633232343361306636303166373437376439653437626537
|
||||
65373532386332366530616537363334383362653434333162323533376165376533353263396338
|
||||
31653338383363316537366334613137666365646237303235303731633362383536353564663535
|
||||
65653864396465333438323532363731643431373666633830316566343537633337366465376138
|
||||
35663139303761383935316261636461353936653966303738313130626130613130326332386137
|
||||
38326464356637333933316264663032303161643034303363326665373163656238663364643233
|
||||
61373461393330316366373135383532323436313535333535623338353332346364613262616539
|
||||
32383866636233313461323466336538613165316565646431633632353331383237303437306636
|
||||
35653566386437333536656630323761636262333333396563303264653166656663636264633933
|
||||
65343435373038366163386464353562303161613162633330633630306566646430613736396266
|
||||
38396432646637623837356662626639623361356163346564353238353263363434326465306637
|
||||
62343464623365633133633539383933313633333664316438313830346335326161393138333139
|
||||
32363237343133386436396537333639623537656362643134356566326439353237313939376637
|
||||
35336134383035396637383637356536353064636163333639393763616538313264373930366563
|
||||
32333933373466336465643030663765373164363732656231626261336665633238623830313163
|
||||
62343438303936383738303737363338333864666135356336313964626131653663393933653130
|
||||
33313435653364623531323038393962616432636265666437356365323963636431613136633463
|
||||
64376235393462633162386366666266353234383936306637663136383830663438636637376532
|
||||
61313134623233626230653931653131356265353836303064326563303936363734656166386133
|
||||
38303230366562376566376337376164373335303566386638613839353637323563366463396661
|
||||
31623134666231316337373539356332616136663761303834373831663433316339363630396131
|
||||
64303066643063666165326439633133383966663265653133346635636634313135636463343835
|
||||
36383733383561626239363561653034373636373134633934376437316231323433623733393537
|
||||
32323330366262383463316564373930663634363231636635353137636330393630333930653439
|
||||
38663066613139343761353164636537356331656534613637356463633561336663393033333331
|
||||
38636436646162343630393431316664303738373834326165666366396330316366663838376133
|
||||
61386631646338653761646432613432383763326537393136616662633135323336643330663938
|
||||
65373234336136643462363939653734613464393830333566643764313834363836356531386363
|
||||
39386536323864373863666135633039653966333531633030633362343938313138373764643865
|
||||
31353437363830633363623861643164333631343431663832663564613161363165373561383533
|
||||
65373234356337373732303038393364326430646131653536646536393139326138373533663761
|
||||
34626464663563396631393565626431363066303632306561316336373737313937396563396534
|
||||
65366337353232616361323963303263343235383432323261373564356261663632623836313266
|
||||
34326163363562343064623265373562316432663839303662613661616265386263336462633163
|
||||
63643264303062643264396362353864306562323364323361366463333061366439373339363262
|
||||
35353331393265316631323039623334616638356439346335333864616132363562373334323039
|
||||
38363161613261363562623032383263303930383538653365393864663266306130613638333131
|
||||
32666135643831666531343266386365663563393639656635306338366431313563616632653739
|
||||
61643263616530383466656265316630386537356438653063643832373464376162643831323836
|
||||
38376338326239326632616262356366396538656666393365383366393237633361333536326434
|
||||
31366538396337306632663937343064383836653831383538353037343366393534386437643530
|
||||
30356237393739353437323438623664376338323865656439313231313062313766383363616530
|
||||
30336363633437643539663037666331346335373639633539613466666231653131316535326439
|
||||
32353066393064636262633166643832653938633432633762376435616466336363643131383532
|
||||
62353337336133666530383865326537623932373163643131353034623964396462633936613630
|
||||
30353566316531313135353965353130646463343539303031353130633536613835383565643932
|
||||
33383236656433363762653663383961613164633533303061386334656165366337386235656632
|
||||
36353537383635633631323161636535643733313366613435313632373230326337616165323838
|
||||
63383038396663303230666337333264613762393066336134653063663562313130303966643238
|
||||
37336431666265643231376139386138306261636638616466366461373666393531316139373564
|
||||
61363631633866396531653336363365656236613266373933376535656565623461653465346333
|
||||
62376566343530366466613536393938343263303437383334373863626138383764656561333662
|
||||
37613764353639653838633533316462653165663037376134613730323661383364343438353035
|
||||
39363634623034633263383063653437613339313762333234643062613035373264326233383935
|
||||
66643134373735383135353763306165303063383161313135343435386163356466656163636366
|
||||
35323037303562633863346138616530333932313633343162666662333930663535633661633934
|
||||
36376637396532313265323066626637333061353165633036333739663632346337643137343165
|
||||
34653561303864613335396233626130363436353764666365356230316534316365613436323639
|
||||
32613662353438333362363565346432303333356361653065303236626133353961343834333661
|
||||
31633238666165633561303639626630323235346635356264323934353034316361636331333461
|
||||
35356138616332656161343434653638653861373962386436323061356263353064613934656663
|
||||
34653062383434666462623732386337393038313339626463376631623336666133633663643835
|
||||
31613438376431613862333564396330346635656231333835383433343832613663643163396334
|
||||
35653739386264326530393261633864656462636264663832303537333833373037323039373731
|
||||
65393837656234383530353335343730353535393561346137313436383966396632326437343562
|
||||
31316237396336666233656637383461303737363565356136396336393864383238396164333163
|
||||
32646238303430626261646236306664396533313136623764303962333836623933666562663439
|
||||
35666465613738326165626365343734623131356238616162386233376333663764363038636635
|
||||
63643531323164323634316130326265623966323033356338663261636136373035303665346537
|
||||
64663065373366636637303237333666396266636535326563653130613237363833626365623331
|
||||
66363264353831343264306336313532646637343631656230393466396633336639356431313839
|
||||
39643630626462616336333166333062373231613039313661646231393834386561373431643561
|
||||
64313933636430343132613263663936313732343233646631616163366633386164653763313333
|
||||
62383563303434303830363338666465306463643262623637363939623136366639306330636331
|
||||
33633462643234656636656634663664616338636332393231343932383363643331396635303466
|
||||
31353935626461396431626336343466623163323730656131313432313635366365653063623537
|
||||
61306466393938636261363032353330353134383430363164353230323630363864393234356238
|
||||
32333865663063353566663038316633666464636433626236343632643864656635373833386338
|
||||
61366136303863343430393661653738626331343366333965616135663339633334623762373266
|
||||
36383564663337353935626534366365626238306232633534326266656333613664643736356637
|
||||
64323030626361356338356165326336626365636666343131306236366630653534376333373037
|
||||
35623062653032666431643936393337623830646134653034336139363863373931653132663165
|
||||
65333536343535343463373662373937663133616437636137373632373332323632363465613663
|
||||
36326636666435353062383433373562643464376365623530663836356663336338346565386535
|
||||
35643136396130326634386632333739663632616538356434376336393664396332623562356164
|
||||
39636262323563313862303266663035346132323765613732316434353631383234323036323630
|
||||
34336165306436633434306333313534333238623963306338616363303632613934393732653962
|
||||
38323331396664336163346236396536333361376431313461383032363733316133343437376637
|
||||
30376230366666346363383235333836616539626465636539616131373437336332633633316437
|
||||
31626538326137656262633332623631643737656632653036376432653333643031663266316338
|
||||
38353734343761656533383133386634343331383338343333363438386231393332653330303631
|
||||
30643363346538393532373533376537313831633764366566373539346337623135323161323039
|
||||
36326139306364326663353233343133356165326362666535336138653663613131363835376533
|
||||
30366566613265346232323062636435373733646461646639306539323762613932313166666331
|
||||
37643431363961643832336464646433656664613137303062613037346335323230626464383461
|
||||
61363535616266626364333633333061633234646638383335616232373166346233306139363239
|
||||
62373363343836623162313638383434363530343134666666346630363630643633616639356231
|
||||
35336365376437353935353630333835633033306235653964656163613166643136363165396263
|
||||
35333732373665346362336333356538313161633032653931393465306430396536333735383237
|
||||
62313361616530623630653762613430393837366431656139393437643837623135333666393231
|
||||
31323566663366376666663362656630366135633336323462643936343433613938316432653638
|
||||
64343637383039373265643963653037343530386465363936343438346538633266663762366536
|
||||
39393732653637343166336663323363653131653035376464643934353963353935386364376336
|
||||
35633533346632396237346534303665383365633565663939623438343463613938633863323864
|
||||
36633538643830373964373864323235393865366364303166653739376563616364303936623733
|
||||
32333935313537643231653232643463303634366366386534363562333635623730316638346661
|
||||
37663936366330666463623263326134353331613661363863383361643965316635353663396639
|
||||
38323538333165623666333933393966343763323536663163383133663362383665616237633239
|
||||
6665
|
||||
|
||||
@@ -13,19 +13,27 @@ proxmox_clone_node: "fantasyland"
|
||||
|
||||
# Templates are named in the following format (all lower case): <OS Distribution>-<OS Version>-<VM Size>
|
||||
# Current OS offerings are:
|
||||
# - Fedora (42)
|
||||
# - Ubuntu
|
||||
# - 24.04
|
||||
# - Fedora
|
||||
# - 42
|
||||
|
||||
vm_os_distribution: "ubuntu"
|
||||
vm_os_version: "24.04"
|
||||
|
||||
# Current VM sizes are:
|
||||
# - Small: 2 cores, 2GB memory, 8 GiB virtual disk
|
||||
# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk
|
||||
# - Large: 4 cores, 4GB memory, 32 GiB virtual disk
|
||||
# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk
|
||||
# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk
|
||||
# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk
|
||||
|
||||
vm_clone_source: "fedora-42-large-plus"
|
||||
vm_size: "large-plus"
|
||||
|
||||
# Proxmox storage target.
|
||||
|
||||
vm_storage: "mk-general"
|
||||
vm_storage: "general"
|
||||
|
||||
# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups
|
||||
# and backup groups. (ha_group will be factored out in the next functionality update.)
|
||||
@@ -37,6 +45,7 @@ proxmox_host_target: "pve03"
|
||||
# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address.
|
||||
|
||||
ip_address: 10.1.71.52
|
||||
vm_mac_address: 'BC:24:11:11:BC:58'
|
||||
|
||||
# Software
|
||||
# Future enhancement will allow specification of additional software to automatically deploy to
|
||||
@@ -45,5 +54,5 @@ ip_address: 10.1.71.52
|
||||
#terraform_version: "1.11.3"
|
||||
|
||||
# ---
|
||||
|
||||
vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}"
|
||||
hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn
|
||||
|
||||
@@ -13,19 +13,27 @@ proxmox_clone_node: "fantasyland"
|
||||
|
||||
# Templates are named in the following format (all lower case): <OS Distribution>-<OS Version>-<VM Size>
|
||||
# Current OS offerings are:
|
||||
# - Fedora (42)
|
||||
# - Ubuntu
|
||||
# - 24.04
|
||||
# - Fedora
|
||||
# - 42
|
||||
|
||||
vm_os_distribution: "ubuntu"
|
||||
vm_os_version: "24.04"
|
||||
|
||||
# Current VM sizes are:
|
||||
# - Small: 2 cores, 2GB memory, 8 GiB virtual disk
|
||||
# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk
|
||||
# - Large: 4 cores, 4GB memory, 32 GiB virtual disk
|
||||
# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk
|
||||
# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk
|
||||
# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk
|
||||
|
||||
vm_clone_source: "fedora-42-xlarge"
|
||||
vm_size: "xlarge"
|
||||
|
||||
# Proxmox storage target.
|
||||
|
||||
vm_storage: "mk-general"
|
||||
vm_storage: "general"
|
||||
|
||||
# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups
|
||||
# and backup groups. (ha_group will be factored out in the next functionality update.)
|
||||
@@ -37,6 +45,7 @@ proxmox_host_target: "pve03"
|
||||
# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address.
|
||||
|
||||
ip_address: 10.1.71.61
|
||||
vm_mac_address: 'BC:24:11:C9:3A:13'
|
||||
|
||||
# Software
|
||||
# Future enhancement will allow specification of additional software to automatically deploy to
|
||||
@@ -46,4 +55,6 @@ ip_address: 10.1.71.61
|
||||
|
||||
# ---
|
||||
|
||||
|
||||
vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}"
|
||||
hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn
|
||||
|
||||
@@ -13,19 +13,27 @@ proxmox_clone_node: "fantasyland"
|
||||
|
||||
# Templates are named in the following format (all lower case): <OS Distribution>-<OS Version>-<VM Size>
|
||||
# Current OS offerings are:
|
||||
# - Fedora (42)
|
||||
# - Ubuntu
|
||||
# - 24.04
|
||||
# - Fedora
|
||||
# - 42
|
||||
|
||||
vm_os_distribution: "ubuntu"
|
||||
vm_os_version: "24.04"
|
||||
|
||||
# Current VM sizes are:
|
||||
# - Small: 2 cores, 2GB memory, 8 GiB virtual disk
|
||||
# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk
|
||||
# - Large: 4 cores, 4GB memory, 32 GiB virtual disk
|
||||
# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk
|
||||
# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk
|
||||
# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk
|
||||
|
||||
vm_clone_source: "fedora-42-xlarge"
|
||||
vm_size: "xlarge"
|
||||
|
||||
# Proxmox storage target.
|
||||
|
||||
vm_storage: "mk-general"
|
||||
vm_storage: "general"
|
||||
|
||||
# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups
|
||||
# and backup groups. (ha_group will be factored out in the next functionality update.)
|
||||
@@ -37,6 +45,7 @@ proxmox_host_target: "pve03"
|
||||
# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address.
|
||||
|
||||
ip_address: 10.1.71.62
|
||||
vm_mac_address: 'BC:24:11:AA:8F:3A'
|
||||
|
||||
# Software
|
||||
# Future enhancement will allow specification of additional software to automatically deploy to
|
||||
@@ -46,4 +55,5 @@ ip_address: 10.1.71.62
|
||||
|
||||
# ---
|
||||
|
||||
vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}"
|
||||
hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn
|
||||
|
||||
@@ -13,20 +13,27 @@ proxmox_clone_node: "fantasyland"
|
||||
|
||||
# Templates are named in the following format (all lower case): <OS Distribution>-<OS Version>-<VM Size>
|
||||
# Current OS offerings are:
|
||||
# - Ubuntu (24.04)
|
||||
# - Fedora (42)
|
||||
# - Ubuntu
|
||||
# - 24.04
|
||||
# - Fedora
|
||||
# - 42
|
||||
|
||||
vm_os_distribution: "ubuntu"
|
||||
vm_os_version: "24.04"
|
||||
|
||||
# Current VM sizes are:
|
||||
# - Small: 2 cores, 2GB memory, 8 GiB virtual disk
|
||||
# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk
|
||||
# - Large: 4 cores, 4GB memory, 32 GiB virtual disk
|
||||
# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk
|
||||
# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk
|
||||
# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk
|
||||
|
||||
vm_clone_source: "ubuntu-24.04-large-plus"
|
||||
vm_size: "large-plus"
|
||||
|
||||
# Proxmox storage target.
|
||||
|
||||
vm_storage: "mk-general"
|
||||
vm_storage: "general"
|
||||
|
||||
# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups
|
||||
# and backup groups. (ha_group will be factored out in the next functionality update.)
|
||||
@@ -38,6 +45,7 @@ proxmox_host_target: "pve03"
|
||||
# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address.
|
||||
|
||||
ip_address: 10.1.71.51
|
||||
vm_mac_address: 'BC:24:11:1A:E8:8C'
|
||||
|
||||
# Software
|
||||
# Future enhancement will allow specification of additional software to automatically deploy to
|
||||
@@ -47,4 +55,5 @@ ip_address: 10.1.71.51
|
||||
|
||||
# ---
|
||||
|
||||
vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}"
|
||||
hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn
|
||||
|
||||
@@ -27,6 +27,7 @@ vm_os_version: "24.04"
|
||||
# - Large: 4 cores, 4GB memory, 32 GiB virtual disk
|
||||
# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk
|
||||
# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk
|
||||
# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk
|
||||
|
||||
vm_size: "large-plus"
|
||||
|
||||
@@ -44,6 +45,7 @@ proxmox_host_target: "pve03"
|
||||
# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address.
|
||||
|
||||
ip_address: 10.1.71.53
|
||||
vm_mac_address: 'BC:24:11:84:D7:2F'
|
||||
|
||||
# Software
|
||||
# Future enhancement will allow specification of additional software to automatically deploy to
|
||||
|
||||
59
ansible/host_vars/tiki-room/vars
Normal file
59
ansible/host_vars/tiki-room/vars
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
# file: host_vars/vm_template/vars
|
||||
# Ansible vars template for hosts created via cloning.
|
||||
|
||||
# Supported hypervisors:
|
||||
# - Proxmox
|
||||
|
||||
platform: "proxmox"
|
||||
|
||||
# This is the Proxmox node where all the VM templates are stored. (Templates are not global.)
|
||||
|
||||
proxmox_clone_node: "fantasyland"
|
||||
|
||||
# Templates are named in the following format (all lower case): <OS Distribution>-<OS Version>-<VM Size>
|
||||
# Current OS offerings are:
|
||||
# - Ubuntu
|
||||
# - 24.04
|
||||
# - Fedora
|
||||
# - 42
|
||||
|
||||
vm_os_distribution: "ubuntu"
|
||||
vm_os_version: "24.04"
|
||||
|
||||
# Current VM sizes are:
|
||||
# - Small: 2 cores, 2GB memory, 8 GiB virtual disk
|
||||
# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk
|
||||
# - Large: 4 cores, 4GB memory, 32 GiB virtual disk
|
||||
# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk
|
||||
# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk
|
||||
# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk
|
||||
|
||||
vm_size: "large"
|
||||
|
||||
# Proxmox storage target.
|
||||
|
||||
vm_storage: "general"
|
||||
|
||||
# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups
|
||||
# and backup groups. (ha_group will be factored out in the next functionality update.)
|
||||
|
||||
ha_group: "pve03"
|
||||
proxmox_host_target: "pve03"
|
||||
|
||||
# Currently, only single NIC VMs using IPv4 are supported via cloning. The IP address also
|
||||
# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address.
|
||||
|
||||
ip_address: 10.1.71.23
|
||||
# vm_mac_address: 'BC:24:11:11:BC:58'
|
||||
|
||||
# Software
|
||||
# Future enhancement will allow specification of additional software to automatically deploy to
|
||||
# the VM after creation.
|
||||
|
||||
#terraform_version: "1.11.3"
|
||||
|
||||
# ---
|
||||
|
||||
vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}"
|
||||
hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn
|
||||
@@ -9,12 +9,18 @@ platform: "proxmox"
|
||||
|
||||
# This is the Proxmox node where all the VM templates are stored. (Templates are not global.)
|
||||
|
||||
proxmox_clone_node: "pve03"
|
||||
proxmox_clone_node: "fantasyland"
|
||||
|
||||
# Templates are named in the following format (all lower case): <OS Distribution>-<OS Version>-<VM Size>
|
||||
# Current OS offerings are:
|
||||
# - Ubuntu (24.04)
|
||||
# - Fedora (42)
|
||||
# - Ubuntu
|
||||
# - 24.04
|
||||
# - Fedora
|
||||
# - 42
|
||||
|
||||
vm_os_distribution: "ubuntu"
|
||||
vm_os_version: "24.04"
|
||||
|
||||
# Current VM sizes are:
|
||||
# - Small: 2 cores, 2GB memory, 8 GiB virtual disk
|
||||
# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk
|
||||
@@ -23,11 +29,11 @@ proxmox_clone_node: "pve03"
|
||||
# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk
|
||||
# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk
|
||||
|
||||
vm_clone_source: "fedora-42-large"
|
||||
vm_size: "large-plus"
|
||||
|
||||
# Proxmox storage target.
|
||||
|
||||
vm_storage: "pve-general"
|
||||
vm_storage: "general"
|
||||
|
||||
# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups
|
||||
# and backup groups. (ha_group will be factored out in the next functionality update.)
|
||||
@@ -39,6 +45,7 @@ proxmox_host_target: "pve03"
|
||||
# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address.
|
||||
|
||||
ip_address: 10.1.71.249
|
||||
# vm_mac_address: 'BC:24:11:11:BC:58'
|
||||
|
||||
# Software
|
||||
# Future enhancement will allow specification of additional software to automatically deploy to
|
||||
@@ -48,4 +55,5 @@ ip_address: 10.1.71.249
|
||||
|
||||
# ---
|
||||
|
||||
vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}"
|
||||
hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn
|
||||
|
||||
@@ -3,16 +3,20 @@ proxmox:
|
||||
hosts:
|
||||
pve0[1:3]:
|
||||
|
||||
ntp_servers:
|
||||
hosts:
|
||||
sundial:
|
||||
|
||||
dns_server:
|
||||
hosts:
|
||||
monorail:
|
||||
|
||||
magic_kingdom:
|
||||
hosts:
|
||||
main-street-usa:
|
||||
tomorrowland:
|
||||
fantasyland:
|
||||
|
||||
ntp_servers:
|
||||
hosts:
|
||||
sundial:
|
||||
|
||||
prometheus_server:
|
||||
hosts:
|
||||
cinderella-castle:
|
||||
@@ -37,26 +41,34 @@ semaphore_server:
|
||||
hosts:
|
||||
imagineering:
|
||||
|
||||
dhcp_server:
|
||||
n8n_server:
|
||||
hosts:
|
||||
matchbox:
|
||||
tiki-room:
|
||||
|
||||
# dhcp_server:
|
||||
# hosts:
|
||||
# matchbox:
|
||||
|
||||
backup_servers:
|
||||
hosts:
|
||||
timekeeper:
|
||||
|
||||
freeipa:
|
||||
# freeipa:
|
||||
# hosts:
|
||||
# infra01:
|
||||
|
||||
# ipaserver:
|
||||
# hosts:
|
||||
# infra01.int.mk-labs.cloud:
|
||||
|
||||
# matchbox_server:
|
||||
# hosts:
|
||||
# matchbox:
|
||||
|
||||
terraform_server:
|
||||
hosts:
|
||||
infra01:
|
||||
|
||||
ipaserver:
|
||||
hosts:
|
||||
infra01.int.mk-labs.cloud:
|
||||
|
||||
matchbox_server:
|
||||
hosts:
|
||||
matchbox:
|
||||
|
||||
hub_cluster:
|
||||
hosts:
|
||||
ocp-hub:
|
||||
@@ -89,10 +101,6 @@ fastpass:
|
||||
# hosts:
|
||||
# sql01:
|
||||
|
||||
# n8n_servers:
|
||||
# hosts:
|
||||
# n8n:
|
||||
|
||||
# docker_servers:
|
||||
# hosts:
|
||||
# docker01:
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
- name: Add entry to DNSMasq
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Retrieve information about specific VM by name and get current configuration
|
||||
delegate_to: "localhost"
|
||||
community.proxmox.proxmox_vm_info:
|
||||
api_user: "{{ proxmox_user }}"
|
||||
api_password: "{{ proxmox_password }}"
|
||||
api_host: "{{ proxmox_host }}"
|
||||
name: "{{ inventory_hostname }}"
|
||||
config: current
|
||||
register: proxmox_vm_info
|
||||
|
||||
- name: Extract net0 information
|
||||
ansible.builtin.set_fact:
|
||||
vm_net0: "{{ proxmox_vm_info.proxmox_vms[0].config.net0 }}"
|
||||
|
||||
- name: Extract MAC address using regex
|
||||
ansible.builtin.set_fact:
|
||||
vm_mac_address: "{{ vm_net0 | regex_search('([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}') }}"
|
||||
|
||||
- name: Add line to hosts file
|
||||
delegate_to: "{{ groups['dhcp_server'][0] }}"
|
||||
become: true
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/dnsmasq.d/hosts.conf
|
||||
regexp: "# {{ inventory_hostname }}$"
|
||||
line: "dhcp-host={{ vm_mac_address | lower }},{{ ip_address }} # {{ inventory_hostname }}"
|
||||
state: present
|
||||
# restart dnsmasq service
|
||||
- name: Restart service dnsmasq
|
||||
delegate_to: "{{ groups['dhcp_server'][0] }}"
|
||||
become: true
|
||||
ansible.builtin.service:
|
||||
name: dnsmasq
|
||||
state: restarted
|
||||
84
ansible/playbooks/add_dhcp_reservation.yml
Normal file
84
ansible/playbooks/add_dhcp_reservation.yml
Normal file
@@ -0,0 +1,84 @@
|
||||
---
|
||||
- name: Bind VM MAC address to IP address on Ubiquiti
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Set VM MAC address (if defined in vars)
|
||||
delegate_to: "localhost"
|
||||
community.proxmox.proxmox_kvm:
|
||||
api_user: "{{ proxmox_user }}"
|
||||
api_password: "{{ proxmox_password }}"
|
||||
api_host: "{{ proxmox_host }}"
|
||||
node: "{{ proxmox_clone_node }}"
|
||||
vmid: "{{ vm_id }}"
|
||||
net:
|
||||
net0: "virtio={{ vm_mac_address }},bridge=vmbr0,firewall=1"
|
||||
update: true
|
||||
update_unsafe: true
|
||||
when: vm_mac_address is defined
|
||||
|
||||
- name: Get VM MAC address from Proxmox (not defined in vars)
|
||||
when: vm_mac_address is not defined
|
||||
block:
|
||||
- name: Retrieve information about specific VM by name and get current configuration
|
||||
delegate_to: "localhost"
|
||||
community.proxmox.proxmox_vm_info:
|
||||
api_user: "{{ proxmox_user }}"
|
||||
api_password: "{{ proxmox_password }}"
|
||||
api_host: "{{ proxmox_host }}"
|
||||
name: "{{ inventory_hostname }}"
|
||||
config: current
|
||||
register: proxmox_vm_info
|
||||
|
||||
- name: Extract net0 information
|
||||
ansible.builtin.set_fact:
|
||||
vm_net0: "{{ proxmox_vm_info.proxmox_vms[0].config.net0 }}"
|
||||
|
||||
- name: Extract MAC address using regex
|
||||
ansible.builtin.set_fact:
|
||||
vm_mac_address: "{{ vm_net0 | regex_search('([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}') }}"
|
||||
|
||||
- name: Assign VM MAC address to IP address on Ubiquiti with Terraform
|
||||
when: vm_mac_address is defined
|
||||
delegate_to: "{{ groups['terraform_server'][0] }}"
|
||||
block:
|
||||
- name: Create a directory if it does not exist
|
||||
ansible.builtin.file:
|
||||
path: "~/homelab/terraform/unifi-dhcp"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Create Unifi provider file from template
|
||||
ansible.builtin.template:
|
||||
src: templates/unifi_provider.tf.j2
|
||||
dest: ~/homelab/terraform/unifi-dhcp/provider.tf
|
||||
mode: '0644'
|
||||
|
||||
- name: Create Unifi user (host) file from template
|
||||
ansible.builtin.template:
|
||||
src: templates/unifi-user.tf.j2
|
||||
dest: ~/homelab/terraform/unifi-dhcp/{{ inventory_hostname }}.tf
|
||||
mode: '0644'
|
||||
|
||||
- name: Configure Unifi via Terraform
|
||||
community.general.terraform:
|
||||
project_path: ~/homelab/terraform/unifi-dhcp
|
||||
state: present
|
||||
force_init: true
|
||||
|
||||
# - name: Add line to hosts file
|
||||
# delegate_to: "{{ groups['dhcp_server'][0] }}"
|
||||
# become: true
|
||||
# ansible.builtin.lineinfile:
|
||||
# path: /etc/dnsmasq.d/hosts.conf
|
||||
# regexp: "# {{ inventory_hostname }}$"
|
||||
# line: "dhcp-host={{ vm_mac_address | lower }},{{ ip_address }} # {{ inventory_hostname }}"
|
||||
# state: present
|
||||
# # restart dnsmasq service
|
||||
# - name: Restart service dnsmasq
|
||||
# delegate_to: "{{ groups['dhcp_server'][0] }}"
|
||||
# become: true
|
||||
# ansible.builtin.service:
|
||||
# name: dnsmasq
|
||||
# state: restarted
|
||||
18
ansible/playbooks/add_technitium_dns_entry.yml
Normal file
18
ansible/playbooks/add_technitium_dns_entry.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Add entry to Technitium DNS
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: "Create DNS entry for {{ inventory_hostname }}"
|
||||
delegate_to: localhost
|
||||
effectivelywild.technitium_dns.technitium_dns_add_record:
|
||||
api_url: "http://{{ dns_server }}.{{ base_domain }}"
|
||||
api_token: "{{ vault_technitium_api_key }}"
|
||||
zone: "{{ base_domain }}"
|
||||
name: "{{ inventory_hostname }}.{{ base_domain }}"
|
||||
type: "A"
|
||||
ipAddress: "{{ ip_address }}"
|
||||
ptr: true
|
||||
ttl: 360
|
||||
# validate_certs: false
|
||||
@@ -3,19 +3,18 @@
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
|
||||
- name: Proxmox Clone Ubuntu VM Playbook
|
||||
ansible.builtin.import_playbook: proxmox_clone_ubuntu_vm.yml
|
||||
when: vm_os_distribution == "ubuntu" and platform == "proxmox"
|
||||
- name: Proxmox Clone VM Playbook
|
||||
ansible.builtin.import_playbook: proxmox_clone_vm.yml
|
||||
|
||||
- name: Proxmox Clone Fedora VM Playbook
|
||||
ansible.builtin.import_playbook: proxmox_clone_fedora_vm.yml
|
||||
when: vm_os_distribution == "fedora" and platform == "proxmox"
|
||||
- name: Set cloud-init network
|
||||
ansible.builtin.import_playbook: populate_cloud_init.yml
|
||||
when: vm_os_distribution == "ubuntu"
|
||||
|
||||
# - name: DNS Playbook
|
||||
# ansible.builtin.import_playbook: add_dns_entry.yml
|
||||
- name: DNS Playbook
|
||||
ansible.builtin.import_playbook: add_technitium_dns_entry.yml
|
||||
|
||||
# - name: DHCP Playbook
|
||||
# ansible.builtin.import_playbook: add_dhcp_entry.yml
|
||||
- name: DHCP Playbook
|
||||
ansible.builtin.import_playbook: add_dhcp_reservation.yml
|
||||
|
||||
- name: Start VM Playbook
|
||||
ansible.builtin.import_playbook: proxmox_start_vm.yml
|
||||
|
||||
@@ -6,40 +6,38 @@
|
||||
roles:
|
||||
- role: kubernetes-prerequisites
|
||||
|
||||
- name: Step 2 - Deploy First Control Plane Node
|
||||
hosts: fastpass_control_plane[0]
|
||||
become: true
|
||||
gather_facts: false
|
||||
roles:
|
||||
- role: fastpass-first-control-plane
|
||||
# - name: Step 2 - Deploy First Control Plane Node
|
||||
# hosts: fastpass_control_plane[0]
|
||||
# become: true
|
||||
# gather_facts: false
|
||||
# roles:
|
||||
# - role: fastpass-first-control-plane
|
||||
|
||||
- name: Step 3 - Deploy Additional Control Plane Nodes
|
||||
hosts: fastpass_control_plane[1:]
|
||||
become: true
|
||||
gather_facts: false
|
||||
roles:
|
||||
- role: fastpass-additional-control-plane
|
||||
# - name: Step 3 - Deploy Additional Control Plane Nodes
|
||||
# hosts: fastpass_control_plane[1:]
|
||||
# become: true
|
||||
# gather_facts: false
|
||||
# roles:
|
||||
# - role: fastpass-additional-control-plane
|
||||
|
||||
- name: Step 4 - Deploy Worker Nodes
|
||||
hosts: fastpass_workers
|
||||
become: true
|
||||
gather_facts: false
|
||||
roles:
|
||||
- role: fastpass-workers
|
||||
|
||||
- name: Final Cluster Validation
|
||||
hosts: fastpass_control_plane[0]
|
||||
become: false
|
||||
gather_facts: false
|
||||
environment:
|
||||
KUBECONFIG: "{{ kubeconfig_path }}"
|
||||
tasks:
|
||||
- name: Display cluster status
|
||||
ansible.builtin.command: kubectl get nodes
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Display all pods
|
||||
ansible.builtin.command: kubectl get pods -A
|
||||
delegate_to: localhost
|
||||
# - name: Step 4 - Deploy Worker Nodes
|
||||
# hosts: fastpass_workers
|
||||
# become: true
|
||||
# gather_facts: false
|
||||
# roles:
|
||||
# - role: fastpass-workers
|
||||
|
||||
# - name: Final Cluster Validation
|
||||
# hosts: fastpass_control_plane[0]
|
||||
# become: false
|
||||
# gather_facts: false
|
||||
# environment:
|
||||
# KUBECONFIG: "{{ kubeconfig_path }}"
|
||||
# tasks:
|
||||
# - name: Display cluster status
|
||||
# ansible.builtin.command: kubectl get nodes
|
||||
# delegate_to: localhost
|
||||
|
||||
# - name: Display all pods
|
||||
# ansible.builtin.command: kubectl get pods -A
|
||||
# delegate_to: localhost
|
||||
|
||||
5
ansible/playbooks/deploy_n8n_server.yml
Normal file
5
ansible/playbooks/deploy_n8n_server.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
- name: 1. Deploy n8n server
|
||||
hosts: n8n_server
|
||||
gather_facts: true
|
||||
roles:
|
||||
- role: n8n
|
||||
@@ -4,28 +4,20 @@
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Create Proxmox VMs
|
||||
- name: Modify Proxmox Ubuntu VM
|
||||
delegate_to: "localhost"
|
||||
when: platform is defined and platform == "proxmox"
|
||||
block:
|
||||
- name: Create VM ID from IP address
|
||||
ansible.builtin.set_fact:
|
||||
vm_id: "{{ ip_address.split('.')[-2] }}{{ '%03d' % (ip_address.split('.')[-1] | int) }}"
|
||||
|
||||
- name: Clone VM with source vmid and target newid and raw format
|
||||
- name: Update cloud-init file
|
||||
community.proxmox.proxmox_kvm:
|
||||
api_user: "{{ proxmox_user }}"
|
||||
api_password: "{{ proxmox_password }}"
|
||||
api_host: "{{ proxmox_host }}"
|
||||
clone: "{{ vm_clone_source }}"
|
||||
newid: "{{ vm_id }}"
|
||||
name: "{{ inventory_hostname }}"
|
||||
node: "{{ proxmox_clone_node }}"
|
||||
storage: "{{ vm_storage }}"
|
||||
format: qcow2 # raw
|
||||
timeout: 600
|
||||
vmid: "{{ vm_id }}"
|
||||
ipconfig:
|
||||
ipconfig0: 'ip=dhcp'
|
||||
ipconfig0: "ip=dhcp"
|
||||
update: true
|
||||
|
||||
# - name: Add VM to HA group
|
||||
# community.proxmox.proxmox_cluster_ha_resources:
|
||||
@@ -2,7 +2,7 @@
|
||||
# Kubernetes Prerequisites Role Defaults
|
||||
|
||||
# Kubernetes version to install (should be overridden in group_vars)
|
||||
kubernetes_version: "v1.33"
|
||||
kubernetes_version: "v1.30"
|
||||
|
||||
# Container runtime (containerd is default)
|
||||
container_runtime: "containerd"
|
||||
@@ -13,15 +13,9 @@ cni_plugin: "calico"
|
||||
# Firewall configuration
|
||||
configure_firewall: true
|
||||
|
||||
# Time synchronization
|
||||
configure_ntp: true
|
||||
|
||||
# SELinux configuration
|
||||
selinux_state: "permissive"
|
||||
|
||||
# Swap configuration
|
||||
disable_swap: true
|
||||
|
||||
# Kernel modules to load
|
||||
required_kernel_modules:
|
||||
- overlay
|
||||
@@ -29,9 +23,9 @@ required_kernel_modules:
|
||||
|
||||
# Sysctl parameters for Kubernetes
|
||||
k8s_sysctl_params:
|
||||
net.bridge.bridge-nf-call-iptables: 1
|
||||
net.bridge.bridge-nf-call-ip6tables: 1
|
||||
net.ipv4.ip_forward: 1
|
||||
- "net.bridge.bridge-nf-call-iptables: 1"
|
||||
- "net.bridge.bridge-nf-call-ip6tables: 1"
|
||||
- "net.ipv4.ip_forward: 1"
|
||||
|
||||
# Kubernetes firewall ports
|
||||
k8s_firewall_ports:
|
||||
|
||||
@@ -1,30 +1,22 @@
|
||||
---
|
||||
- name: Set Kubernetes-compatible hostname
|
||||
# Role to set/install Kubernetes prerequisites
|
||||
|
||||
- name: 1. Set Kubernetes-compatible hostname
|
||||
ansible.builtin.hostname:
|
||||
name: "{{ kubernetes_hostnames[inventory_hostname] | default(inventory_hostname) }}"
|
||||
|
||||
- name: Remove zram-generator-defaults
|
||||
ansible.builtin.file:
|
||||
path: /etc/systemd/zram-generator.conf
|
||||
state: absent
|
||||
- name: 2. Disable swap
|
||||
ansible.builtin.include_role:
|
||||
name: no-swap
|
||||
|
||||
- name: Disable swap
|
||||
ansible.builtin.shell: swapoff -a
|
||||
when: disable_swap | default(true)
|
||||
|
||||
- name: Persist swap off by commenting out swap in fstab
|
||||
ansible.builtin.replace:
|
||||
path: /etc/fstab
|
||||
regexp: '^([^#].*?\sswap\s+sw\s+.*)$'
|
||||
replace: '# \1'
|
||||
when: disable_swap | default(true)
|
||||
|
||||
- name: Load required kernel modules
|
||||
- name: 3.1 Load required kernel modules
|
||||
become: true
|
||||
ansible.builtin.modprobe:
|
||||
name: "{{ item }}"
|
||||
loop: "{{ required_kernel_modules }}"
|
||||
|
||||
- name: Persist kernel modules on boot
|
||||
- name: 3.2 Persist kernel modules on boot
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/modules-load.d/k8s.conf
|
||||
content: "{{ required_kernel_modules | join('\n') }}"
|
||||
@@ -32,179 +24,198 @@
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Configure required sysctl params for Kubernetes
|
||||
ansible.builtin.template:
|
||||
dest: /etc/sysctl.d/k8s.conf
|
||||
src: k8s-sysctl.conf.j2
|
||||
- name: 3.3 Configure required sysctl params for Kubernetes
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/sysctl.d/kubernetes.conf
|
||||
content: "{{ k8s_sysctl_params | join('\n') }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Apply sysctl params without reboot
|
||||
- name: 3.4 Apply sysctl params without reboot
|
||||
become: true
|
||||
ansible.builtin.shell: sysctl --system
|
||||
|
||||
- name: Install python3-libselinux for managing selinux
|
||||
- name: 3.5 Manage SELinux
|
||||
become: true
|
||||
when: ansible_os_family == "RedHat"
|
||||
block:
|
||||
- name: 3.5.1 Install python3-libselinux for managing selinux
|
||||
ansible.builtin.dnf:
|
||||
name: python3-libselinux
|
||||
state: present
|
||||
|
||||
- name: Set SELinux to permissive mode
|
||||
- name: 3.5.2 Set SELinux to permissive mode
|
||||
ansible.posix.selinux:
|
||||
policy: targeted
|
||||
state: "{{ selinux_state }}"
|
||||
|
||||
- name: Install and configure chrony for time synchronization
|
||||
ansible.builtin.dnf:
|
||||
- name: 4 Manage Time Synchronization
|
||||
become: true
|
||||
block:
|
||||
- name: Check if ntp is installed
|
||||
ansible.builtin.package: rpm -q ntp
|
||||
register: ntp_installed
|
||||
changed_when: false
|
||||
|
||||
- name: 4.1 Remove the ntp package
|
||||
ansible.builtin.package:
|
||||
name: ntp
|
||||
state: absent
|
||||
|
||||
- name: 4.2 Install the chrony package
|
||||
ansible.builtin.package:
|
||||
name: chrony
|
||||
state: present
|
||||
when: configure_ntp | default(true)
|
||||
|
||||
- name: Start and enable chronyd
|
||||
ansible.builtin.systemd:
|
||||
name: chronyd
|
||||
state: started
|
||||
enabled: true
|
||||
when: configure_ntp | default(true)
|
||||
|
||||
- name: Force time synchronization
|
||||
ansible.builtin.shell: chronyc makestep
|
||||
ignore_errors: true
|
||||
when: configure_ntp | default(true)
|
||||
# - name: Start and enable chronyd
|
||||
# ansible.builtin.systemd:
|
||||
# name: chronyd
|
||||
# state: started
|
||||
# enabled: true
|
||||
# when: configure_ntp | default(true)
|
||||
|
||||
- name: Install firewalld
|
||||
ansible.builtin.dnf:
|
||||
name: firewalld
|
||||
state: present
|
||||
when: configure_firewall | default(true)
|
||||
# - name: Force time synchronization
|
||||
# ansible.builtin.shell: chronyc makestep
|
||||
# ignore_errors: true
|
||||
# when: configure_ntp | default(true)
|
||||
|
||||
- name: Start and enable firewalld
|
||||
ansible.builtin.systemd:
|
||||
name: firewalld
|
||||
state: started
|
||||
enabled: true
|
||||
when: configure_firewall | default(true)
|
||||
# - name: Install firewalld
|
||||
# ansible.builtin.dnf:
|
||||
# name: firewalld
|
||||
# state: present
|
||||
# when: configure_firewall | default(true)
|
||||
|
||||
- name: Create Kubernetes service definition
|
||||
ansible.builtin.template:
|
||||
dest: /etc/firewalld/services/kubernetes.xml
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
src: kubernetes-firewall-service.xml.j2
|
||||
when: configure_firewall | default(true)
|
||||
# - name: Start and enable firewalld
|
||||
# ansible.builtin.systemd:
|
||||
# name: firewalld
|
||||
# state: started
|
||||
# enabled: true
|
||||
# when: configure_firewall | default(true)
|
||||
|
||||
- name: Reload firewalld to load new service
|
||||
ansible.builtin.shell: firewall-cmd --reload
|
||||
when: configure_firewall | default(true)
|
||||
# - name: Create Kubernetes service definition
|
||||
# ansible.builtin.template:
|
||||
# dest: /etc/firewalld/services/kubernetes.xml
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0644'
|
||||
# src: kubernetes-firewall-service.xml.j2
|
||||
# when: configure_firewall | default(true)
|
||||
|
||||
- name: Add Kubernetes service to default zone
|
||||
ansible.builtin.shell: firewall-cmd --permanent --add-service=kubernetes
|
||||
when: configure_firewall | default(true)
|
||||
# - name: Reload firewalld to load new service
|
||||
# ansible.builtin.shell: firewall-cmd --reload
|
||||
# when: configure_firewall | default(true)
|
||||
|
||||
- name: Add SSH service to default zone (ensure SSH access)
|
||||
ansible.builtin.shell: firewall-cmd --permanent --add-service=ssh
|
||||
when: configure_firewall | default(true)
|
||||
# - name: Add Kubernetes service to default zone
|
||||
# ansible.builtin.shell: firewall-cmd --permanent --add-service=kubernetes
|
||||
# when: configure_firewall | default(true)
|
||||
|
||||
- name: Reload firewalld to apply changes
|
||||
ansible.builtin.shell: firewall-cmd --reload
|
||||
when: configure_firewall | default(true)
|
||||
# - name: Add SSH service to default zone (ensure SSH access)
|
||||
# ansible.builtin.shell: firewall-cmd --permanent --add-service=ssh
|
||||
# when: configure_firewall | default(true)
|
||||
|
||||
- name: Verify Kubernetes service is active
|
||||
ansible.builtin.shell: firewall-cmd --list-services
|
||||
register: active_services
|
||||
when: configure_firewall | default(true)
|
||||
# - name: Reload firewalld to apply changes
|
||||
# ansible.builtin.shell: firewall-cmd --reload
|
||||
# when: configure_firewall | default(true)
|
||||
|
||||
- name: Display active firewall services
|
||||
ansible.builtin.debug:
|
||||
msg: "Active firewall services: {{ active_services.stdout }}"
|
||||
when: configure_firewall | default(true)
|
||||
# - name: Verify Kubernetes service is active
|
||||
# ansible.builtin.shell: firewall-cmd --list-services
|
||||
# register: active_services
|
||||
# when: configure_firewall | default(true)
|
||||
|
||||
- name: Install DNF plugins core for managing repositories
|
||||
ansible.builtin.dnf:
|
||||
name: dnf-plugins-core
|
||||
state: present
|
||||
# - name: Display active firewall services
|
||||
# ansible.builtin.debug:
|
||||
# msg: "Active firewall services: {{ active_services.stdout }}"
|
||||
# when: configure_firewall | default(true)
|
||||
|
||||
- name: Add Docker CE repository
|
||||
ansible.builtin.shell: |
|
||||
curl -fsSL https://download.docker.com/linux/fedora/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo
|
||||
# - name: Install DNF plugins core for managing repositories
|
||||
# ansible.builtin.dnf:
|
||||
# name: dnf-plugins-core
|
||||
# state: present
|
||||
|
||||
- name: Install containerd
|
||||
ansible.builtin.dnf:
|
||||
name: containerd
|
||||
state: present
|
||||
# - name: Add Docker CE repository
|
||||
# ansible.builtin.shell: |
|
||||
# curl -fsSL https://download.docker.com/linux/fedora/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo
|
||||
|
||||
- name: Create containerd config directory
|
||||
ansible.builtin.file:
|
||||
path: /etc/containerd
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
# - name: Install containerd
|
||||
# ansible.builtin.dnf:
|
||||
# name: containerd
|
||||
# state: present
|
||||
|
||||
- name: Generate default containerd config and enable SystemdCgroup
|
||||
ansible.builtin.shell: |
|
||||
containerd config default > /etc/containerd/config.toml
|
||||
sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.toml
|
||||
# - name: Create containerd config directory
|
||||
# ansible.builtin.file:
|
||||
# path: /etc/containerd
|
||||
# state: directory
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0755'
|
||||
|
||||
- name: Restart and enable containerd service
|
||||
ansible.builtin.systemd:
|
||||
name: containerd
|
||||
state: restarted
|
||||
enabled: true
|
||||
# - name: Generate default containerd config and enable SystemdCgroup
|
||||
# ansible.builtin.shell: |
|
||||
# containerd config default > /etc/containerd/config.toml
|
||||
# sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.toml
|
||||
|
||||
- name: Add Kubernetes repository
|
||||
ansible.builtin.template:
|
||||
dest: /etc/yum.repos.d/kubernetes.repo
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
src: kubernetes.repo.j2
|
||||
# - name: Restart and enable containerd service
|
||||
# ansible.builtin.systemd:
|
||||
# name: containerd
|
||||
# state: restarted
|
||||
# enabled: true
|
||||
|
||||
- name: Install Kubernetes packages
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- kubelet
|
||||
- kubeadm
|
||||
- kubectl
|
||||
- kubernetes-cni
|
||||
state: present
|
||||
# - name: Add Kubernetes repository
|
||||
# ansible.builtin.template:
|
||||
# dest: /etc/yum.repos.d/kubernetes.repo
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0644'
|
||||
# src: kubernetes.repo.j2
|
||||
|
||||
- name: Create kubelet config directory
|
||||
ansible.builtin.file:
|
||||
path: /var/lib/kubelet
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
# - name: Install Kubernetes packages
|
||||
# ansible.builtin.dnf:
|
||||
# name:
|
||||
# - kubelet
|
||||
# - kubeadm
|
||||
# - kubectl
|
||||
# - kubernetes-cni
|
||||
# state: present
|
||||
|
||||
- name: Create initial kubelet config file
|
||||
ansible.builtin.copy:
|
||||
dest: /var/lib/kubelet/config.yaml
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
content: |
|
||||
apiVersion: kubelet.config.k8s.io/v1beta1
|
||||
kind: KubeletConfiguration
|
||||
cgroupDriver: systemd
|
||||
containerRuntimeEndpoint: unix:///run/containerd/containerd.sock
|
||||
# - name: Create kubelet config directory
|
||||
# ansible.builtin.file:
|
||||
# path: /var/lib/kubelet
|
||||
# state: directory
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0755'
|
||||
|
||||
- name: Install CNI plugins via dnf
|
||||
ansible.builtin.dnf:
|
||||
name: containernetworking-plugins
|
||||
state: present
|
||||
# - name: Create initial kubelet config file
|
||||
# ansible.builtin.copy:
|
||||
# dest: /var/lib/kubelet/config.yaml
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0644'
|
||||
# content: |
|
||||
# apiVersion: kubelet.config.k8s.io/v1beta1
|
||||
# kind: KubeletConfiguration
|
||||
# cgroupDriver: systemd
|
||||
# containerRuntimeEndpoint: unix:///run/containerd/containerd.sock
|
||||
|
||||
- name: Verify CNI plugins installation
|
||||
ansible.builtin.shell: ls -la /opt/cni/bin/ || echo "CNI plugins not found in /opt/cni/bin/"
|
||||
register: cni_plugins
|
||||
ignore_errors: true
|
||||
# - name: Install CNI plugins via dnf
|
||||
# ansible.builtin.dnf:
|
||||
# name: containernetworking-plugins
|
||||
# state: present
|
||||
|
||||
- name: Display installed CNI plugins
|
||||
ansible.builtin.debug:
|
||||
msg: "CNI plugins status: {{ cni_plugins.stdout }}"
|
||||
# - name: Verify CNI plugins installation
|
||||
# ansible.builtin.shell: ls -la /opt/cni/bin/ || echo "CNI plugins not found in /opt/cni/bin/"
|
||||
# register: cni_plugins
|
||||
# ignore_errors: true
|
||||
|
||||
- name: Enable kubelet service (but don't start yet)
|
||||
ansible.builtin.systemd:
|
||||
name: kubelet
|
||||
enabled: true
|
||||
state: stopped
|
||||
# - name: Display installed CNI plugins
|
||||
# ansible.builtin.debug:
|
||||
# msg: "CNI plugins status: {{ cni_plugins.stdout }}"
|
||||
|
||||
# - name: Enable kubelet service (but don't start yet)
|
||||
# ansible.builtin.systemd:
|
||||
# name: kubelet
|
||||
# enabled: true
|
||||
# state: stopped
|
||||
|
||||
100
ansible/playbooks/roles/n8n/tasks/main.yml
Normal file
100
ansible/playbooks/roles/n8n/tasks/main.yml
Normal file
@@ -0,0 +1,100 @@
|
||||
---
|
||||
# Role to install and configure a n8n server
|
||||
|
||||
- name: 1. Pre-install system updates
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
name: '*'
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: 2. Install required packages
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop:
|
||||
- curl
|
||||
- wget
|
||||
- gnupg
|
||||
- lsb-release
|
||||
- ca-certificates
|
||||
- software-properties-common
|
||||
|
||||
# firewall
|
||||
# sudo ufw enable
|
||||
# sudo ufw allow ssh
|
||||
# sudo ufw allow 5678/tcp
|
||||
|
||||
- name: 3. Enable UFW
|
||||
become: true
|
||||
community.general.ufw:
|
||||
state: enabled
|
||||
|
||||
- name: 4. Open firewall ports for n8n
|
||||
become: true
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: "{{ item }}"
|
||||
proto: tcp
|
||||
loop:
|
||||
- 22
|
||||
- 5678
|
||||
|
||||
- name: 5. Download node installer
|
||||
# become: true
|
||||
ansible.builtin.get_url:
|
||||
url: 'https://deb.nodesource.com/setup_lts.x'
|
||||
dest: '/tmp/setup_lts.x'
|
||||
mode: '0755'
|
||||
|
||||
- name: 6. Run node installer
|
||||
become: true
|
||||
ansible.builtin.shell:
|
||||
cmd: '/tmp/setup_lts.x'
|
||||
|
||||
- name: 7. Install Node.js and npm
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: nodejs
|
||||
state: present
|
||||
|
||||
- name: 8. Install npm@latest
|
||||
become: true
|
||||
ansible.builtin.shell:
|
||||
cmd: 'sudo npm install -g npm@latest'
|
||||
|
||||
- name: 9. Install "n8n" node.js package globally.
|
||||
become: true
|
||||
community.general.npm:
|
||||
name: n8n
|
||||
global: true
|
||||
|
||||
- name: 10. Copy n8n.service to /etc/systemd/system
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
dest: /etc/systemd/system/n8n.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
src: n8n.service.j2
|
||||
|
||||
- name: 11. Create n8n user
|
||||
become: true
|
||||
ansible.builtin.user:
|
||||
name: n8n
|
||||
state: present
|
||||
shell: /bin/bash
|
||||
home: /home/n8n
|
||||
createhome: true
|
||||
|
||||
- name: 12. Reload systemd to re-read configs
|
||||
ansible.builtin.systemd_service:
|
||||
daemon_reload: true
|
||||
|
||||
- name: 13. Start n8n service
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
name: n8n.service
|
||||
state: restarted
|
||||
enabled: true
|
||||
22
ansible/playbooks/roles/n8n/templates/n8n.service.j2
Normal file
22
ansible/playbooks/roles/n8n/templates/n8n.service.j2
Normal file
@@ -0,0 +1,22 @@
|
||||
[Unit]
|
||||
Description=n8n - Workflow Automation Tool
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=n8n
|
||||
Group=n8n
|
||||
ExecStart=/usr/local/bin/n8n
|
||||
WorkingDirectory=/home/n8n
|
||||
Environment=NODE_ENV=production
|
||||
Environment=N8N_BASIC_AUTH_ACTIVE=true
|
||||
Environment=N8N_BASIC_AUTH_USER=admin
|
||||
#Environment=N8N_BASIC_AUTH_PASSWORD=your_secure_password
|
||||
Environment=N8N_HOST=0.0.0.0
|
||||
Environment=N8N_PORT=5678
|
||||
Environment=N8N_PROTOCOL=http
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
34
ansible/playbooks/roles/no-swap/tasks/main.yml
Normal file
34
ansible/playbooks/roles/no-swap/tasks/main.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
# Role to disable swap
|
||||
|
||||
- name: 1. Check if swap is enabled
|
||||
ansible.builtin.shell: swapon --show=NAME --noheadings
|
||||
register: swap_status
|
||||
changed_when: false
|
||||
|
||||
- name: 2. Disable swap
|
||||
become: true
|
||||
when: swap_status.stdout != ''
|
||||
block:
|
||||
- name: 2.1 Disable swap
|
||||
ansible.builtin.shell: swapoff -a
|
||||
|
||||
- name: 2.2 Persist swap off by commenting out swap in fstab
|
||||
ansible.builtin.replace:
|
||||
path: /etc/fstab
|
||||
regexp: '^([^#].*?\sswap\s+sw\s+.*)$'
|
||||
replace: '# \1'
|
||||
backup: true
|
||||
|
||||
- name: 2.3 Remove swap file
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ swap_status.stdout }}"
|
||||
state: absent
|
||||
|
||||
- name: 2.4 Remove zram-generator-defaults
|
||||
become: true
|
||||
when: ansible_os_family == "RedHat"
|
||||
ansible.builtin.file:
|
||||
path: /etc/systemd/zram-generator.conf
|
||||
state: absent
|
||||
8
ansible/playbooks/templates/unifi-user.tf.j2
Normal file
8
ansible/playbooks/templates/unifi-user.tf.j2
Normal file
@@ -0,0 +1,8 @@
|
||||
resource "unifi_user" "{{ inventory_hostname }}" {
|
||||
mac = "{{ vm_mac_address }}"
|
||||
name = "{{ inventory_hostname }}"
|
||||
# note = "my note"
|
||||
|
||||
fixed_ip = "{{ ip_address }}"
|
||||
allow_existing = true
|
||||
}
|
||||
22
ansible/playbooks/templates/unifi_provider.tf.j2
Normal file
22
ansible/playbooks/templates/unifi_provider.tf.j2
Normal file
@@ -0,0 +1,22 @@
|
||||
// Configure the unifi provider
|
||||
terraform {
|
||||
required_providers {
|
||||
unifi = {
|
||||
source = "paultyng/unifi"
|
||||
version = "0.41.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "unifi" {
|
||||
username = "terraform" # optionally use UNIFI_USERNAME env var
|
||||
password = "{{ vault_unifi_password }}" # optionally use UNIFI_PASSWORD env var
|
||||
api_url = "https://192.168.1.1" # optionally use UNIFI_API env var
|
||||
|
||||
# you may need to allow insecure TLS communications unless you have configured
|
||||
# certificates for your controller
|
||||
allow_insecure = "true" # optionally use UNIFI_INSECURE env var
|
||||
|
||||
# if you are not configuring the default site, you can change the site
|
||||
# site = "world-drive" # or optionally use UNIFI_SITE env var
|
||||
}
|
||||
38
ansible/roles/time-sync/README.md
Normal file
38
ansible/roles/time-sync/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||||
3
ansible/roles/time-sync/defaults/main.yml
Normal file
3
ansible/roles/time-sync/defaults/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
# defaults file for time-sync
|
||||
3
ansible/roles/time-sync/handlers/main.yml
Normal file
3
ansible/roles/time-sync/handlers/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
# handlers file for time-sync
|
||||
35
ansible/roles/time-sync/meta/main.yml
Normal file
35
ansible/roles/time-sync/meta/main.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description: your role description
|
||||
company: your company (optional)
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||
# - BSD-3-Clause (default)
|
||||
# - MIT
|
||||
# - GPL-2.0-or-later
|
||||
# - GPL-3.0-only
|
||||
# - Apache-2.0
|
||||
# - CC-BY-4.0
|
||||
license: license (GPL-2.0-or-later, MIT, etc)
|
||||
|
||||
min_ansible_version: 2.1
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
3
ansible/roles/time-sync/tasks/main.yml
Normal file
3
ansible/roles/time-sync/tasks/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
# tasks file for time-sync
|
||||
3
ansible/roles/time-sync/tests/inventory
Normal file
3
ansible/roles/time-sync/tests/inventory
Normal file
@@ -0,0 +1,3 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
localhost
|
||||
|
||||
6
ansible/roles/time-sync/tests/test.yml
Normal file
6
ansible/roles/time-sync/tests/test.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- time-sync
|
||||
3
ansible/roles/time-sync/vars/main.yml
Normal file
3
ansible/roles/time-sync/vars/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
# vars file for time-sync
|
||||
Reference in New Issue
Block a user