Compare commits
49 Commits
88cb3a370e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
36cf98026b
|
|||
|
98746b3eb8
|
|||
|
afffd87201
|
|||
|
d21f3d9371
|
|||
|
a6ef7a1c4e
|
|||
|
602734acce
|
|||
|
0db7911b70
|
|||
|
ee4c62e5f9
|
|||
|
a315db8a7c
|
|||
|
5f00892df3
|
|||
|
9357265d27
|
|||
|
dd62266340
|
|||
|
a1bec20824
|
|||
|
8e91c44529
|
|||
|
02d4135c79
|
|||
|
37e148d009
|
|||
|
73dbbd23b6
|
|||
|
b84283aa38
|
|||
|
1695fdf8d1
|
|||
|
9f1f7b1c69
|
|||
|
7d725f2084
|
|||
|
4c39b0d48c
|
|||
|
f4023d0b20
|
|||
|
6aaface4a2
|
|||
|
333e1cbeb9
|
|||
|
0c62f4bdf0
|
|||
|
26f22c0447
|
|||
|
05881e2585
|
|||
|
d4d326c2f7
|
|||
|
1d4a6f208b
|
|||
|
8b22076d4a
|
|||
|
38176cb34c
|
|||
|
da737b71f7
|
|||
|
c28189a1a5
|
|||
|
b600141e89
|
|||
|
4be98d1a33
|
|||
|
2bb018a40c
|
|||
|
89a1e11b7a
|
|||
|
0c0cad9084
|
|||
|
9dce701a19
|
|||
|
3e9ee44d5b
|
|||
|
599b5e5e83
|
|||
|
bc700ea532
|
|||
|
8016701b57
|
|||
|
00558c7dea
|
|||
|
c927186837
|
|||
|
690774c862
|
|||
|
cc021bd14a
|
|||
|
73fd06fe3a
|
1131
Pipfile.lock
generated
1131
Pipfile.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -13,12 +13,6 @@ interpreter_python=auto
|
||||
# See: https://docs.ansible.com/ansible/latest/user_guide/connection_details.html#managing-host-key-checking
|
||||
host_key_checking = False
|
||||
|
||||
ansible_managed = This file is managed by Ansible.%n
|
||||
template: {file}
|
||||
date: %Y-%m-%d %H:%M:%S
|
||||
user: {uid}
|
||||
host: {host}
|
||||
|
||||
[privilege_escalation]
|
||||
# instead of using -K
|
||||
become_ask_pass=True
|
||||
|
||||
@@ -3,4 +3,12 @@
|
||||
|
||||
tls_cipher_suite: "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384"
|
||||
|
||||
ansible_managed: |-
|
||||
This file is managed by Ansible.
|
||||
|
||||
{{ 'template: ' + template_path }}
|
||||
{{ 'date: ' + (template_mtime | string) }}
|
||||
{{ 'user: ' + template_uid }}
|
||||
{{ 'host: ' + template_host }}
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
||||
280
host_vars/web22
280
host_vars/web22
@@ -1,141 +1,141 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
64313136396662396631396561646634386134313337316166376264346466386533383934393130
|
||||
6339663736653462613737323932396664643132383036370a343032653931343063326337626336
|
||||
38383332346637633636663865333031636166643161323335363663653033646234656332333462
|
||||
3833643037313134320a613332303261356363363138636138323661633233353365623665663632
|
||||
30616166383161663534666337303632663532343866366261393935373935666536616530373862
|
||||
66653836393966346463393061646431336666316537613364643939663938303135386463616661
|
||||
31633330663364353663646338386338323039646530373165386663646235303963623837646533
|
||||
30316236313736303837353536633161326564643566643533363431303130376338383034623365
|
||||
34303861356264333463613739373635616363366362333738383838326162313238313966313765
|
||||
35356637623833663437373765333237323961383133336161363439316632363634623734373962
|
||||
32326466303536363164666532313264343661336364396562383630653865316132366538313066
|
||||
65666661343632383434346639353462623735373933303263613938363635353666656139663832
|
||||
66333638636136393166636332623934613938656336663431323032333339336165366664636334
|
||||
65363166616462303939383838363363623530313539386635313664333136643035623262663333
|
||||
35643335346639623363323535633735613965333133323639383339323166366635303536376265
|
||||
35613939376135393165653466366462656162353632393139376666666334386166366162643438
|
||||
31313033353661313031303961313032613539396561303734356533373234633233613465306431
|
||||
31303332643931333037343164643162663738393466346639306632306534613065376138323564
|
||||
31326462666336633938396230666231356439343630336132313064363636333563373637313666
|
||||
32303230616235653733323032343238303230396232623364643765613764336137646630363462
|
||||
64343239343530636333663764643338623630366163636232353734616333306339626136313338
|
||||
35616632326436663734376263366437356236343339663430323632646136373066373961666135
|
||||
38313838316266313830626234366262383037646661386537663534633263633239306461346535
|
||||
32643032316266373931346232356162336437623137623365616132643731666361313637316536
|
||||
39656332383466346236633461366437386538373734646337393666346562323139663734326436
|
||||
65623633363266323563666437633666326363626561313133633031623632633333346332623334
|
||||
31396365333336313939633161613639383963633136616562333236636666306139663430363265
|
||||
63353261306332346439313534393363626638633531633532363365663265353331336231316238
|
||||
37323439383930346136383036303833316565306139613235333633373832313130316534666435
|
||||
30323262623037623939336265303866356532653064303436653131633162616630326362616430
|
||||
33343538353139326663653735343436623834653264376264363761313835376433653531623266
|
||||
34386266613733653634363135616335303138303062316664623666643263323939643939303133
|
||||
32393564323833666132626664646436333733396565623164646363343065343464363465383330
|
||||
33636562613734303665343366656630303732323739363339306337316266356635323262643031
|
||||
63393261363764613638666231663837373263353137643265336134646364343130353237336463
|
||||
62306363373339363235343034393230623035373366656531666663323936323366643938646135
|
||||
62643135383734663766353230356463373337613936633037396538643365393738363234313166
|
||||
62303038326236656332663939333364633132386266383665363632386235643731616631313431
|
||||
37613566616463613662633734316461386261646464636539353439373431323133663435333763
|
||||
63333230663431323136373564613239386531356463646366313537303861616234626561663133
|
||||
32643134666337633938633530323034653131663663643732623636633834323064633832396339
|
||||
35613738366666653765333434616336383635323765626561376232363062373761383665313735
|
||||
30643165633930656566633339383439353931303836333537343634353434653433333933386338
|
||||
64393566616166353731313261386239646531316563623363646537653964366631663266353366
|
||||
65666638393337663633366132663933376135396334303461653232353765626365303464626338
|
||||
30653334393439373632393662653032633264363238626431326136653561636164646237373033
|
||||
32646464616137366163313634623864656666346336383037373562633333633432313439323631
|
||||
34646132643834323261316166303531666238333964396165313936393937366533396436633832
|
||||
34663538613139623063346666306165306530646363353732353431343831303161343535623539
|
||||
38663537323132653034393335623232623530343432336531643538356430636262313132356430
|
||||
33363062333931306633643733313239373934313635336465643139616266613237353166626334
|
||||
35643138633561393531313835623665303531313437323664616561633764316332393435373065
|
||||
38633766623633666362633336326466343938623461393736666137313965386133396433303236
|
||||
34366339326637323934323236346239373565623565313433376433303061353763383732663239
|
||||
65313636646539623037653761316662303565636262376262333332316136623737613338303036
|
||||
37623837313636333464626664323163633136343762306462323339646535636237326138613132
|
||||
33613761646237396265616135346639636566316633646165616332656333383233343836316163
|
||||
36313736343263343534656533646463343933333031666433393635623461633639356430303434
|
||||
34663033333933333439386532623664316364343066646232353335643536353733326165623231
|
||||
66306661343939616235313238353761643034623062326632393161336462333365636536343934
|
||||
63343866666237636563363561366339623161643362326632333532613562336238653562346231
|
||||
33623337386233636331326232393465346362336439303336303638643430623864323434633333
|
||||
63623036623764646234636433383364333763613866626230316533643535356662306136346664
|
||||
36353734663866306336303439623537336266383131303365383439356462306237363030306432
|
||||
38623738643434396138373837386334616435383662363032663930363038666536653334613261
|
||||
36623730666333393564346539653533656434346439346632643730356665313865396463343737
|
||||
31326633646661666461396365643061333361643638363835343235646231633637616464343265
|
||||
36646439383737336531303236666136313063653563653433306563643362353536663863653266
|
||||
38613461363432333666343264333461396461653231646133383861363763353763626334373635
|
||||
35313431346465336636363531363766633234653066376366636263306238393361343936663066
|
||||
61653739303230316232626335383865636235363638663463396435623737616661346666613037
|
||||
32666436333937356530326566626237303065363834313837383837306432383833643632376564
|
||||
39623937653631656562306565376232333463626563336630633331663764346138323466303433
|
||||
38303965386635386565653035666631616239306231616530363965306134633034623936396135
|
||||
32366430333763333039613734343563663065636538616139646239303533336437616162366532
|
||||
38343137366563333866343537393532353835386230623536663966643730663031636639313232
|
||||
33636133303432343531626539633862646466653864393737363333366238666536303663343837
|
||||
39363330383432353465633132346165333564646262383736366664303239366365643533353738
|
||||
65656163313966306464633237383530316338666665666236656164636433653735353739393363
|
||||
30633462393933646436356365323864383239633963306366356534333036663438643438303365
|
||||
37366638383066653965383764323436336230363336303233303433656563656563343630613935
|
||||
64373965366662323137353631323233643463366338393639663833633635313531616539366333
|
||||
30656663666561353938393761353266386533383361326439383338363762633538396638386630
|
||||
31383131316137346234336462333032366337393438343237613231323164306132373136323233
|
||||
38643133356166303661363761646430363734373130363334376535356565386638366630306362
|
||||
63626539336134356539366166616331626361356335616665336564636638316137316230643961
|
||||
65623465336232326533616538653561646263626536333738346531366661336134366362386239
|
||||
39643665663566376264356332653062313536353635656231656566386333636330353765373664
|
||||
34616338623161333232653832386436343361636461653338363932633337623537303261396334
|
||||
30386663613335303438376234333138363432633234646133646466323930656330623161373530
|
||||
36383261373139663932623933626164313765613930323035326334373231303033616665346337
|
||||
32353235663465336433666539333032376365373266363436353063366139616232373037383664
|
||||
31323062383063373932623030356461353039326363336165326138353335326436363165393639
|
||||
33643830353734616164653833613830333066626161636130323861643866386234383136313336
|
||||
37333337363462313831633437636633383137303736303264393236333633383933303939383533
|
||||
38626138396537663463633961303766663636353737336365393638383832303735323266646337
|
||||
62643665353431326465386162633737613935353261633963616531306233613966643862316166
|
||||
38316164383433333263363630386462313639336464653061373239633235346633613237646563
|
||||
62383836393063613365653635663136356538623962623961326434646635633464313932626333
|
||||
36383666653264366236396638626265356338653630303930383861386534393732633437363663
|
||||
38623739313131643038396335326437323231636661346164353433303235356432306532353066
|
||||
63373662313366376363653039316361366266616466663663313732303962336339616235366432
|
||||
32643832366231396132333236313962313932343230333832616664356333646533323732656466
|
||||
34393862393434383362303531653638303366323530656661623236336630383064663135373862
|
||||
61313761643038333035376535633964303564616532646139393964353165353763626235303662
|
||||
65633465626365393033376437633134333532656262366462323365653466616462316664323837
|
||||
64346533366238656637366665303339666433623261623635383631303862616438353166353866
|
||||
66346366316562316230306233323937313364656537393063306537353237353737626164663365
|
||||
38636331363138326336646434653238636463633138343134373937373835373232356363663366
|
||||
37386633353439656162613736303932633333313131653364616364343761363335343430396432
|
||||
39636630343066616633376237643062616666666135363232376632666132396333363334623036
|
||||
63323531626632383062353162346536663233656132383734643761396264623165663738616564
|
||||
61316234386135656538363861363531373232303163643364366136616130643737346438353334
|
||||
63653234376562663937663135363763656236346663363738313836383466656162643131636138
|
||||
63383430653030383232333830656333373765333639303265643938323833613262643863643835
|
||||
66326466313730323666643939623539326639663838663737326665326164366262323731623037
|
||||
33383631616530383238626431333033366134383839613761656264366331663539363131396361
|
||||
64316333373134636163666634656561306130616337383030653063626161303930653730623130
|
||||
33653730656332616135663631653336386166363866303932643163353963396466646662626439
|
||||
39653562613461353633313533356336393334643066626137306164643530343331666430636330
|
||||
63613763336663613639343036363332626232346530366633646536396338613164666163663235
|
||||
37333334313436326233653866316438626366633632653336393633333931353961353132376639
|
||||
66343362646630376537356638396263623262363138323630363834386162656236313365393766
|
||||
39616135303337303166313663383635636165373333313463623731346561356430326164663164
|
||||
30333839386564616133393630396538633032616332646639616161643739626437306532356136
|
||||
34383432626136336261666166633739313663333664663035333533626334623132373037663239
|
||||
38393638323833643730353432656365396161353161613733653562303731616462623436643832
|
||||
35376133653665333432303132383966333362313262393931373264616664643438346566333764
|
||||
34303439633538376439646435646631336361316436306330653838363665366461333366656239
|
||||
33303038643139643431613764333864306134666166376164623038333330613933333766643830
|
||||
30653637666533363234626465353734303538623233623532393936303566306434346537343932
|
||||
39393863373635626530326139376339653764623265636530323330376633363265636439353738
|
||||
32353634316162656461353666666338633233393039343935613539623766363237656161383364
|
||||
61356165313637343134363932333136643464353436323333653939613666653164303363656637
|
||||
32386561326461353665633339373038616464633430303763666234313032653735373832393539
|
||||
33333334663336346139373064633364353530366166636465343734633465623065666563383539
|
||||
30316166356239316530633239313765623438306234666235616464313765356165363435303336
|
||||
39633532393965646539356439396132616637383430653762616562323065343233383034363130
|
||||
32623331343035306165313637356131633963353035313838363439343133636631626532613366
|
||||
33323364616262303962
|
||||
65636230346264393938656566653961393466306338353435333061356463363836616435333731
|
||||
3537316534663335343333643435383663303438333433650a666133633965643939306661383536
|
||||
33626364316338306530393036653134373339653264616537623731323063646531383137333131
|
||||
6263363037613631360a343831393830646536326538363764643136613732636165316466316566
|
||||
65346162383337626631663533626230643061633139663661656365333738353530316661313864
|
||||
32373831396437386434313430666434363534656130613632643264393538663131336635653537
|
||||
61613065336133343130353862646130386136333231393962353064666335363330623064626631
|
||||
34333137363566313764343335646531326337616563366636316232633936333264373731653332
|
||||
66366361643261626563633838663061303762386234336133366233356564343562323965663731
|
||||
38326631333166643534313836323337663131313766306166333534336333613735643033326633
|
||||
39396335613362363230333863396535343464346437366632316336626539623865313239353539
|
||||
30643834633130333564666162623365323439396630333136616137633532363530623234376332
|
||||
66353539306637633432353231326666643261386466633533313063353061643761313132623035
|
||||
62653263636237666432336662633136653930323532623137386261333862623337326431336365
|
||||
36663364386364346631393031326434326334636166663739366435616166363130623463633733
|
||||
35383834326231363264623061303066326433613139333237656635643835393762313866356237
|
||||
62616435613863616161376666333966323030326531323261646436633233613635383438373834
|
||||
31343133326231636661353466396566656365396466343430613262316537623631376433633630
|
||||
62336664346363393363306163333662323338343139646238633830326535313034613739616138
|
||||
38313637333333383032316134316164363036396338306634633436633564306333336437393566
|
||||
61656337343030393936353364386461643766636564333864396130343762323630393839393463
|
||||
35343864393035333930313238663465663633633862623336663136626165666131383933626437
|
||||
31323936653737646231363036383764333335313762356465333635303334663734636531343331
|
||||
37386461643239363434373864373561353339343031346364383530663430393938333963333837
|
||||
63303966366364626665303530356433643264343861346238353937386338383034356633623231
|
||||
36663735386233396138306561326339626262326463336535646265666637383032396435333835
|
||||
31363266666230366438313432356637663632333530646263663563373137313262663937636532
|
||||
66633731333166386564386666363130633734643963653030386533393766623038383234646161
|
||||
36343135663231323030306430623535373534353835623339333738376362663930343436343637
|
||||
34383963306266623437323462356466336533643933653839366666393839626663353264326334
|
||||
32663461663561396631363533383334363361373764363132643435373537333839613066396463
|
||||
35386436326638353431363064626131306634363339653132396563356239653265303930333634
|
||||
32376332643863376237383966623233323864393338346537393865363661616338333631383532
|
||||
34373635316138663261633839333664353432666234306463306338653634633038373266646462
|
||||
32336534356537306366656236356663616336333031306431653239343132336234626165333032
|
||||
38303137666131363462363263333832356333616130346337663837376365346166306261373036
|
||||
63383236323738303562623631633064363564663861336162356262373861383965623935343931
|
||||
65663934623431363164356331353135633837616130363464353661663438323132363165343766
|
||||
31393633306261303762613537343034316535373731363365666530623361623630633137326466
|
||||
32326533313362333863383561343230626466303831623033613065363136396362373333306333
|
||||
32336464356364663564626234653832323265313364343631646633396362373438666165353962
|
||||
38396330333161356365626562383531323664636235643666613631636636323638376638396531
|
||||
38646531666164653161353932643662363261323564373537343731666232666532633063353431
|
||||
61386163363562313330393037656139303365396438313935306333656264373531373037303939
|
||||
63373962356233346164383163323532373163376364623766323933623063653939346537306338
|
||||
65353266656532636633326137356430666432333465626437633733356435363163626430303964
|
||||
39343935623937616130326637323061373538616633393465653266656666376661393635333662
|
||||
30363364653130356137393463613038663762396336306234363461396133306562323838336330
|
||||
63303735646132353766313137303162366164613530303966383636393934393035306264626465
|
||||
36613233376234633932663963623432663032656236323963353036356437383066373532323865
|
||||
36643431373966613533646164303564653336396535343366303339303134613936656137653939
|
||||
31333062623734613538333666636561386338306235633165386262383261333264623638383366
|
||||
34313266333636376337393736343062363539366235393136663561303663386438333834613539
|
||||
38623632656161653766363166653661336136653833336663616261663831656133666232633362
|
||||
31373166306134653162313134333432323134623336666632613766386662653831643732326330
|
||||
63643737333638626162646136373466613536653831663835616432343537323864343166316461
|
||||
34393732353930343430356231626636373763636561343430616533663861346566326262313232
|
||||
39623936366633363136353632346134643563383833376134363833336137613337326435613764
|
||||
37653232613632333334316162383261383836613936376230393633343336346633386539356232
|
||||
30316232373738363038356665366663623536626539376364303038643061386363636337386663
|
||||
61383634336530666163346239343838326138373932383339396265653764313039653138643938
|
||||
31613163653632656238376533363739346539623863623332653936643731623565613234663430
|
||||
39363935306330386634363634363233376234613837353765353732646638663830323335616234
|
||||
34366334636436633734333830306136333563666337623035653239313361626438316535313434
|
||||
37343930643832383136343737313365316238373638323130653766646637343464653134616137
|
||||
38313034383833626433326237633863313364353662326233636333333932633039396565356133
|
||||
64376166383064343239633364363861616136643061646636323437376162313438396230393331
|
||||
32633662323031666238643934646665303666383834336432363430363166356632353033336333
|
||||
64383861663563653531643832656238643066323564656134633639666234363363363132623836
|
||||
61386431643130333761376161646262346562363532353632633332343666393562313465303337
|
||||
31333732626164363464323531323239333963303333626466623966346361383832353765346565
|
||||
37303765363834376237636632386663373061346534643132636333623137366662646538306231
|
||||
33353538623231636166653838333264396463616437396264353537633661313932353133316438
|
||||
61323439363635383035316335363132383366613733383363306366356466333364633537393033
|
||||
66636434623962633063306236303831633637656430376533353436613934636466363461333562
|
||||
34613339373732343632343435333331353935303735633732656663643938663439656233613163
|
||||
65356232633865656439643430636332386663333761376638323630373930663837653638363963
|
||||
63656437323138633664613166353537306466666261353532326363346332343363343035386435
|
||||
33326238333730303539363265383761663862313961383030326263353034303866626661623334
|
||||
61623365373332366333376630626539343835663466666534636561643736646537646431386631
|
||||
36366132663830336234613065626262336564316339383038333330323237363665373935326438
|
||||
38646335346239316432636138633365373062663564326465643032633438306230363434323262
|
||||
34313932653361346261623030623739313665356464373666346361663430336362383063666134
|
||||
38323539653437623030333437373231646634333563306165393231653465313731633536323362
|
||||
65613262633563653031306139383436663834616339316164393365336437653730393331636464
|
||||
32313537313164386164313832396566353137376239303663656130383336336634313235376363
|
||||
63326530333339356432343938306465623636336161363133613864336339393635306234656263
|
||||
34343437336461303831393562653934633439336562663366643066393439396531653663386531
|
||||
65623061643064396534353364663633653331653535306133386466356236623239646432373066
|
||||
61313261366466663866613162323939646534653561356335393237376138633930663364636236
|
||||
36613834303338646530663565303438363831663865323531386635303239646464343936303832
|
||||
31323531363263333830623838666437636262306164386236643032356165323037656630383739
|
||||
65666333656639333263346465666463616534353835656337353464336134303732323037393538
|
||||
37366263656133643039373438636537343636663065646534616339303833666532396633616565
|
||||
38353139323739656564623065613364346164633863343738633163383031663531663365616534
|
||||
31663835323435643463666264623932396133336531626331303862356261306238326333366164
|
||||
66306262386137363432376530366432356432653333393833376532623333373337393830316263
|
||||
30326531613662313430663130613734663937613663353936346134356537393761373238393433
|
||||
37356136393731626561303430626339386531386333386536656465646232633934393630613339
|
||||
61333163613862346564316336353766346461626639303661353464633835626663313462613666
|
||||
33343561613662303036643937656431393432333831383461323631393262346464393539353537
|
||||
33633364383261663535323136393138333739356439663731636136393530323864333566323361
|
||||
62643961323264336662316661303630636430323838633535343036303437393439656637326566
|
||||
34363832366434316639393939313965633037653931323462363465643262653539623063326432
|
||||
36616434366432303235663062663138623336336165373734353838333662363239333762323932
|
||||
65393765326232373230666437656433373930643638386131363339343630636634636434326464
|
||||
39366339326263666239646237326534383665376536313536303263373265306537316161663262
|
||||
31346635346436313261626366333738333966643333313230623133313434373530366462653435
|
||||
33353434643635383833643736653461373765326537313430353164306566323733653237343632
|
||||
66346133656333303538306133313563393363313230323664303836323861346466343230343264
|
||||
36613934643662626365653036636136623630333638373565316437646232316263663433313762
|
||||
39353234333131623731643662303130626465386338353833393533646564646565623736343039
|
||||
38356635393461353166653565336535626366396532633961393334343234353764303431303663
|
||||
61666533633731663666346132383037646433336463643062396465383034346631346165323939
|
||||
33313937343338383737373164363930336236326432346465646166363430653932333932343236
|
||||
38336235613034386533613665393666633635383164646538373035623862343737353463623730
|
||||
33396233353331633463373538326365636231323535633737303562613262613730636237336632
|
||||
38626230313637336436623661666438666538333838356632653034303864313232623337306333
|
||||
66363464643061363337393732323065306335656531376337323438313733616539613538333837
|
||||
34363033666366613933343563303537613564356462313931353533323938656362393536386334
|
||||
38336237616335346334613534323130613861663239356363366564623933303737306138613535
|
||||
63643639323135663232336131643331343063363234336230653536623765323562393161663266
|
||||
32663839613564613636343166396463366665666333306239386338616366363236393931313439
|
||||
30386238316261323630633464386265353464333735336435646663656638316130333762666531
|
||||
38626463316165373434613436343335303633643965633230326534323761616365376630363039
|
||||
30336661313737383535343934366466353231396430353030653762383934666235646161653832
|
||||
31613565643031353535353234386665373636356362653337366563316630343838626231646462
|
||||
34623262343761373831303861313661666435373565386465336166306631376666643631303863
|
||||
37633934326262623737373266326631663932373863346466613133303961386466366336643235
|
||||
39303933333236626637663636633739343761393432616232643238663738313636346137316430
|
||||
34623238326430616134396166306339626261643032613661343763366138653830376463306461
|
||||
62366564393364306139633837646264633130383064383730393862633561303538363232663366
|
||||
30343633666632303530356637646337623339303236376164633962383839386265336666396436
|
||||
38616238656336343066333063393833623862646237323238393465633662393362353161313963
|
||||
63663539383630366536313933643565346162646363353035386666396363633635386564346666
|
||||
64336362633033346461353133396363646237613433306366333064626563656637383863323361
|
||||
31386262346631343565653836333764636366313330633462303533616531316537353538313031
|
||||
64366263666138356339373864383866303632366162633738383437323564313732373738373038
|
||||
39643862336136663165343736613730306339643237313361333438613438323439373966396138
|
||||
62323661383336396636
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
# I'm currently not sure when we need to restart versus reload
|
||||
- name: reload caddy
|
||||
ansible.builtin.systemd:
|
||||
ansible.builtin.systemd_service:
|
||||
name: caddy
|
||||
state: reloaded
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
{% elif has_wordpress -%}
|
||||
root * {{ document_root }}
|
||||
encode
|
||||
{% if ansible_distribution == 'Debian' and ansible_distribution_major_version is version('12', '==') -%}
|
||||
{% if ansible_distribution_major_version is version('12', '==') -%}
|
||||
php_fastcgi unix//run/php/php8.2-fpm-{{ domain_name }}.sock
|
||||
{% endif -%}
|
||||
file_server
|
||||
|
||||
@@ -8,7 +8,7 @@ fail2ban_maxretry: 6
|
||||
fail2ban_findtime: 3600
|
||||
# 2 weeks in seconds
|
||||
fail2ban_bantime: 1209600
|
||||
fail2ban_ignoreip: 127.0.0.1/8 172.26.0.0/16 192.168.5.0/24
|
||||
fail2ban_ignoreip: 127.0.0.1/8
|
||||
|
||||
# Disable SSH passwords. Must use SSH keys. This is OK because we add the keys
|
||||
# before re-configuring the SSH daemon to disable passwords.
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
autoclean -y
|
||||
upgrade -y -o APT::Get::Show-Upgraded=true
|
||||
@@ -1,5 +0,0 @@
|
||||
# Configuration for cron-apt. For further information about the possible
|
||||
# configuration settings see the README file.
|
||||
|
||||
MAILON="never"
|
||||
OPTIONS="-o quiet=1 -o Dir::Etc::SourceList=/etc/apt/security.sources.list -o Dir::Etc::SourceParts=\"/dev/null\""
|
||||
@@ -1 +0,0 @@
|
||||
provisioning ALL=(ALL) ALL
|
||||
@@ -1,10 +1,7 @@
|
||||
[Unit]
|
||||
Description=Update FireHOL lists
|
||||
# This service will fail if nftables is not running so we use Requires to make
|
||||
# sure that nftables is started.
|
||||
Requires=nftables.service
|
||||
# Make sure the network is up and nftables is started
|
||||
After=network-online.target nftables.service
|
||||
# Make sure the network is up
|
||||
After=network-online.target
|
||||
Wants=network-online.target update-firehol-nftables.timer
|
||||
|
||||
[Service]
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
---
|
||||
# ansible.builtin.file: roles/common/handlers/main.yml
|
||||
|
||||
- name: reload sshd
|
||||
ansible.builtin.systemd:
|
||||
- name: Reload sshd
|
||||
ansible.builtin.systemd_service:
|
||||
name: "{{ sshd_service_name }}"
|
||||
state: reloaded
|
||||
|
||||
- name: reload sysctl
|
||||
command: sysctl -p /etc/sysctl.conf
|
||||
- name: Reload sysctl
|
||||
ansible.builtin.command: sysctl -p /etc/sysctl.conf
|
||||
|
||||
- name: reload systemd
|
||||
ansible.builtin.systemd:
|
||||
- name: Reload systemd
|
||||
ansible.builtin.systemd_service:
|
||||
daemon_reload: true
|
||||
|
||||
- name: restart nftables
|
||||
ansible.builtin.systemd:
|
||||
- name: Restart nftables
|
||||
ansible.builtin.systemd_service:
|
||||
name: nftables
|
||||
state: restarted
|
||||
|
||||
# 2021-09-28: note to self to keep fail2ban at the end, as handlers are executed
|
||||
# in the order they are defined, not in the order they are listed in the task's
|
||||
# notify statement and we must restart fail2ban after updating the firewall.
|
||||
- name: restart fail2ban
|
||||
ansible.builtin.systemd:
|
||||
- name: Restart fail2ban
|
||||
ansible.builtin.systemd_service:
|
||||
name: fail2ban
|
||||
state: restarted
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
---
|
||||
- name: Configure cron-apt (config)
|
||||
ansible.builtin.copy: src={{ item.src }} dest={{ item.dest }} mode={{ item.mode }} owner={{ item.owner }} group={{ item.group }}
|
||||
loop:
|
||||
- { src: etc/cron-apt/config, dest: /etc/cron-apt/config, mode: "0644", owner: root, group: root }
|
||||
- { src: etc/cron-apt/3-download, dest: /etc/cron-apt/action.d/3-download, mode: "0644", owner: root, group: root }
|
||||
- name: Remove cron-apt
|
||||
ansible.builtin.apt:
|
||||
name: cron-apt
|
||||
state: absent
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Configure cron-apt (security)
|
||||
ansible.builtin.template: src=security.sources.list.j2 dest=/etc/apt/security.sources.list mode=0644 owner=root group=root
|
||||
- name: Remove cron-apt configs
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- /etc/cron-apt/config
|
||||
- /etc/cron-apt/action.d/3-download
|
||||
- /etc/apt/security.sources.list
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
---
|
||||
- name: Install fail2ban
|
||||
when:
|
||||
- ansible_distribution_major_version is version('11', '>=')
|
||||
ansible.builtin.package:
|
||||
when: ansible_distribution_version is version('11', '>=')
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- fail2ban
|
||||
- python3-systemd
|
||||
@@ -15,7 +14,7 @@
|
||||
dest: /etc/fail2ban/jail.d/sshd.local
|
||||
owner: root
|
||||
mode: "0644"
|
||||
notify: restart fail2ban
|
||||
notify: Restart fail2ban
|
||||
|
||||
- name: Configure fail2ban nginx filter
|
||||
when:
|
||||
@@ -27,7 +26,7 @@
|
||||
dest: /etc/fail2ban/jail.d/nginx.local
|
||||
owner: root
|
||||
mode: "0644"
|
||||
notify: restart fail2ban
|
||||
notify: Restart fail2ban
|
||||
|
||||
- name: Create fail2ban service override directory
|
||||
ansible.builtin.file:
|
||||
@@ -44,11 +43,11 @@
|
||||
owner: root
|
||||
mode: "0644"
|
||||
notify:
|
||||
- reload systemd
|
||||
- restart fail2ban
|
||||
- Reload systemd
|
||||
- Restart fail2ban
|
||||
|
||||
- name: Start and enable fail2ban service
|
||||
ansible.builtin.systemd:
|
||||
ansible.builtin.systemd_service:
|
||||
name: fail2ban
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
---
|
||||
- name: Configure firewall (Debian)
|
||||
when: ansible_distribution == 'Debian'
|
||||
ansible.builtin.include_tasks:
|
||||
file: firewall_Debian.yml
|
||||
apply:
|
||||
tags:
|
||||
- firewall
|
||||
tags: firewall
|
||||
# Debian 11+ will use nftables directly, with no firewalld.
|
||||
|
||||
- name: Configure firewall (Ubuntu)
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
ansible.builtin.include_tasks:
|
||||
file: firewall_Ubuntu.yml
|
||||
apply:
|
||||
tags:
|
||||
- firewall
|
||||
tags: firewall
|
||||
- name: Install Debian firewall packages
|
||||
when: ansible_distribution_version is version('11', '>=')
|
||||
ansible.builtin.apt:
|
||||
name: nftables
|
||||
state: present
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Remove iptables on newer Debian
|
||||
when: ansible_distribution_version is version('11', '>=')
|
||||
ansible.builtin.apt:
|
||||
pkg: iptables
|
||||
state: absent
|
||||
|
||||
- name: Configure nftables
|
||||
when: ansible_distribution_version is version('11', '>=')
|
||||
ansible.builtin.include_tasks: nftables.yml
|
||||
|
||||
- name: Configure fail2ban
|
||||
when: ansible_distribution_version is version('9', '>=')
|
||||
ansible.builtin.include_tasks: fail2ban.yml
|
||||
|
||||
# vim: set sw=2 ts=2:
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
# Debian 11+ will use nftables directly, with no firewalld.
|
||||
|
||||
- name: Install Debian firewall packages
|
||||
when: ansible_distribution_major_version is version('11', '>=')
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- libnet-ip-perl # for aggregate-cidr-addresses.pl
|
||||
- nftables
|
||||
- curl # for nftables update scripts
|
||||
state: present
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Remove iptables on newer Debian
|
||||
when: ansible_distribution_major_version is version('11', '>=')
|
||||
ansible.builtin.apt:
|
||||
pkg: iptables
|
||||
state: absent
|
||||
|
||||
- name: Configure nftables
|
||||
ansible.builtin.include_tasks: nftables.yml
|
||||
when: ansible_distribution_version is version('11', '>=')
|
||||
|
||||
- ansible.builtin.include_tasks: fail2ban.yml
|
||||
when:
|
||||
- ansible_distribution_major_version is version('9', '>=')
|
||||
|
||||
# vim: set sw=2 ts=2:
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
# Ubuntu 20.04 will use nftables directly, with no firewalld.
|
||||
|
||||
- name: Install Ubuntu firewall packages
|
||||
when: ansible_distribution_version is version('20.04', '>=')
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- libnet-ip-perl # for aggregate-cidr-addresses.pl
|
||||
- nftables
|
||||
- curl # for nftables update scripts
|
||||
state: present
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Remove ufw
|
||||
ansible.builtin.package:
|
||||
name: ufw
|
||||
state: absent
|
||||
|
||||
- name: Configure nftables
|
||||
ansible.builtin.include_tasks: nftables.yml
|
||||
when: ansible_distribution_version is version('20.04', '>=')
|
||||
|
||||
- ansible.builtin.include_tasks: fail2ban.yml
|
||||
when:
|
||||
- ansible_distribution_version is version('16.04', '>=')
|
||||
|
||||
# vim: set sw=2 ts=2:
|
||||
@@ -8,13 +8,7 @@
|
||||
tags: ntp
|
||||
|
||||
- name: Install common packages
|
||||
ansible.builtin.include_tasks: packages_Debian.yml
|
||||
when: ansible_distribution == 'Debian'
|
||||
tags: packages
|
||||
|
||||
- name: Install common packages
|
||||
ansible.builtin.include_tasks: packages_Ubuntu.yml
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
ansible.builtin.include_tasks: packages.yml
|
||||
tags: packages
|
||||
|
||||
- name: Configure firewall
|
||||
@@ -28,13 +22,23 @@
|
||||
# containers identify as virtualization hosts, which makes this tricky, because we have actual Debian VM hosts!
|
||||
- name: Reconfigure /etc/sysctl.conf
|
||||
when: ansible_virtualization_role != 'host'
|
||||
ansible.builtin.template: src=sysctl_{{ ansible_distribution }}.j2 dest=/etc/sysctl.conf owner=root group=root mode=0644
|
||||
ansible.builtin.template:
|
||||
src: "sysctl_{{ ansible_distribution }}.j2"
|
||||
dest: /etc/sysctl.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify:
|
||||
- reload sysctl
|
||||
- Reload sysctl
|
||||
tags: sysctl
|
||||
|
||||
- name: Set I/O scheduler
|
||||
ansible.builtin.template: src=etc/udev/rules.d/60-scheduler.rules.j2 dest=/etc/udev/rules.d/60-scheduler.rules owner=root group=root mode=0644
|
||||
ansible.builtin.template:
|
||||
src: etc/udev/rules.d/60-scheduler.rules.j2
|
||||
dest: /etc/udev/rules.d/60-scheduler.rules
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
tags: udev
|
||||
|
||||
- name: Copy admin SSH keys
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
# Common nftables tasks for Ubuntu 20.04, Ubuntu 22.04, Ubuntu 24.04, Debian 11,
|
||||
# and Debian 12.
|
||||
# Common nftables tasks for Debian 11 and Debian 12.
|
||||
|
||||
- name: Copy nftables.conf
|
||||
ansible.builtin.template:
|
||||
@@ -9,8 +8,7 @@
|
||||
owner: root
|
||||
mode: "0644"
|
||||
notify:
|
||||
- restart nftables
|
||||
- restart fail2ban
|
||||
- Restart nftables
|
||||
|
||||
- name: Create /etc/nftables extra config directory
|
||||
ansible.builtin.file:
|
||||
@@ -21,17 +19,14 @@
|
||||
|
||||
- name: Copy extra nftables configuration files
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: /etc/nftables/{{ item.src }}
|
||||
src: firehol_level1-ipv4.nft
|
||||
dest: /etc/nftables/firehol_level1-ipv4.nft
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
force: "{{ item.force }}"
|
||||
loop:
|
||||
- { src: firehol_level1-ipv4.nft, force: false }
|
||||
force: false
|
||||
notify:
|
||||
- restart nftables
|
||||
- restart fail2ban
|
||||
- Restart nftables
|
||||
|
||||
- name: Copy nftables update scripts
|
||||
ansible.builtin.template:
|
||||
@@ -41,27 +36,6 @@
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Remove deprecated data and scripts
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- /etc/nftables/spamhaus-ipv4.nft
|
||||
- /etc/nftables/spamhaus-ipv6.nft
|
||||
- /etc/nftables/abuseipdb-ipv4.nft
|
||||
- /etc/nftables/abuseipdb-ipv6.nft
|
||||
- /etc/nftables/abusech-ipv4.nft
|
||||
- /usr/local/bin/update-abusech-nftables.sh
|
||||
- /usr/local/bin/update-spamhaus-nftables.sh
|
||||
- /etc/systemd/system/update-abusech-nftables.service
|
||||
- /etc/systemd/system/update-abusech-nftables.timer
|
||||
- /etc/systemd/system/update-spamhaus-nftables.service
|
||||
- /etc/systemd/system/update-spamhaus-nftables.timer
|
||||
- /usr/local/bin/aggregate-cidr-addresses.pl
|
||||
notify:
|
||||
- restart nftables
|
||||
- restart fail2ban
|
||||
|
||||
- name: Copy nftables systemd units
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item }}"
|
||||
@@ -76,20 +50,18 @@
|
||||
|
||||
# need to reload to pick up service/timer/environment changes
|
||||
- name: Reload systemd daemon
|
||||
ansible.builtin.systemd: # noqa no-handler
|
||||
daemon_reload: true
|
||||
when: nftables_systemd_units is changed
|
||||
ansible.builtin.systemd_service: # noqa no-handler
|
||||
daemon_reload: true
|
||||
|
||||
- name: Start and enable nftables update timers
|
||||
ansible.builtin.systemd:
|
||||
name: "{{ item }}"
|
||||
ansible.builtin.systemd_service:
|
||||
name: update-firehol-nftables.timer
|
||||
state: started
|
||||
enabled: true
|
||||
loop:
|
||||
- update-firehol-nftables.timer
|
||||
|
||||
- name: Start and enable nftables
|
||||
ansible.builtin.systemd:
|
||||
ansible.builtin.systemd_service:
|
||||
name: nftables
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
# Hosts running Ubuntu 16.04+ and Debian 9+ use systemd init system and should
|
||||
# use systemd-timesyncd as a network time client instead of the standalone ntp
|
||||
# client.
|
||||
# Hosts running Debian 9+ use systemd init system and can use systemd-timesyncd
|
||||
# as a network time client instead of the standalone ntp client.
|
||||
|
||||
- name: Set timezone
|
||||
when:
|
||||
@@ -13,18 +12,29 @@
|
||||
|
||||
# Apparently some cloud images don't have this installed by default. From what
|
||||
# I can see on existing servers, systemd-timesyncd is a standalone package on
|
||||
# Ubuntu 20.04 and Debian 11.
|
||||
# Debian 11 and Debian 12.
|
||||
- name: Install systemd-timesyncd
|
||||
when: (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('20.04', '==')) or (ansible_distribution == 'Debian' and ansible_distribution_version
|
||||
is version('11', '>='))
|
||||
ansible.builtin.apt: name=systemd-timesyncd state=present cache_valid_time=3600
|
||||
when: ansible_distribution_version is version('11', '>=')
|
||||
ansible.builtin.apt:
|
||||
name: systemd-timesyncd
|
||||
state: present
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Start and enable systemd's NTP client
|
||||
when: ansible_service_mgr == 'systemd'
|
||||
ansible.builtin.systemd: name=systemd-timesyncd state=started enabled=true
|
||||
ansible.builtin.systemd_service:
|
||||
name: systemd-timesyncd
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Uninstall ntp on modern Ubuntu/Debian
|
||||
ansible.builtin.apt: name=ntp state=absent
|
||||
when: ansible_service_mgr == 'systemd'
|
||||
# On Debian 12 ntp doesn't conflict with systemd-timesyncd so we should try to
|
||||
# remove it to be sure.
|
||||
- name: Uninstall ntp on Debian 12
|
||||
when:
|
||||
- ansible_service_mgr == 'systemd'
|
||||
- ansible_distribution_major_version is version('12', '==')
|
||||
ansible.builtin.apt:
|
||||
name: ntp
|
||||
state: absent
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
- name: Configure Debian packages
|
||||
tags: packages
|
||||
block:
|
||||
# Scaleway seems to use a weird sources.list format as of Debian 12?
|
||||
- name: Check for weird Debian sources
|
||||
@@ -8,10 +9,15 @@
|
||||
register: weird_debian_sources_stat
|
||||
|
||||
- name: Configure apt mirror
|
||||
ansible.builtin.template: src=sources.list.j2 dest=/etc/apt/sources.list owner=root group=root mode=0644
|
||||
when:
|
||||
- ansible_architecture != 'armv7l'
|
||||
- not weird_debian_sources_stat
|
||||
ansible.builtin.template:
|
||||
src: sources.list.j2
|
||||
dest: /etc/apt/sources.list
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
|
||||
- name: Set fact for base packages
|
||||
ansible.builtin.set_fact:
|
||||
@@ -22,7 +28,6 @@
|
||||
- iotop
|
||||
- htop
|
||||
- strace
|
||||
- cron-apt
|
||||
- safe-rm
|
||||
- debian-goodies
|
||||
- mosh
|
||||
@@ -34,16 +39,19 @@
|
||||
- zstd
|
||||
- rsync
|
||||
- lsof
|
||||
- unattended-upgrades
|
||||
|
||||
- name: Install base packages
|
||||
ansible.builtin.apt: name={{ base_packages }} state=present cache_valid_time=3600
|
||||
ansible.builtin.apt:
|
||||
name: "{{ base_packages }}"
|
||||
state: present
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Configure cron-apt
|
||||
ansible.builtin.import_tasks: cron-apt.yml
|
||||
- name: Remove cron-apt
|
||||
tags: cron-apt
|
||||
ansible.builtin.import_tasks: cron-apt.yml
|
||||
|
||||
- name: Install tarsnap
|
||||
ansible.builtin.import_tasks: tarsnap.yml
|
||||
tags: packages
|
||||
|
||||
# vim: set sw=2 ts=2:
|
||||
@@ -1,60 +0,0 @@
|
||||
---
|
||||
- name: Configure Ubuntu packages
|
||||
block:
|
||||
- name: Configure apt mirror
|
||||
ansible.builtin.template: src=sources.list.j2 dest=/etc/apt/sources.list owner=root group=root mode=0644
|
||||
when: ansible_architecture != 'armv7l'
|
||||
|
||||
- name: Upgrade base OS
|
||||
ansible.builtin.apt: upgrade=dist cache_valid_time=3600
|
||||
|
||||
- name: Set Ubuntu base packages
|
||||
ansible.builtin.set_fact:
|
||||
ubuntu_base_packages:
|
||||
- git
|
||||
- git-lfs
|
||||
- tmux
|
||||
- iotop
|
||||
- htop
|
||||
- strace
|
||||
- cron-apt
|
||||
- safe-rm
|
||||
- debian-goodies
|
||||
- mosh
|
||||
- python-pycurl # for ansible's apt_repository
|
||||
- vim
|
||||
- unzip
|
||||
- apt-transport-https # for https support in apt
|
||||
- zstd
|
||||
- rsync
|
||||
- lsof
|
||||
|
||||
- name: Install base packages
|
||||
ansible.builtin.apt: pkg={{ ubuntu_base_packages }} state=present cache_valid_time=3600
|
||||
|
||||
- name: Disable annoying Canonical spam in MOTD
|
||||
ansible.builtin.file: path={{ item }} mode=0644 state=absent
|
||||
loop:
|
||||
- /etc/update-motd.d/99-esm # Ubuntu 14.04
|
||||
- /etc/update-motd.d/10-help-text # Ubuntu 14.04+
|
||||
- /etc/update-motd.d/50-motd-news # Ubuntu 18.04+
|
||||
- /etc/update-motd.d/80-esm # Ubuntu 18.04+
|
||||
- /etc/update-motd.d/80-livepatch # Ubuntu 18.04+
|
||||
ignore_errors: true
|
||||
|
||||
- name: Disable annoying Canonical spam in MOTD
|
||||
ansible.builtin.systemd: name={{ item }} state=stopped enabled=no
|
||||
when: ansible_service_mgr == 'systemd'
|
||||
loop:
|
||||
- motd-news.service
|
||||
- motd-news.timer
|
||||
|
||||
- name: Configure cron-apt
|
||||
ansible.builtin.import_tasks: cron-apt.yml
|
||||
tags: cron-apt
|
||||
|
||||
- name: Install tarsnap
|
||||
ansible.builtin.import_tasks: tarsnap.yml
|
||||
tags: packages
|
||||
|
||||
# vim: set sw=2 ts=2:
|
||||
@@ -1,9 +1,11 @@
|
||||
---
|
||||
- name: Zero .ssh/authorized_keys for provisioning user
|
||||
ansible.builtin.file: dest={{ provisioning_user.home }}/.ssh/authorized_keys state=absent
|
||||
ansible.builtin.file:
|
||||
dest: "{{ provisioning_user.home }}/.ssh/authorized_keys"
|
||||
state: absent
|
||||
|
||||
- name: Add public keys to authorized_keys
|
||||
ansible.posix.authorized_key: { user: "{{ provisioning_user.name }}", key: "{{ lookup('file',item) }}" }
|
||||
ansible.posix.authorized_key: { user: "{{ provisioning_user.name }}", key: "{{ lookup('file', item) }}" }
|
||||
with_fileglob:
|
||||
# use descriptive names for keys, like: aorth-mzito-rsa.pub
|
||||
- ssh-pub-keys/*.pub
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
---
|
||||
# SSH configs don't change in Debian minor versions
|
||||
- name: Reconfigure /etc/ssh/sshd_config
|
||||
ansible.builtin.template: src=sshd_config_{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.j2 dest=/etc/ssh/sshd_config owner=root group=root
|
||||
mode=0600
|
||||
when: ansible_distribution == 'Debian'
|
||||
notify: reload sshd
|
||||
|
||||
# Ubuntu is the only distro we have where SSH version is very different from 14.04 -> 14.10,
|
||||
# ie with new ciphers supported etc.
|
||||
- name: Reconfigure /etc/ssh/sshd_config
|
||||
ansible.builtin.template: src=sshd_config_{{ ansible_distribution }}-{{ ansible_distribution_version }}.j2 dest=/etc/ssh/sshd_config owner=root group=root mode=0600
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
notify: reload sshd
|
||||
ansible.builtin.template:
|
||||
src: "sshd_config_{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.j2"
|
||||
dest: /etc/ssh/sshd_config
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
notify: Reload sshd
|
||||
|
||||
# See: WeakDH (2015): https://weakdh.org/sysadmin.html
|
||||
- name: Remove small Diffie-Hellman SSH moduli
|
||||
@@ -24,28 +20,30 @@
|
||||
register: check_unsafe_moduli
|
||||
|
||||
- name: Extract safe Diffie-Hellman SSH moduli
|
||||
when: check_unsafe_moduli.stdout | length > 0
|
||||
ansible.builtin.shell:
|
||||
cmd: awk '$5 >= 3071' moduli > moduli.safe
|
||||
chdir: /etc/ssh
|
||||
creates: moduli.safe
|
||||
when: check_unsafe_moduli.stdout | length > 0
|
||||
register: extract_safe_moduli
|
||||
|
||||
- name: Replace unsafe Diffie-Hellman SSH moduli
|
||||
when: extract_safe_moduli is changed
|
||||
ansible.builtin.command:
|
||||
cmd: mv moduli.safe moduli
|
||||
chdir: /etc/ssh
|
||||
register: replace_small_moduli
|
||||
when: extract_safe_moduli is changed
|
||||
notify: reload sshd
|
||||
notify: Reload sshd
|
||||
|
||||
- name: Remove DSA and ECDSA host keys
|
||||
ansible.builtin.file: name=/etc/ssh/{{ item }} state=absent
|
||||
ansible.builtin.file:
|
||||
name: "/etc/ssh/{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- ssh_host_dsa_key
|
||||
- ssh_host_dsa_key.pub
|
||||
- ssh_host_ecdsa_key
|
||||
- ssh_host_ecdsa_key.pub
|
||||
notify: reload sshd
|
||||
notify: Reload sshd
|
||||
|
||||
# vim: set sw=2 ts=2:
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
register: tarsnap_signing_key_stat
|
||||
|
||||
- name: Download tarsnap apt signing key
|
||||
when: not tarsnap_signing_key_stat.stat.exists
|
||||
ansible.builtin.get_url:
|
||||
url: https://pkg.tarsnap.com/tarsnap-deb-packaging-key.asc
|
||||
dest: /etc/apt/keyrings/tarsnap-deb-packaging-key.asc
|
||||
@@ -12,9 +13,9 @@
|
||||
group: root
|
||||
mode: "0644"
|
||||
register: download_tarsnap_signing_key
|
||||
when: not tarsnap_signing_key_stat.stat.exists
|
||||
|
||||
- name: Add tarsnap.org repo
|
||||
when: ansible_architecture != 'armv7l'
|
||||
ansible.builtin.template:
|
||||
src: tarsnap_sources.list.j2
|
||||
dest: /etc/apt/sources.list.d/tarsnap.list
|
||||
@@ -22,12 +23,11 @@
|
||||
group: root
|
||||
mode: "0644"
|
||||
register: add_tarsnap_apt_repository
|
||||
when: ansible_architecture != 'armv7l'
|
||||
|
||||
- name: Update apt cache
|
||||
when: (download_tarsnap_signing_key.status_code is defined and download_tarsnap_signing_key.status_code == 200) or add_tarsnap_apt_repository is changed
|
||||
ansible.builtin.apt: # noqa no-handler
|
||||
update_cache: true
|
||||
when: (download_tarsnap_signing_key.status_code is defined and download_tarsnap_signing_key.status_code == 200) or add_tarsnap_apt_repository is changed
|
||||
|
||||
- name: Install tarsnap
|
||||
ansible.builtin.apt:
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
[Unit]
|
||||
# If nftables is stopped or restarted, propagate to fail2ban as well
|
||||
PartOf=nftables.service
|
||||
|
||||
[Service]
|
||||
PrivateDevices=yes
|
||||
PrivateTmp=yes
|
||||
ProtectHome=read-only
|
||||
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version is version('18','>=')) or (ansible_distribution == 'Debian' and ansible_distribution_major_version is version('11','>=')) %}
|
||||
{% if ansible_distribution_version is version('11','>=') %}
|
||||
ProtectSystem=strict
|
||||
{% else %}
|
||||
{# Older systemd versions don't have ProtectSystem=strict #}
|
||||
ProtectSystem=full
|
||||
{% endif %}
|
||||
NoNewPrivileges=yes
|
||||
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version is version('18','>=')) or (ansible_distribution == 'Debian' and ansible_distribution_major_version is version('11','>=')) %}
|
||||
{% if ansible_distribution_version is version('11','>=') %}
|
||||
ReadWritePaths=-/var/run/fail2ban
|
||||
ReadWritePaths=-/var/lib/fail2ban
|
||||
ReadWritePaths=-/var/log/fail2ban.log
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{% if ansible_distribution == 'Ubuntu' %}
|
||||
deb http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security main restricted universe multiverse
|
||||
{% elif ansible_distribution == 'Debian' %}
|
||||
deb http://security.debian.org/debian-security {{ ansible_distribution_release }}/updates main contrib non-free
|
||||
{% endif %}
|
||||
@@ -1,16 +1,6 @@
|
||||
{% if ansible_distribution == 'Ubuntu' %}
|
||||
{% set apt_mirror = apt_mirror | default("ubuntu.mirror.ac.ke") %}
|
||||
|
||||
deb http://{{ apt_mirror }}/ubuntu/ {{ ansible_distribution_release }} main restricted universe multiverse
|
||||
deb http://{{ apt_mirror }}/ubuntu/ {{ ansible_distribution_release }}-updates main restricted universe multiverse
|
||||
deb http://security.ubuntu.com/ubuntu/ {{ ansible_distribution_release }}-security main restricted universe multiverse
|
||||
|
||||
{% else %}
|
||||
{% set apt_mirror = apt_mirror | default('deb.debian.org') %}
|
||||
deb http://{{ apt_mirror }}/debian/ {{ ansible_distribution_release }} main contrib non-free
|
||||
|
||||
deb http://security.debian.org/debian-security {{ ansible_distribution_release }}-security main contrib non-free
|
||||
|
||||
deb http://{{ apt_mirror }}/debian/ {{ ansible_distribution_release }}-updates main contrib non-free
|
||||
|
||||
{% endif %} {# ansible_distribution #}
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
|
||||
|
||||
# This is the sshd server system-wide configuration file. See
|
||||
# sshd_config(5) for more information.
|
||||
|
||||
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
|
||||
# The strategy used for options in the default sshd_config shipped with
|
||||
# OpenSSH is to specify options with their default value where
|
||||
# possible, but leave them commented. Uncommented options override the
|
||||
# default value.
|
||||
|
||||
Include /etc/ssh/sshd_config.d/*.conf
|
||||
|
||||
#Port 22
|
||||
#AddressFamily any
|
||||
#ListenAddress 0.0.0.0
|
||||
#ListenAddress ::
|
||||
|
||||
#HostKey /etc/ssh/ssh_host_rsa_key
|
||||
HostKey /etc/ssh/ssh_host_ed25519_key
|
||||
|
||||
# Ciphers and keying
|
||||
#RekeyLimit default none
|
||||
|
||||
# Logging
|
||||
#SyslogFacility AUTH
|
||||
# LogLevel VERBOSE logs user's key fingerprint on login. Needed to have a clear audit track of which key was using to log in.
|
||||
LogLevel VERBOSE
|
||||
|
||||
# Authentication:
|
||||
|
||||
#LoginGraceTime 2m
|
||||
PermitRootLogin prohibit-password
|
||||
#StrictModes yes
|
||||
MaxAuthTries 4
|
||||
#MaxSessions 10
|
||||
|
||||
#PubkeyAuthentication yes
|
||||
|
||||
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
|
||||
# but this is overridden so installations will only check .ssh/authorized_keys
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
|
||||
#AuthorizedPrincipalsFile none
|
||||
|
||||
#AuthorizedKeysCommand none
|
||||
#AuthorizedKeysCommandUser nobody
|
||||
|
||||
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
|
||||
#HostbasedAuthentication no
|
||||
# Change to yes if you don't trust ~/.ssh/known_hosts for
|
||||
# HostbasedAuthentication
|
||||
#IgnoreUserKnownHosts no
|
||||
# Don't read the user's ~/.rhosts and ~/.shosts files
|
||||
#IgnoreRhosts yes
|
||||
|
||||
# To disable tunneled clear text passwords, change to no here!
|
||||
{% if ssh_password_authentication == 'disabled' %}
|
||||
PasswordAuthentication no
|
||||
{% else %}
|
||||
PasswordAuthentication yes
|
||||
{% endif %}
|
||||
#PermitEmptyPasswords no
|
||||
|
||||
# Change to yes to enable challenge-response passwords (beware issues with
|
||||
# some PAM modules and threads)
|
||||
ChallengeResponseAuthentication no
|
||||
|
||||
# Kerberos options
|
||||
#KerberosAuthentication no
|
||||
#KerberosOrLocalPasswd yes
|
||||
#KerberosTicketCleanup yes
|
||||
#KerberosGetAFSToken no
|
||||
|
||||
# GSSAPI options
|
||||
#GSSAPIAuthentication no
|
||||
#GSSAPICleanupCredentials yes
|
||||
#GSSAPIStrictAcceptorCheck yes
|
||||
#GSSAPIKeyExchange no
|
||||
|
||||
# Set this to 'yes' to enable PAM authentication, account processing,
|
||||
# and session processing. If this is enabled, PAM authentication will
|
||||
# be allowed through the ChallengeResponseAuthentication and
|
||||
# PasswordAuthentication. Depending on your PAM configuration,
|
||||
# PAM authentication via ChallengeResponseAuthentication may bypass
|
||||
# the setting of "PermitRootLogin without-password".
|
||||
# If you just want the PAM account and session checks to run without
|
||||
# PAM authentication, then enable this but set PasswordAuthentication
|
||||
# and ChallengeResponseAuthentication to 'no'.
|
||||
UsePAM yes
|
||||
|
||||
#AllowAgentForwarding yes
|
||||
#AllowTcpForwarding yes
|
||||
#GatewayPorts no
|
||||
X11Forwarding no
|
||||
#X11DisplayOffset 10
|
||||
#X11UseLocalhost yes
|
||||
#PermitTTY yes
|
||||
PrintMotd no
|
||||
#PrintLastLog yes
|
||||
#TCPKeepAlive yes
|
||||
#PermitUserEnvironment no
|
||||
#Compression delayed
|
||||
#ClientAliveInterval 0
|
||||
#ClientAliveCountMax 3
|
||||
#UseDNS no
|
||||
#PidFile /var/run/sshd.pid
|
||||
#MaxStartups 10:30:100
|
||||
#PermitTunnel no
|
||||
#ChrootDirectory none
|
||||
#VersionAddendum none
|
||||
|
||||
# no default banner path
|
||||
#Banner none
|
||||
|
||||
# Allow client to pass locale environment variables
|
||||
AcceptEnv LANG LC_*
|
||||
|
||||
# override default of no subsystems
|
||||
Subsystem sftp /usr/lib/openssh/sftp-server
|
||||
|
||||
# Example of overriding settings on a per-user basis
|
||||
#Match User anoncvs
|
||||
# X11Forwarding no
|
||||
# AllowTcpForwarding no
|
||||
# PermitTTY no
|
||||
# ForceCommand cvs server
|
||||
|
||||
# Originally from: https://stribika.github.io/2015/01/04/secure-secure-shell.html
|
||||
# ... but with ciphers and MACs with < 256 bits removed, as NSA's Suite B now
|
||||
# does away with these! See: https://www.nsa.gov/ia/programs/suiteb_cryptography/index.shtml
|
||||
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes256-ctr
|
||||
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com
|
||||
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
|
||||
|
||||
{% if ssh_allowed_users is defined and ssh_allowed_users %}
|
||||
# Is there a list of allowed users?
|
||||
# Is it populated? (An empty list is 'None', which evaluates as False in Python)
|
||||
# merge the items of a list into one string using a space as a separator
|
||||
# http://jinja.pocoo.org/docs/dev/templates/#join
|
||||
AllowUsers {{ ssh_allowed_users|join(" ") }} {{ provisioning_user.name }}
|
||||
{% endif %}
|
||||
@@ -1,100 +0,0 @@
|
||||
#
|
||||
# /etc/sysctl.conf - Configuration file for setting system variables
|
||||
# See /etc/sysctl.d/ for additional system variables
|
||||
# See sysctl.conf (5) for information.
|
||||
#
|
||||
|
||||
#kernel.domainname = example.com
|
||||
|
||||
# Uncomment the following to stop low-level messages on console
|
||||
#kernel.printk = 3 4 1 3
|
||||
|
||||
##############################################################3
|
||||
# Functions previously found in netbase
|
||||
#
|
||||
|
||||
# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
|
||||
# Turn on Source Address Verification in all interfaces to
|
||||
# prevent some spoofing attacks
|
||||
#net.ipv4.conf.default.rp_filter=1
|
||||
#net.ipv4.conf.all.rp_filter=1
|
||||
|
||||
# Uncomment the next line to enable TCP/IP SYN cookies
|
||||
# See http://lwn.net/Articles/277146/
|
||||
# Note: This may impact IPv6 TCP sessions too
|
||||
#net.ipv4.tcp_syncookies=1
|
||||
|
||||
# Uncomment the next line to enable packet forwarding for IPv4
|
||||
#net.ipv4.ip_forward=1
|
||||
|
||||
# Uncomment the next line to enable packet forwarding for IPv6
|
||||
# Enabling this option disables Stateless Address Autoconfiguration
|
||||
# based on Router Advertisements for this host
|
||||
#net.ipv6.conf.all.forwarding=1
|
||||
|
||||
|
||||
###################################################################
|
||||
# Additional settings - these settings can improve the network
|
||||
# security of the host and prevent against some network attacks
|
||||
# including spoofing attacks and man in the middle attacks through
|
||||
# redirection. Some network environments, however, require that these
|
||||
# settings are disabled so review and enable them as needed.
|
||||
#
|
||||
# Do not accept ICMP redirects (prevent MITM attacks)
|
||||
#net.ipv4.conf.all.accept_redirects = 0
|
||||
#net.ipv6.conf.all.accept_redirects = 0
|
||||
# _or_
|
||||
# Accept ICMP redirects only for gateways listed in our default
|
||||
# gateway list (enabled by default)
|
||||
# net.ipv4.conf.all.secure_redirects = 1
|
||||
#
|
||||
# Do not send ICMP redirects (we are not a router)
|
||||
#net.ipv4.conf.all.send_redirects = 0
|
||||
#
|
||||
# Do not accept IP source route packets (we are not a router)
|
||||
#net.ipv4.conf.all.accept_source_route = 0
|
||||
#net.ipv6.conf.all.accept_source_route = 0
|
||||
#
|
||||
# Log Martian Packets
|
||||
#net.ipv4.conf.all.log_martians = 1
|
||||
#
|
||||
|
||||
# CIS Benchmark Adjustments
|
||||
# See: https://github.com/alanorth/securekickstarts
|
||||
kernel.randomize_va_space = 2
|
||||
net.ipv4.ip_forward = 0
|
||||
net.ipv4.conf.all.send_redirects = 0
|
||||
net.ipv4.conf.default.send_redirects = 0
|
||||
net.ipv4.conf.all.accept_source_route = 0
|
||||
net.ipv4.conf.default.accept_source_route = 0
|
||||
net.ipv4.conf.all.accept_redirects = 0
|
||||
net.ipv4.conf.default.accept_redirects = 0
|
||||
net.ipv4.conf.all.secure_redirects = 0
|
||||
net.ipv4.conf.default.secure_redirects = 0
|
||||
net.ipv4.conf.all.log_martians = 1
|
||||
net.ipv4.conf.default.log_martians = 1
|
||||
net.ipv4.icmp_echo_ignore_broadcasts = 1
|
||||
net.ipv4.icmp_ignore_bogus_error_responses = 1
|
||||
net.ipv4.conf.all.rp_filter = 1
|
||||
net.ipv4.conf.default.rp_filter = 1
|
||||
net.ipv4.tcp_syncookies = 1
|
||||
|
||||
# TCP stuff
|
||||
# See: http://fasterdata.es.net/host-tuning/linux/
|
||||
# increase TCP max buffer size settable using setsockopt()
|
||||
net.core.rmem_max = 16777216
|
||||
net.core.wmem_max = 16777216
|
||||
# increase Linux autotuning TCP buffer limit
|
||||
net.ipv4.tcp_rmem = 4096 87380 16777216
|
||||
net.ipv4.tcp_wmem = 4096 65536 16777216
|
||||
# increase the length of the processor input queue
|
||||
net.core.netdev_max_backlog = 30000
|
||||
# recommended for hosts with jumbo frames enabled
|
||||
#net.ipv4.tcp_mtu_probing=1
|
||||
|
||||
# increase quadruplets (src ip, src port, dest ip, dest port)
|
||||
# see: http://vincent.bernat.im/en/blog/2014-tcp-time-wait-state-linux.html
|
||||
net.ipv4.ip_local_port_range = 10240 65535
|
||||
# recommended for web servers, especially if running SPDY
|
||||
# see: http://www.chromium.org/spdy/spdy-best-practices
|
||||
net.ipv4.tcp_slow_start_after_idle = 0
|
||||
@@ -58,8 +58,8 @@ NFT_HEAD
|
||||
rm -f "$firehol_level1_ipv4_list_temp" "$firehol_level1_ipv4_set_temp"
|
||||
fi
|
||||
|
||||
echo "Reloading nftables"
|
||||
echo "Restarting nftables"
|
||||
|
||||
/usr/bin/systemctl reload nftables.service
|
||||
/usr/bin/systemctl restart nftables.service
|
||||
|
||||
rm -v firehol_level1.netset
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
---
|
||||
- name: restart mariadb
|
||||
ansible.builtin.systemd: name=mariadb state=restarted
|
||||
ansible.builtin.systemd_service:
|
||||
name: mariadb
|
||||
state: restarted
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
- mariadb
|
||||
|
||||
- name: Download MariaDB package signing key
|
||||
when: not mariadb_signing_key_stat.stat.exists
|
||||
ansible.builtin.get_url:
|
||||
url: https://mariadb.org/mariadb_release_signing_key.asc
|
||||
dest: /etc/apt/keyrings/mariadb_release_signing_key.asc
|
||||
@@ -23,7 +24,6 @@
|
||||
group: root
|
||||
mode: "0644"
|
||||
register: download_mariadb_signing_key
|
||||
when: not mariadb_signing_key_stat.stat.exists
|
||||
tags:
|
||||
- packages
|
||||
- mariadb
|
||||
@@ -40,9 +40,9 @@
|
||||
- mariadb
|
||||
|
||||
- name: Update apt cache
|
||||
when: (download_mariadb_signing_key.status_code is defined and download_mariadb_signing_key.status_code == 200) or add_mariadb_apt_repository is changed
|
||||
ansible.builtin.apt: # noqa no-handler
|
||||
update_cache: true
|
||||
when: (download_mariadb_signing_key.status_code is defined and download_mariadb_signing_key.status_code == 200) or add_mariadb_apt_repository is changed
|
||||
tags:
|
||||
- packages
|
||||
- mariadb
|
||||
@@ -87,16 +87,17 @@
|
||||
|
||||
# See: https://docs.ansible.com/ansible/latest/collections/community/mysql/mysql_db_module.html
|
||||
- name: Create MariaDB database(s)
|
||||
when: mariadb_databases is defined
|
||||
community.mysql.mysql_db:
|
||||
db: "{{ item.name }}"
|
||||
state: present
|
||||
encoding: utf8mb4
|
||||
login_unix_socket: "{{ mariadb_login_unix_socket }}"
|
||||
loop: "{{ mariadb_databases }}"
|
||||
when: mariadb_databases is defined
|
||||
tags: mariadb
|
||||
|
||||
- name: Create MariaDB user(s)
|
||||
when: mariadb_databases is defined
|
||||
community.mysql.mysql_user:
|
||||
name: "{{ item.user }}"
|
||||
password: "{{ item.pass }}"
|
||||
@@ -105,7 +106,6 @@
|
||||
state: present
|
||||
login_unix_socket: "{{ mariadb_login_unix_socket }}"
|
||||
loop: "{{ mariadb_databases }}"
|
||||
when: mariadb_databases is defined
|
||||
tags: mariadb
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
# ansible.builtin.file: roles/munin/handlers/main.yml
|
||||
- name: restart munin-node
|
||||
ansible.builtin.systemd: name=munin-node state=restarted
|
||||
ansible.builtin.systemd_service: name=munin-node state=restarted
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
---
|
||||
- name: Install munin-node
|
||||
ansible.builtin.apt: name=munin-node state=present
|
||||
ansible.builtin.apt:
|
||||
name: munin-node
|
||||
state: present
|
||||
tags: packages
|
||||
|
||||
# some nice things to have for munin-node on Ubuntu
|
||||
# libwww-perl: for munin's nginx_status check
|
||||
- name: Install munin-node deps
|
||||
ansible.builtin.apt: name=libwww-perl state=present
|
||||
ansible.builtin.apt:
|
||||
name: libwww-perl
|
||||
state: present
|
||||
tags: packages
|
||||
|
||||
- name: Create munin-node.conf
|
||||
ansible.builtin.template: src=munin-node.conf.j2 dest=/etc/munin/munin-node.conf
|
||||
ansible.builtin.template:
|
||||
src: munin-node.conf.j2
|
||||
dest: /etc/munin/munin-node.conf
|
||||
notify:
|
||||
- restart munin-node
|
||||
|
||||
@@ -20,6 +26,9 @@
|
||||
- restart munin-node
|
||||
|
||||
- name: Start munin-node
|
||||
ansible.builtin.systemd: name=munin-node state=started enabled=true
|
||||
ansible.builtin.systemd_service:
|
||||
name: munin-node
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
---
|
||||
- name: Install munin package
|
||||
ansible.builtin.apt: name=munin state=present
|
||||
ansible.builtin.apt:
|
||||
name: munin
|
||||
state: present
|
||||
tags: packages
|
||||
|
||||
- name: Create munin configuration file
|
||||
ansible.builtin.template: src=munin.conf.j2 dest=/etc/munin/munin.conf owner=root group=root mode=0644
|
||||
ansible.builtin.template:
|
||||
src: munin.conf.j2
|
||||
dest: /etc/munin/munin.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
---
|
||||
- name: reload nginx
|
||||
ansible.builtin.systemd: name=nginx state=reloaded
|
||||
- name: Reload nginx
|
||||
ansible.builtin.systemd_service:
|
||||
name: nginx
|
||||
state: reloaded
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
---
|
||||
# Use acme.sh instead of certbot because they only support installation via
|
||||
# snap now.
|
||||
- block:
|
||||
- name: Install and configure Let's Encrypt
|
||||
tags: letsencrypt
|
||||
when:
|
||||
- ansible_distribution == 'Debian'
|
||||
- ansible_distribution_version is version('11', '>='))
|
||||
block:
|
||||
- name: Remove certbot
|
||||
ansible.builtin.apt:
|
||||
name: certbot
|
||||
@@ -21,31 +26,31 @@
|
||||
register: acme_home
|
||||
|
||||
- name: Download acme.sh
|
||||
when: not acme_home.stat.exists
|
||||
ansible.builtin.get_url:
|
||||
url: https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh
|
||||
dest: "{{ letsencrypt_acme_script_temp }}"
|
||||
mode: "0700"
|
||||
register: acme_download
|
||||
when: not acme_home.stat.exists
|
||||
|
||||
# Run the "install" for acme.sh so it creates the .acme.sh dir (currently I
|
||||
# have to chdir to the /root directory where the script exists or else it
|
||||
# fails. Ansible runs it, but the script can't find itself...).
|
||||
- name: Install acme.sh
|
||||
when: acme_download is changed
|
||||
ansible.builtin.command:
|
||||
cmd: "{{ letsencrypt_acme_script_temp }} --install --no-profile --no-cron"
|
||||
creates: "{{ letsencrypt_acme_home }}/acme.sh"
|
||||
chdir: /root
|
||||
register: acme_install
|
||||
when: acme_download is changed
|
||||
|
||||
- name: Remove temporary acme.sh script
|
||||
ansible.builtin.file:
|
||||
dest: "{{ letsencrypt_acme_script_temp }}"
|
||||
state: absent
|
||||
when:
|
||||
- acme_install.rc is defined
|
||||
- acme_install.rc == 0
|
||||
ansible.builtin.file:
|
||||
dest: "{{ letsencrypt_acme_script_temp }}"
|
||||
state: absent
|
||||
|
||||
- name: Set default certificate authority for acme.sh
|
||||
ansible.builtin.command:
|
||||
@@ -77,14 +82,10 @@
|
||||
|
||||
# always issues daemon-reload just in case the service/timer changed
|
||||
- name: Start and enable systemd timer to renew Let's Encrypt certs
|
||||
ansible.builtin.systemd:
|
||||
ansible.builtin.systemd_service:
|
||||
name: renew-letsencrypt.timer
|
||||
state: started
|
||||
enabled: true
|
||||
daemon_reload: true
|
||||
|
||||
when: (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('20.04', '==')) or (ansible_distribution == 'Debian' and ansible_distribution_version
|
||||
is version('11', '>='))
|
||||
tags: letsencrypt
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
- packages
|
||||
|
||||
- name: Update apt cache
|
||||
when: (download_nginx_signing_key.status_code is defined and download_nginx_signing_key.status_code == 200) or add_nginx_apt_repository is changed
|
||||
ansible.builtin.apt: # noqa no-handler
|
||||
update_cache: true
|
||||
when: (download_nginx_signing_key.status_code is defined and download_nginx_signing_key.status_code == 200) or add_nginx_apt_repository is changed
|
||||
|
||||
- name: Install nginx
|
||||
ansible.builtin.apt:
|
||||
@@ -54,7 +54,7 @@
|
||||
owner: root
|
||||
group: root
|
||||
notify:
|
||||
- reload nginx
|
||||
- Reload nginx
|
||||
tags: nginx
|
||||
|
||||
- name: Copy extra nginx configs
|
||||
@@ -68,7 +68,7 @@
|
||||
- extra-security.conf
|
||||
- fastcgi_cache
|
||||
notify:
|
||||
- reload nginx
|
||||
- Reload nginx
|
||||
tags: nginx
|
||||
|
||||
- name: Remove default nginx vhost
|
||||
@@ -87,13 +87,13 @@
|
||||
tags: nginx
|
||||
|
||||
- name: Configure nginx virtual hosts
|
||||
ansible.builtin.include_tasks: vhosts.yml
|
||||
when: nginx_vhosts is defined
|
||||
ansible.builtin.include_tasks: vhosts.yml
|
||||
tags: nginx
|
||||
|
||||
- name: Configure WordPress
|
||||
ansible.builtin.include_tasks: wordpress.yml
|
||||
when: nginx_vhosts is defined
|
||||
ansible.builtin.include_tasks: wordpress.yml
|
||||
tags: wordpress
|
||||
|
||||
- name: Configure blank nginx vhost
|
||||
@@ -104,7 +104,7 @@
|
||||
owner: root
|
||||
group: root
|
||||
notify:
|
||||
- reload nginx
|
||||
- Reload nginx
|
||||
tags: nginx
|
||||
|
||||
- name: Configure munin vhost
|
||||
@@ -115,11 +115,11 @@
|
||||
owner: root
|
||||
group: root
|
||||
notify:
|
||||
- reload nginx
|
||||
- Reload nginx
|
||||
tags: nginx
|
||||
|
||||
- name: Start and enable nginx service
|
||||
ansible.builtin.systemd:
|
||||
ansible.builtin.systemd_service:
|
||||
name: nginx
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
---
|
||||
- block:
|
||||
- name: Configure https vhosts
|
||||
tags: nginx
|
||||
block:
|
||||
- name: Configure https vhosts
|
||||
ansible.builtin.template: src=vhost.conf.j2 dest={{ nginx_confd_path }}/{{ item.domain_name }}.conf mode=0644 owner=root group=root
|
||||
ansible.builtin.template:
|
||||
src: vhost.conf.j2
|
||||
dest: "{{ nginx_confd_path }}/{{ item.domain_name }}.conf"
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
loop: "{{ nginx_vhosts }}"
|
||||
notify:
|
||||
- reload nginx
|
||||
- Reload nginx
|
||||
|
||||
- name: Generate self-signed TLS cert
|
||||
ansible.builtin.command: openssl req -x509 -nodes -sha256 -days 365 -subj "/C=SO/ST=SO/L=snakeoil/O=snakeoil/CN=snakeoil" -newkey rsa:2048 -keyout /etc/ssl/private/nginx-snakeoil.key
|
||||
-out /etc/ssl/certs/nginx-snakeoil.crt -extensions v3_ca creates=/etc/ssl/certs/nginx-snakeoil.crt
|
||||
notify:
|
||||
- reload nginx
|
||||
- Reload nginx
|
||||
|
||||
- name: Download 4096-bit RFC 7919 dhparams
|
||||
ansible.builtin.get_url:
|
||||
@@ -18,12 +25,16 @@
|
||||
checksum: sha256:64852d6890ff9e62eecd1ee89c72af9af244dfef5b853bcedea3dfd7aade22b3
|
||||
dest: "{{ nginx_ssl_dhparam }}"
|
||||
notify:
|
||||
- reload nginx
|
||||
- Reload nginx
|
||||
|
||||
# TODO: this could break because we can override the document root in host vars
|
||||
- name: Create vhost document roots
|
||||
ansible.builtin.file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory mode=0755 owner=nginx group=nginx
|
||||
ansible.builtin.file:
|
||||
path: "{{ nginx_root_prefix }}/{{ item.domain_name }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
owner: nginx
|
||||
group: nginx
|
||||
loop: "{{ nginx_vhosts }}"
|
||||
tags: nginx
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
||||
@@ -1,19 +1,29 @@
|
||||
---
|
||||
- block:
|
||||
- name: Install and configure WordPress
|
||||
tags: wordpress
|
||||
block:
|
||||
- name: Install WordPress
|
||||
ansible.builtin.git: repo=https://github.com/WordPress/WordPress.git dest={{ nginx_root_prefix }}/{{ item.domain_name }}/wordpress version={{ item.wordpress_version
|
||||
}} depth=1 force=true
|
||||
when:
|
||||
- item.has_wordpress is defined
|
||||
- item.has_wordpress
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/WordPress/WordPress.git
|
||||
dest: "{{ nginx_root_prefix }}/{{ item.domain_name }}/wordpress"
|
||||
version: "{{ item.wordpress_version }}"
|
||||
depth: 1
|
||||
force: true
|
||||
loop: "{{ nginx_vhosts }}"
|
||||
|
||||
- name: Fix WordPress directory permissions
|
||||
ansible.builtin.file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory owner=nginx group=nginx recurse=true
|
||||
when:
|
||||
- item.has_wordpress is defined
|
||||
- item.has_wordpress
|
||||
ansible.builtin.file:
|
||||
path: "{{ nginx_root_prefix }}/{{ item.domain_name }}"
|
||||
state: directory
|
||||
owner: nginx
|
||||
group: nginx
|
||||
recurse: true
|
||||
loop: "{{ nginx_vhosts }}"
|
||||
tags: wordpress
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
{% if ansible_distribution == 'Ubuntu' %}
|
||||
|
||||
{% if nginx_version == "stable" %}
|
||||
deb [arch=amd64 signed-by=/usr/share/keyrings/nginx_signing.key] https://nginx.org/packages/ubuntu/ {{ ansible_distribution_release }} nginx
|
||||
{% elif nginx_version == "mainline" %}
|
||||
deb [arch=amd64 signed-by=/usr/share/keyrings/nginx_signing.key] https://nginx.org/packages/mainline/ubuntu/ {{ ansible_distribution_release }} nginx
|
||||
{% endif %}
|
||||
|
||||
{% elif ansible_distribution == 'Debian' %}
|
||||
|
||||
{% if nginx_version == "stable" %}
|
||||
deb [arch=amd64 signed-by=/usr/share/keyrings/nginx_signing.key] https://nginx.org/packages/debian/ {{ ansible_distribution_release }} nginx
|
||||
{% elif nginx_version == "mainline" %}
|
||||
deb [arch=amd64 signed-by=/usr/share/keyrings/nginx_signing.key] https://nginx.org/packages/mainline/debian/ {{ ansible_distribution_release }} nginx
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -77,7 +77,7 @@ server {
|
||||
# See: https://httpoxy.org/
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
|
||||
{% if ansible_distribution == 'Debian' and ansible_distribution_major_version is version('12', '==') %}
|
||||
{% if ansible_distribution_major_version is version('12', '==') %}
|
||||
fastcgi_pass unix:/run/php/php8.2-fpm-{{ domain_name }}.sock;
|
||||
{% endif %}
|
||||
fastcgi_index index.php;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
# For Debian 12
|
||||
- name: reload php8.2-fpm
|
||||
ansible.builtin.systemd:
|
||||
- name: Reload php8.2-fpm
|
||||
ansible.builtin.systemd_service:
|
||||
name: php8.2-fpm
|
||||
state: reloaded
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
---
|
||||
- block:
|
||||
- name: Install and configure php-fpm
|
||||
tags: php-fpm
|
||||
when: install_php
|
||||
block:
|
||||
- name: Set php-fpm packages
|
||||
ansible.builtin.set_fact:
|
||||
php_fpm_packages:
|
||||
@@ -26,13 +29,13 @@
|
||||
mode: "0644"
|
||||
loop: "{{ nginx_vhosts }}"
|
||||
when: (item.has_wordpress is defined and item.has_wordpress) or (item.needs_php is defined and item.needs_php)
|
||||
notify: reload php8.2-fpm
|
||||
notify: Reload php8.2-fpm
|
||||
|
||||
- name: Remove default www pool
|
||||
ansible.builtin.file:
|
||||
path: /etc/php/8.2/fpm/pool.d/www.conf
|
||||
state: absent
|
||||
notify: reload php8.2-fpm
|
||||
notify: Reload php8.2-fpm
|
||||
|
||||
# re-configure php.ini
|
||||
- name: Update php.ini
|
||||
@@ -42,9 +45,6 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify: reload php8.2-fpm
|
||||
|
||||
tags: php-fpm
|
||||
when: install_php
|
||||
notify: Reload php8.2-fpm
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
|
||||
# sshd service name is `ssh` on Debian/Ubuntu, but it's
|
||||
# `sshd` on CentOS
|
||||
sshd_service_name: ssh
|
||||
|
||||
# provisioning user vars
|
||||
provisioning_user: { name: 'provisioning', home: '/home/provisioning' }
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
Reference in New Issue
Block a user