imfreedom/ansible

Add vigil as our new status page.

2021-07-07, Gary Kramlich
fad77591ea2e
Parents a9e5db611879
Children 188cd7f859ca
Add vigil as our new status page.
--- a/inventories/pidgin/hosts.yaml Sun May 23 03:00:06 2021 -0500
+++ b/inventories/pidgin/hosts.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -8,5 +8,9 @@
hosts:
dodo.pidgin.im:
ansible_users: root
+ status_page_servers:
+ hosts:
+ dodo.pidgin.im:
+ ansible_users: root
vars:
ansible_python_interpreter: /usr/bin/python3
--- a/inventories/pidgin/vault.yaml Sun May 23 03:00:06 2021 -0500
+++ b/inventories/pidgin/vault.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -1,74 +1,84 @@
$ANSIBLE_VAULT;1.1;AES256
-66613666366631626565363230333264353731373831353333323864626164623562653734626439
-6234636465643363656432616234626636313166653533360a663434653139373332623039323664
-64363634373463376130356461643065623537336237383265636130616430613866643238346330
-6666306261353231660a353564613331306265316236393564303838633363633161333962306464
-34666466313861316639386133313732666633353966393265646434303362343165633461363338
-64303465326339363438326265663732303665346330313766303731363966306238633534626532
-33663130343135393831653565643730633966613263643336643233633565643034656336303964
-39323838326231663537646131613039656631643663343264653638623637313532613039356436
-38356261343536336330643566333633326465376534336635636562353637323666343735663363
-65663833643266656137653634303666653539353564636432363262623565393036613332386136
-63323336363831636539396336393130643431393963663535303161343862383664323233616535
-30646166653538653734656165656637393733323434353361303633313566653433313263356238
-39383364363165363630313935306234626539393438303330643338616536313336613038373266
-32333532383836346562353261383138333565636239343930363265313364393065643063383931
-35383539623764353632643339643131343738356235616331613961623737393761316365366266
-37646633643237656434356437616539633764366163343830353136383430333234616266366663
-30343561663235646230386631363538616437626232366666663930666165646161333363306537
-61666138393863386265363062383035643734646631373865653739623165656533303438336161
-37306434616531383261653435323461336565303966366465363666326563363033323364323735
-38383262376364633132323136633238653732336361323630663965626438653765643961343236
-65346666616437616234336438393865346534613864666336313163626366356135656161376635
-30396363666338633138653530636536313338633964313063326164393339383233313636336330
-62613434626337326336333964383265323562663266393430616365656537333137646163386639
-30363733623839663238663937376334613336633135346632343861356632613334393432353062
-30333164356162396238343262323064653134626238653066373165326666623863353333656433
-65643134316563653561663930633263346266346130326636353233613566613432666366616536
-63356263653161316239666364346261623864393036666461366433356536323663326432663738
-65303130653935346538623661663236636639373362616631303130653530346464346232376162
-31333266366165633936323530313335393561653132613637656338343836616434343464386637
-37623434313738626136303633623764343332633235333635373530396433323334613838363965
-62656431316231333332363539316534383664366261663663306664333038386534333135656636
-63626262373464393736373539356337336162346361353536643037386164346637396236326536
-62356538316431616464336564623734393563373665383232306462643666363137636261616538
-62656563346565333566326466303838646661626334306634303630336163663663323637373965
-64366237306438363461333835316363356339643233376461353961613238363738306362636565
-39323665613632303332353039646461303331613338363938653637623561623333613632316663
-39663762613337666665653964393239653466666261616637643030313765303735373164613934
-34356262393263393731656233616236303564383538343534333936613332663135356634343339
-31643431336366363339346464343835623939323437363266323735313564386437323131663032
-31656161653462356363613164663039346438313935643535656630356631323062343837386164
-61336233366633663030373663316539653632383533346632376338316330313037613562643863
-38626136346163643063306637326333653762656133383963323334636339336262346165373361
-66313135376633663637653634336137366133666433623961323761623133383537633033323133
-34346665376235633432653963363538626635653338363461313032356332303832623830663565
-31313031626339373166633566323138613830346562323734353166623238663334633061376463
-39396631303962643361626261306137323230363662653261333236616536623735646164343366
-35353632333239333937336230313165613338393235306265613937316366656233373763306363
-66623139313933643635336138396631633030666564653966363838386435323635666635643062
-34303533653136316635383034366463393965326334373965316266343135333465333839623163
-39376635653335313233633132666633313030373733356536653834343237626339623232313865
-39653435353634613336333565366132653963303634306537666137663239373438323236313238
-62306137653632306437353463336166383563643463653935323330653165616535346535623661
-36353566653561616136663565323634353232396162666165373636353532326166363534646634
-32346564613637333036333963373533363132393831336566653031333966376262353437353436
-33653730316139303435303932346634393065616166323963383731343961633638306630316639
-63386564346564363732363062386430393737653861646632616238343839633337326331313562
-64376233643262616362306537656535643666666566653933636566626331383139343635373161
-32346466303536333937326665646635346430633833623330306337366466383630633965643535
-37613632353231376339376162363063383662613734653333376632613763353466623833303336
-36623264306566666535333831623030303663316237666233356561393937376465316162396338
-39356431633165653231326566323539636235666634633363626263646163663232306664663466
-66313339396237623735666661633166346432326136373939646363353862616464333937316337
-33643139653734643332643564393132386330326363373134326137616539366362373162373861
-35393235333435343438613732323636316464383766393636653663633230333334373335636434
-31363737303763613661666361333231346536356630626663623831396235623533656237313462
-62303632363533616665323735323662323036666464376137666338363364613162393332326361
-65666338616230333963393139633966303831313464306537333431383034373434623033393565
-38346139643561353762343537373436633739326666656466626664333763313466633036333265
-35376237663136343937633062396463393837343164623730313438613066333832656262363535
-33323331306364373463663662396134343761333463656463653734376434626534633631323731
-65316562643735626332666535656537316233363633373036323534343766316365393338653835
-61313230303235393732626334343463333161633532323064643338626364366636303331363663
-3734
+36323432383361303861313239653662666433363466636435336465393064353663643131393563
+3339363438633266393830303265303032653733353366360a633563343464323239366331656535
+30386434353637393461653564313630663335363638343330666638643733343564363632633131
+3433316165303331390a376566643034383261636634623036666632303161306364666338313435
+35653463663131393365316534356338623562333034353430373466316261666138343830613232
+34333232373365653835626534396538313033313264613033353835613132643361643934613663
+63653732616237393238613435336630616666303561663064643732323866383262323766393536
+31353038336164366466653733633939613735313333346661316336616330396635313262373562
+30393336393266303864616361303766366634323234363931326439353131396239653333303530
+39653032373662623962303130633334643262393432353166386134353862366132313361393563
+38333336633861666461626331343461346662383861616232333161303038636666393161326432
+62393031386532356633653531366137346134313461386665393962316562343833303338343265
+33613030393962623665383965393737636565623563393635386366353963656236363438303436
+30373235643866363131346266646265323662373938623161313437326463643665356362613935
+66343030343162306364383463323038383531663362353739633837326635326130303131663565
+61346232303066353463666662643337323966363732303837366365343366616563373464636139
+31303938366633303136626334346165633063373439386339393638366536653861613062303062
+63386139303639666634363736666363396166663231346435306130613330323961326632313862
+38303235623636316234393435393034306136303530393837383835363835623036653363306432
+37396566333832393461373330343166623237663731623533323532373032393437373062346462
+34636638376166373962383636626635336461663662663362363633663563646265653061343436
+62386665313330353432663166656439653931663366626438303335383461643362663434303339
+64636338623839373363616339306564663436326531663930326539613333386237626638363062
+65613565386438663337353234353537643163396661336465376636386162303833663436313735
+37363036613862366133306639613733366364386632333566316265333965323762626639383735
+65656136623261653361353133386532393833393962613139303235303864616361343035613133
+66356637666434303135623536366237343264353533633433646565316365396337646565373362
+38616263356463613664363733633730323761323635656330663633373564393163326662363132
+61623738366537313634303362393231326535643630626337636533346166666563386666306666
+38653735656534363534313230313933646633353765623162663538343039303739336163346366
+61386666646238396130633635613238373333303836316434333536373333373366343133386633
+66393631313763666634666538663135663163643530396535653161333138646433316533386533
+64303530613533333731386234363630336535313139393766373366323261356132356636316135
+61393536383534613632303763313334393238663364383332383631666232386339326461386434
+39363736653961373064346364396434316163343735333461336137386666363634396563636239
+38353434656135393864336566643765363936383663363437653261306462353561316530393664
+32663635383933396634376430363462663464366538303839376564333738623763343037336161
+61626535616234306365393265613435383431306363393337363964636439666533383164323864
+31306133383533633462306433366332333165646434646163306363396332653435303336366337
+39316538623538663566353230633032633363386432386564393139656563663934373663313962
+63636436653863323866303032626638363465393264643563303834353932633535663833313332
+62383063386465373665646262313239623330343035663134373666336335333662633637313638
+64383331616339373261393233393466376631376639353833666635373365623732303333333030
+65383163323666336139343166666533306363353336313563626332633164373430633033323238
+33306331346166323535653565366162613233306536313163636334633161303235386231653837
+63666637653563393333333333613765656535316333646263666561346434616431616135356132
+30626438306139363039663365646461653864663435393264623034366531316566323637333632
+39613137376530306235663330666233323866363835633431333362323064643735646338303235
+31653565626636323263353739323031343262316335386338346533396233623964343830633261
+39343333333232326339306537616433623566373937373266663731346561313332363635643031
+38333966393132333433346236343936623531626264313761626462353736643035363139396261
+65663334303235653635373262306530616332393166373634366537663937663136353732666633
+32613562303339336235383534643330346632386233663636303130633432333065353466663365
+30393063323338343037646435663838366431663036653533303231653836343764326635333938
+64366533346633646363393233313134303539653161643631313561366365633962613961366461
+36616365646263653536656139346461623437333262333065353130323031613563626266646263
+32346165393235636663666265303866346139333033343734343839336337326466393234353533
+66383432663539386461376331613738623438313837306265646161323663653735663563306366
+30343163396334303661623835313539663839623564643235396361323736636466626433323661
+31343161336231353338613330316339313466616532373264303930393866386539376466623331
+62646236373866393939373637306238356330336236383938623166383536626661393837396339
+35636437316230373664636430643066366432663036316434646162343365383834386139333962
+37303933643162623036323637343431383938353532303461313466323535633366346434396666
+36316438333362616639646632656464356134393534653064313833326632346631316165653931
+32666263386438666236313765393164393031646137346133633662313438613861353239386261
+35653233353435623437396435616238653538366561336537396366333935656161656561663432
+31336438366662376665663564313730323165613435666230663765623638316237366661373863
+66623662303938633430323931393165643638353031303132643332396334326539613030393232
+34363432393838666631323862633266623631306436633466656231303837323637646661333534
+38636535336637326137643465323935616437326639303566663739393565386535383862656164
+35646634636563313934386566353361623861353833633338623638373261346330393931656233
+64636530306539636634313135666133626331333333653165346638616463663932306665393631
+65373933363738663730633935616234383530393962353935336133316538316430663632656134
+62376230316464346466323861323630303136626135303437363035616465333536663231663361
+63373131663237356431306431653133613531396365376433353962343631646630393337653637
+30366262663964333435393334343532633063353531333763396462636132666131396362613133
+63393336386638646464346635643035303738393965373935376361353334346637656239333362
+63313032316631356330656565653137626232666432373366313436626534663462343033653730
+33316437366530313562643763333032373836646632663038616431303231666563313866353465
+66336565316631386466343765393336613436663134653935373762366261353834323038633863
+62323935396365646134643938323930333733663561636431613034616334653965353530306634
+65376334303331346433306536353364336131633339363334343963643266306432363539636439
+386265336633386665353536383136653737
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/defaults/main.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,9 @@
+---
+vigil_address: "0.0.0.0"
+vigil_arch: "x86_64"
+vigil_checksum: "sha256:35faea05c9d140d01536e21a7d41873d0f28dc3b3cf9a439758f0fe5785dea2e"
+vigil_group: "vigil"
+vigil_home: "/var/lib/vigil"
+vigil_port: "8080"
+vigil_user: "vigil"
+vigil_version: "v1.22.0"
Binary file roles/vigil/files/branding/favicon.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/files/branding/logo.svg Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="65.831207mm"
+ height="25.725439mm"
+ viewBox="0 0 65.831207 25.725439"
+ version="1.1"
+ id="svg1468"
+ inkscape:version="0.92.3 (2405546, 2018-03-11)"
+ sodipodi:docname="pidgin-text.svg">
+ <defs
+ id="defs1462" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.979899"
+ inkscape:cx="236.239"
+ inkscape:cy="33.814383"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1916"
+ inkscape:window-height="1041"
+ inkscape:window-x="1280"
+ inkscape:window-y="18"
+ inkscape:window-maximized="0"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0" />
+ <metadata
+ id="metadata1465">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-3.2757002,-53.760515)">
+ <g
+ id="g2108">
+ <path
+ class="cls-9"
+ d="m 12.882946,77.308435 q -2.61144,-2.93952 -3.3602097,-5.46894 a 5.635625,5.635625 0 0 0 2.5638097,-0.63236 4.7995417,4.7995417 0 0 0 1.92881,-1.80181 5.4583542,5.4583542 0 0 0 0.77788,-2.75696 q 0.0662,-2.38125 -1.53723,-3.82323 a 5.8552292,5.8552292 0 0 0 -3.8708497,-1.50547 5.5324375,5.5324375 0 0 0 -3.27555,0.8546 5.8208333,5.8208333 0 0 0 -2.07962,2.31775 6.69925,6.69925 0 0 0 -0.75142,2.86279 11.088687,11.088687 0 0 0 1.91823,6.49023 24.780875,24.780875 0 0 0 5.1382097,5.64092 z"
+ id="path2047"
+ inkscape:connector-curvature="0"
+ style="isolation:isolate;fill:#794a85;fill-opacity:1;stroke-width:0.26458332" />
+ <path
+ inkscape:connector-curvature="0"
+ id="rect2057"
+ transform="scale(0.26458333)"
+ d="m 73.423828,213.20898 a 6.9999999,6.9999999 0 1 0 7.087891,7 6.9999999,6.9999999 0 0 0 -7,-7 6.9999999,6.9999999 0 0 0 -0.08789,0 z m -6.792969,18.30079 v 40.20898 h 13.701172 v -40.20898 z"
+ style="isolation:isolate;fill:#5c3566;stroke-width:0.99999994" />
+ <path
+ class="cls-9"
+ d="m 26.072426,55.938035 q 2.61143,2.94217 3.36285,5.46894 a 5.55625,5.55625 0 0 0 -2.56381,0.63235 4.8233542,4.8233542 0 0 0 -1.93146,1.80181 5.4504167,5.4504167 0 0 0 -0.77523,2.75696 c -0.045,1.5875 0.46302,2.86544 1.53723,3.82323 a 5.8790417,5.8790417 0 0 0 3.86821,1.50548 5.55625,5.55625 0 0 0 3.27819,-0.8546 5.8393542,5.8393542 0 0 0 2.07962,-2.3204 6.6860208,6.6860208 0 0 0 0.74877,-2.86279 11.062229,11.062229 0 0 0 -1.91823,-6.48758 24.720021,24.720021 0 0 0 -5.13821,-5.64092 z"
+ id="path2051"
+ inkscape:connector-curvature="0"
+ style="isolation:isolate;fill:#4b2854;fill-opacity:1;stroke-width:0.26458332" />
+ <path
+ class="cls-9"
+ d="m 39.420656,76.623165 q 2.61143,-2.94217 3.3602,-5.46894 a 5.55625,5.55625 0 0 1 -2.56381,-0.63236 4.8154167,4.8154167 0 0 1 -1.92881,-1.80181 5.4504167,5.4504167 0 0 1 -0.77788,-2.75431 q -0.0662,-2.38125 1.53988,-3.82588 a 5.87375,5.87375 0 0 1 3.86821,-1.50548 5.55625,5.55625 0 0 1 3.27818,0.85725 5.8446458,5.8446458 0 0 1 2.07963,2.31511 6.7071875,6.7071875 0 0 1 0.74877,2.86544 11.086042,11.086042 0 0 1 -1.91823,6.48758 24.720021,24.720021 0 0 1 -5.13821,5.64092 z"
+ id="path2049"
+ inkscape:connector-curvature="0"
+ style="isolation:isolate;fill:#5c3566;stroke-width:0.26458332" />
+ <path
+ inkscape:connector-curvature="0"
+ id="rect2061"
+ transform="scale(0.26458333)"
+ d="m 201.79492,213.20898 a 6.9999999,6.9999999 0 1 0 7.08594,7 6.9999999,6.9999999 0 0 0 -7,-7 6.9999999,6.9999999 0 0 0 -0.0859,0 z m -6.80273,18.30079 v 40.20898 h 13.70898 v -40.20898 z"
+ style="isolation:isolate;fill:#794a85;fill-opacity:1;stroke-width:0.99999994" />
+ <path
+ class="cls-9"
+ d="m 58.470656,61.253515 h 5.17789 c 2.86544,0 5.45836,2.30981 5.45836,5.21229 0,2.27277 -1.18534,5.42661 -1.18534,5.42661 h -2.43681 c 0,0 0.83344,-3.175 0.49212,-5.42661 -0.12435,-0.8255 -0.87841,-2.06904 -2.18545,-2.06904 h -2.20398 v 7.49829 h -3.09563 c 0,0 -0.0212,-7.57767 -0.0212,-10.64154 z"
+ id="path2071"
+ inkscape:connector-curvature="0"
+ style="isolation:isolate;fill:#4b2854;fill-opacity:1;stroke-width:0.26458332" />
+ </g>
+ </g>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/handlers/main.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,13 @@
+---
+- name: "reload systemd"
+ systemd:
+ daemon_reload: "yes"
+- name: "restart vigil"
+ systemd:
+ name: "vigil"
+ state: "restarted"
+- name: "reload apache2"
+ systemd:
+ name: "apache2"
+ state: "reloaded"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/meta/main.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,4 @@
+---
+dependencies:
+ - "apache2"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/tasks/apache2.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,47 @@
+---
+- name: "enable modules"
+ community.general.apache2_module:
+ state: "present"
+ name: "{{ item }}"
+ loop:
+ - "proxy"
+ - "proxy_http"
+ notify:
+ - "reload apache2"
+ tags:
+ - "apache"
+- name: "obtain certificates"
+ command: |
+ certbot --quiet -m root@pidgin.im --no-eff-email --agree-tos
+ --webroot -w /var/www/html/ certonly
+ -d {{ item }}
+ args:
+ creates: "/etc/letsencrypt/live/{{ item }}/cert.pem"
+ loop:
+ - "status.pidgin.im"
+ - "status.imfreedom.org"
+ notify:
+ - "reload apache2"
+ tags:
+ - "apache"
+ - "certbot"
+- name: "install apache configuration"
+ template:
+ src: "{{ item }}.conf.j2"
+ dest: "/etc/apache2/sites-available/{{ item }}.conf"
+ mode: "0644"
+ loop:
+ - "status.pidgin.im"
+ - "status.imfreedom.org"
+ tags:
+ - "apache"
+- name: "enable apache configuration"
+ command: "a2ensite {{ item }}"
+ loop:
+ - "status.pidgin.im"
+ - "status.imfreedom.org"
+ notify:
+ - "reload apache2"
+ tags:
+ - "apache"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/tasks/config.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,16 @@
+---
+- name: "install configuration"
+ template:
+ src: "config.cfg.j2"
+ dest: "{{ vigil_home }}/vigil/config.cfg"
+ mode: "0700"
+ owner: "{{ vigil_user }}"
+ group: "{{ vigil_group }}"
+ notify:
+ - "restart vigil"
+- name: "install branding"
+ copy:
+ group: "{{ vigil_group }}"
+ owner: "{{ vigil_user }}"
+ dest: "{{ vigil_home }}/vigil/res/assets/images/branding/"
+ src: "branding/"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/tasks/main.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,38 @@
+---
+- include_tasks: "user.yaml"
+ args:
+ apply:
+ tags:
+ - "vigil"
+ tags:
+ - "always"
+- include_tasks: "software.yaml"
+ args:
+ apply:
+ tags:
+ - "vigil"
+ tags:
+ - "always"
+- include_tasks: "config.yaml"
+ args:
+ apply:
+ tags:
+ - "vigil"
+ tags:
+ - "always"
+- include_tasks: "systemd.yaml"
+ when: ansible_system == "Linux"
+ args:
+ apply:
+ tags:
+ - "vigil"
+ tags:
+ - "always"
+- include_tasks: "apache2.yaml"
+ args:
+ apply:
+ tags:
+ - "vigil"
+ tags:
+ - "always"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/tasks/software.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,21 @@
+---
+- name: "construct filename"
+ set_fact:
+ vigil_filename: "{{ vigil_version }}-{{ vigil_arch }}.tar.gz"
+- name: "construct url"
+ set_fact:
+ vigil_download_url: "https://github.com/valeriansaliou/vigil/releases/download/{{ vigil_version }}/{{ vigil_filename }}"
+- name: "download"
+ get_url:
+ url: "{{ vigil_download_url }}"
+ checksum: "{{ vigil_checksum }}"
+ dest: "{{ vigil_home }}/{{ vigil_filename }}"
+- name: "extract"
+ unarchive:
+ remote_src: "yes"
+ src: "{{ vigil_home }}/{{ vigil_filename }}"
+ dest: "{{ vigil_home }}"
+ mode: "0755"
+ owner: "{{ vigil_user }}"
+ group: "{{ vigil_group }}"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/tasks/systemd.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,13 @@
+---
+- name: "install systemd unit"
+ template:
+ src: "vigil.service.j2"
+ dest: "/etc/systemd/system/vigil.service"
+ mode: "0640"
+ notify:
+ - "reload systemd"
+- name: "start systemd service"
+ systemd:
+ name: "vigil"
+ state: "restarted"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/tasks/user.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,14 @@
+---
+- name: "create group {{ vigil_group }}"
+ group:
+ name: "{{ vigil_group }}"
+ system: "yes"
+- name: "create user {{ vigil_user }}"
+ user:
+ name: "{{ vigil_user }}"
+ shell: "/bin/false"
+ group: "{{ vigil_group }}"
+ system: "yes"
+ createhome: "yes"
+ home: "{{ vigil_home }}"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/templates/config.cfg.j2 Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,161 @@
+[server]
+log_level = "info"
+inet = "{{ vigil_address }}:{{ vigil_port }}"
+workers = 4
+reporter_token = "{{ vigil_reporter_token }}"
+
+[assets]
+path = "{{ vigil_home }}/vigil/res/assets/"
+
+[branding]
+
+page_title = "Pidgin Status"
+page_url = "https://status.pidgin.im/"
+company_name = "Pidgin"
+icon_color = "#794A85"
+icon_url = "https://status.pidgin.im/assets/images/branding/favicon.png"
+logo_color = "#794A85"
+logo_url = "https://status.pidgin.im/assets/images/branding/logo.svg"
+website_url = "https://pidgin.im/"
+support_url = "mailto:support@pidgin.im"
+custom_html = ""
+
+[metrics]
+poll_interval = 120
+poll_retry = 2
+
+poll_http_status_healthy_above = 200
+poll_http_status_healthy_below = 400
+
+poll_delay_dead = 30
+poll_delay_sick = 10
+
+push_delay_dead = 20
+
+push_system_cpu_sick_above = 0.90
+push_system_ram_sick_above = 0.90
+
+script_interval = 300
+
+local_delay_dead = 40
+
+[notify]
+startup_notification = false
+reminder_interval = 900
+
+[notify.slack]
+hook_url = "{{ vigil_slack_webhook_url }}"
+mention_channel = false
+
+[probe]
+
+[[probe.service]]
+id = "pidgin"
+label = "Pidgin"
+
+[[probe.service.node]]
+id = "pidgin-im-http"
+label = "pidgin.im (http)"
+mode = "poll"
+replicas = ["https://pidgin.im"]
+
+[[probe.service.node]]
+id = "conference-pidgin-im-xmpp"
+label = "conference.pidgin.im (xmpp)"
+mode = "poll"
+replicas = ["tcp://xmpp.pidgin.im:5222"]
+
+[[probe.service.node]]
+id = "developer-pidgin-im-http"
+label = "developer.pidgin.im (http)"
+mode = "poll"
+replicas = ["https://developer.pidgin.im"]
+
+[[probe.service.node]]
+id = "lists-pidgin-im-http"
+label = "lists.pidgin.im (http)"
+mode = "poll"
+replicas = ["https://lists.pidgin.im"]
+
+[[probe.service.node]]
+id = "pidginchat-com-xmpp"
+label = "pidginchat.com (xmpp)"
+mode = "poll"
+replicas = ["tcp://pidginchat.com:5222"]
+
+[[probe.service.node]]
+id = "xmpp-pidgin-im-xmpp"
+label = "xmpp.pidgin.im (xmpp)"
+mode = "poll"
+replicas = ["tcp://xmpp.pidgin.im:5222"]
+
+[[probe.service]]
+id = "imfreedom"
+label = "IMFreedom"
+
+[[probe.service.node]]
+id = "conference-imfreedom-org-xmpp"
+label = "conference.imfreedom.org (xmpp)"
+mode = "poll"
+replicas = ["tcp://xmpp.imfreedom.org:5222"]
+
+[[probe.service.node]]
+id = "data-imfreedom-org-http"
+label = "data.imfreedom.org (http)"
+mode = "poll"
+replicas = ["https://data.imfreedom.org/minio/health/live"]
+
+[[probe.service.node]]
+id = "hub-imfreedom-org-http"
+label = "hub.imfreedom.org (http)"
+mode = "poll"
+replicas = ["https://hub.imfreedom.org"]
+
+[[probe.service.node]]
+id = "imfreedom-org-http"
+label = "imfreedom.org (http)"
+mode = "poll"
+replicas = ["https://imfreedom.org"]
+
+[[probe.service.node]]
+id = "issues-imfreedom-org-http"
+label = "issues.imfreedom.org (http)"
+mode = "poll"
+replicas = ["https://issues.imfreedom.org"]
+
+[[probe.service.node]]
+id = "keep-imfreedom-org-http"
+label = "keep.imfreedom.org (http)"
+mode = "poll"
+replicas = ["https://keep.imfreedom.org"]
+
+[[probe.service.node]]
+id = "keep-imfreedom-org-ssh"
+label = "keep.imfreedom.org (ssh)"
+mode = "poll"
+replicas = ["tcp://keep.imfreedom.org:22"]
+
+[[probe.service.node]]
+id = "lists-imfreedom-org-http"
+label = "lists.imfreedom.org (http)"
+mode = "poll"
+replicas = ["https://lists.imfreedom.org"]
+
+[[probe.service.node]]
+id = "rock-pidgin-im-imap"
+label = "rock.pidgin.im (imap)"
+mode = "poll"
+replicas = ["tcp://rock.pidgin.im:143"]
+
+[[probe.service.node]]
+id = "rock-pidgin-im-smtp"
+label = "rock.pidgin.im (smtp)"
+mode = "poll"
+replicas = ["tcp://rock.pidgin.im:25"]
+
+[[probe.service.node]]
+id = "wiki-imfreedom-org-http"
+label = "wiki.imfreedom.org (http)"
+mode = "poll"
+replicas = ["https://wiki.imfreedom.org"]
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/templates/status.imfreedom.org.conf.j2 Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,40 @@
+<VirtualHost *:80>
+ ServerName status.imfreedom.org
+ ServerAdmin root@imfreedom.org
+ DocumentRoot /var/www/html
+
+ <Directory /var/www/html>
+ AllowOverride None
+ Require all granted
+
+ Options +FollowSymLinks
+
+ RewriteEngine On
+ RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*$ [NC]
+ RewriteRule ^(.*)$ https://status.pidgin.im/ [R=301]
+ </Directory>
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerName status.imfreedom.org
+ ServerAdmin root@imfreedom.org
+ DocumentRoot /var/www/html
+
+ SSLEngine on
+ SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
+ SSLCertificateKeyFile /etc/letsencrypt/live/status.imfreedom.org/privkey.pem
+ SSLCACertificateFile /etc/letsencrypt/live/status.imfreedom.org/chain.pem
+ SSLCertificateFile /etc/letsencrypt/live/status.imfreedom.org/cert.pem
+
+ <Directory /var/www/html>
+ AllowOverride None
+ Require all granted
+
+ Options +FollowSymLinks
+
+ RewriteEngine On
+ RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*$ [NC]
+ RewriteRule ^(.*)$ https://status.pidgin.im/ [R=301]
+ </Directory>
+</VirtualHost>
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/templates/status.pidgin.im.conf.j2 Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,32 @@
+<VirtualHost *:80>
+ ServerName status.pidgin.im
+ ServerAdmin root@pidgin.im
+ DocumentRoot /var/www/html
+
+ <Directory /var/www/html>
+ AllowOverride None
+ Require all granted
+
+ Options +FollowSymLinks
+
+ RewriteEngine On
+ RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*$ [NC]
+ RewriteRule ^(.*)$ https://status.pidgin.im/ [R=301]
+ </Directory>
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerName status.pidgin.im
+ ServerAdmin root@pidgin.im
+ DocumentRoot /var/www/html
+
+ SSLEngine on
+ SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
+ SSLCertificateKeyFile /etc/letsencrypt/live/status.pidgin.im/privkey.pem
+ SSLCACertificateFile /etc/letsencrypt/live/status.pidgin.im/chain.pem
+ SSLCertificateFile /etc/letsencrypt/live/status.pidgin.im/cert.pem
+
+ ProxyPass / http://{{ vigil_address }}:{{ vigil_port }}/
+ ProxyPassReverse / http://{{ vigil_address}}:{{ vigil_port}}/
+</VirtualHost>
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/vigil/templates/vigil.service.j2 Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,16 @@
+[Unit]
+Description=Vigil Microservices Status Page
+After=network.target
+
+[Service]
+Type=simple
+User=vigil
+Group=vigil
+ExecStartPre=/sbin/setcap 'cap_net_raw+ep' {{ vigil_home }}/vigil/vigil
+ExecStart={{ vigil_home }}/vigil/vigil -c {{ vigil_home }}/vigil/config.cfg
+Restart=on-failure
+PermissionsStartOnly=true
+
+[Install]
+WantedBy=multi-user.target
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/status_page_servers.yaml Wed Jul 07 00:52:31 2021 -0500
@@ -0,0 +1,4 @@
+- hosts: status_page_servers
+ roles:
+ - vigil
+