imfreedom/email-ansible

remove statping
draft
2021-07-07, Gary Kramlich
188cd7f859ca
Parents fad77591ea2e
Children ed91bd614149
remove statping
--- a/inventories/pidgin/hosts.yaml Wed Jul 07 00:52:31 2021 -0500
+++ b/inventories/pidgin/hosts.yaml Wed Jul 07 01:24:58 2021 -0500
@@ -4,10 +4,6 @@
hosts:
dodo.pidgin.im:
ansible_user: root
- statping_servers:
- hosts:
- dodo.pidgin.im:
- ansible_users: root
status_page_servers:
hosts:
dodo.pidgin.im:
--- a/inventories/pidgin/vault.yaml Wed Jul 07 00:52:31 2021 -0500
+++ b/inventories/pidgin/vault.yaml Wed Jul 07 01:24:58 2021 -0500
@@ -1,84 +1,79 @@
$ANSIBLE_VAULT;1.1;AES256
-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
+32393165663866393635646363386235356637356562323936623563336434653039636566636638
+3533326565363038613635623137636634333765623665620a353663323064373361323962363739
+37366265643330363930616638353931306531373836323434376366383964363236643162383430
+6134646135636238630a383964383363393965353134653439363734363937346232396263663461
+64366636363032316338326261353665636536643037616238353161306539316133666430633931
+38313137613364363034353837313336336336666437393130613364333863643261616337656462
+61646432386364343032656464353930376634336464643634396161346137623766323135636137
+38653639626531613037333066663731616335353762306432643638623266643566303161663438
+37393563623734333133323934373463656237663031663237393539346432656232636534613033
+30656135653733633866363638643438383538323734626630303239633364636363363362666235
+39346537343564643162666130306462653837356131633039663735363337386336383634336462
+32383537663732333732663730323961613834346563636332313465346366626630306533613435
+37656664393334363464613061383164396639313834396539393138366661313436643735663333
+64383361393238353738316530303234376236346236376438343463343765643337346662353939
+38383562613162353030393138323162636137373139666633323661313366636132616465306462
+35323739383535353733373761346231303731386635633532613339383130366164666334356538
+61653666626231646564363835633730383061353331373632373835393530303237623764396330
+38313739646431373463623837363931313036383231623430646533653164613063326462326234
+30363564373836626632346664646263316337616434313339343433656130623930326562373163
+31616165303161343434643961633238323432316661363830393034633137313734633938633661
+61613637616235343230623037386561616633623332326635316265363263666333333036633264
+38333363393934386234333930383363396461663938633032613732386234323937623564653864
+32623736323230373562303462633162336162333565633163336134323837666136633239303231
+32373430393339383331396139303261393635363763366535353265656165616230346161626438
+36666262376134646237393234663661326461303862326366386661366530636438376639386164
+35383737656239653565656364626165383936346664613736643466353637623261386631306537
+35303164623738333630306435373632316462313162626363633366376263653939393431623739
+39333162666336633761383363346139383637663034656662303834663539316265366534326261
+65333039383431376362383366326235666132646434633430343065363839303162643664643963
+65643538333337636131653339626136396136383935333935313735626434636236386335363939
+39336330353633313636646161386632623862373336366436363964643334346366336362343738
+38346662383364373733303939323933303033613032656461613162353635383537376232653666
+34376162613065363466623931393938643833323938343763353066393665356662376638373434
+37386438393437373632396262383336323566383036363730393139343435343732636166336365
+63393336633566366338653036383733313866633938386163363734626466346264353563326536
+34306339653035383264633636316262393063653630393633336331373931333564336634636531
+32376636383065366436633533306137303865333463336130623033653135326433333364643062
+61376666616134383361663061386465303064353438396666663961616333653964636262393838
+39343339333763323338393339653166393038396134303838383764663235376235353939346566
+36616131626663633232643035396634613565626433386133323230633430323431613831626237
+63313233376662376366333764383031353162336561383739653630316336393839366263663632
+35646535626238663264613937306465373631323065373039376666653064366534356334646437
+66376666366132383864343862373138663031326665323136396338666232363231373264613133
+32306563613361343339633765303163336164613361313163386162346664663737303133343365
+30376634363836363762636136393232336532623130643462336161616238326338646433363233
+65653437313063316536306432656230636666386463646135636338616137666531313337336338
+35613339666234653435623664363031323332623965303664356431333330343435346136623531
+62363566666336613761613736653963326334343038396563333966613133633737373462346339
+65326466666364353839616263656164343833623039373233323863633362646636356530326339
+39363465313064343135636535663231616465386563393963373964646661613138373538353237
+38386332363436623932306661393838313035303062626236623836316630313939643839303238
+31623664343639663964636135336265383263646564383962653735323338313332376664363734
+64353533396439666364323833393861303331616564636238646333646535373833646539313061
+33386664633262353032356661356538653763633462653534376232303134323530313931306331
+62623763336661376632663465373333323965643932653239626362396365616561663266356634
+38323232386337356361306130633235353536636431323833646664663831323332626263383263
+32653331396665323130636130313762323033323037333534363131653534323565383837333965
+33393937323032613965643238663232316366303737383837326366643137356162353339306165
+62343336343163313539303234356430376634616462356566383536623364356466663539656331
+65333064313761326666333365333862633438333739343662396638623533343830666133373030
+32386639663430303961376134616465346464663137653236653439643565393665323334393865
+65393062623834646365393939363933393566323466373039616366626135333231323333316264
+33376637636133306662373338376366623735363366623237663739323138643531376163376437
+37363733323261386430613433313735396664626439666262666437383533316366366233306466
+66343664666464656537313965313566356230333261303465666232396337653837326666616338
+63373532616662663330623636646637366330633431613064633135613637376366333635393365
+34613039343637323665396330636466313364653439646434303266323433623664316566616162
+63656365366330626637303261656331643232396334323336303730633334363465663464633862
+35356363363133383130666338643933393436636261306535636163343366366465336461343330
+34393135373436646138646532616139646131353232316662613265633238333130316539303039
+37343133373266356239623635323834356633626336373865373866633039306436613535633266
+35646663663638386165346237636566373162616432363234356261306339393665396533653063
+36366466353437393034376633666630306131326233613430326363343564313764663836343638
+64623536396434346263363565613063386133333066336336356164393536623964383338323530
+61313733303735333631643566643335376463633862366363356637666463353431333064333365
+39653839633635623338313232336236396164656636356535316563623531373530366335313563
+34323366653234616331653335343365646662306365336131653264393433376236346137333232
+3230616265613739383263623433666539343139326536306538
--- a/roles/statping/defaults/main.yaml Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
----
-statping_version: "v0.90.74"
-statping_os: "linux"
-statping_arch: "amd64"
-statping_checksum: "sha256:d287782dde1b96afbc7e41a95568347dddc0967db114feede1492cfe1fc6f3c3"
-statping_user: "statping"
-statping_group: "statping"
-statping_home: "/var/lib/statping"
-statping_port: "9000"
-statping_address: "localhost"
-statping_postgresql_host: "localhost"
-statping_postgresql_port: "5432"
-statping_postgresql_database: "statping"
-
--- a/roles/statping/handlers/main.yaml Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
----
-- name: "reload systemd"
- systemd:
- daemon_reload: "yes"
-- name: "restart statping"
- systemd:
- name: "statping"
- state: "restarted"
-- name: "reload apache2"
- systemd:
- name: "apache2"
- state: "reloaded"
-
--- a/roles/statping/meta/main.yaml Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
----
-dependencies:
- - "apache2"
- - "postgresql"
-
--- a/roles/statping/tasks/apache2.yaml Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
----
-- 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"
--- a/roles/statping/tasks/config.yaml Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
----
-- name: "create runtime directory"
- file:
- path: "{{ statping_home }}/statping"
- state: "directory"
- mode: "0700"
- owner: "{{ statping_user }}"
- group: "{{ statping_group }}"
-- name: "install config"
- template:
- src: "config.yml.j2"
- dest: "{{ statping_home }}/statping/config.yml"
- mode: "0600"
- owner: "{{ statping_user }}"
- group: "{{ statping_group }}"
- notify:
- - "restart statping"
-
--- a/roles/statping/tasks/database.yaml Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
----
-- name: "create database"
- community.postgresql.postgresql_db:
- name: "{{ statping_postgresql_database }}"
- become_user: "postgres"
- become: "yes"
-- name: "create role"
- community.postgresql.postgresql_user:
- db: "{{ statping_postgresql_database }}"
- name: "{{ statping_postgresql_username }}"
- password: "{{ statping_postgresql_password }}"
- become_user: "postgres"
- become: "yes"
-- name: "grant access"
- community.postgresql.postgresql_owner:
- db: "{{ statping_postgresql_database }}"
- new_owner: "{{ statping_postgresql_username }}"
- obj_name: "{{ statping_postgresql_database }}"
- obj_type: "database"
- become_user: "postgres"
- become: "yes"
--- a/roles/statping/tasks/main.yaml Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-- include_tasks: "user.yaml"
- args:
- apply:
- tags:
- - "statping"
- tags:
- - "always"
-- include_tasks: "software.yaml"
- args:
- apply:
- tags:
- - "statping"
- tags:
- - "always"
-- include_tasks: "database.yaml"
- args:
- apply:
- tags:
- - "statping"
- tags:
- - "always"
-- include_tasks: "systemd.yaml"
- when: ansible_system == "Linux"
- args:
- apply:
- tags:
- - "statping"
- tags:
- - "always"
-- include_tasks: "config.yaml"
- args:
- apply:
- tags:
- - "statping"
- tags:
- - "always"
-- include_tasks: "apache2.yaml"
- args:
- apply:
- tags:
- - "statping"
- tags:
- - "always"
-
--- a/roles/statping/tasks/software.yaml Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
----
-- name: "build filename"
- set_fact:
- statping_filename: "statping-{{statping_os}}-{{statping_arch}}.tar.gz"
-- name: "build url"
- set_fact:
- statping_download_url: "https://github.com/statping/statping/releases/download/{{statping_version}}/{{statping_filename}}"
-- name: "download"
- get_url:
- url: "{{statping_download_url}}"
- checksum: "{{statping_checksum}}"
- dest: "{{statping_home}}/{{statping_filename}}"
-- name: "extract"
- unarchive:
- remote_src: "yes"
- src: "{{statping_home}}/{{statping_filename}}"
- dest: "/usr/local/bin/"
- mode: "0755"
--- a/roles/statping/tasks/systemd.yaml Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
----
-- name: install systemd unit
- template:
- src: "statping.service.j2"
- dest: "/etc/systemd/system/statping.service"
- mode: "0640"
- notify:
- - "reload systemd"
-- name: start systemd service
- systemd:
- name: "statping"
- state: "restarted"
--- a/roles/statping/tasks/user.yaml Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
----
-- name: "create group {{statping_group}}"
- group:
- name: "{{statping_group}}"
- system: "yes"
-- name: "create user {{statping_user}}"
- user:
- name: "{{statping_user}}"
- shell: "/bin/false"
- group: "{{statping_group}}"
- system: "yes"
- createhome: "yes"
- home: "{{statping_home}}"
--- a/roles/statping/templates/config.yml.j2 Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-connection: postgres
-host: {{ statping_postgresql_host }}
-user: {{ statping_postgresql_username }}
-password: {{ statping_postgresql_password }}
-database: {{ statping_postgresql_database }}
-port: {{ statping_postgresql_port }}
-language: en
-allow_reports: false
-location: {{ statping_home }}/statping
-disable_http: false
-demo_mode: false
-disable_logs: false
-use_assets: false
-sample_data: false
-use_cdn: false
-disable_colors: false
-
--- a/roles/statping/templates/statping.service.j2 Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-[Unit]
-Description=Statping Server
-After=network.target
-After=systemd-user-sessions.service
-After=network-online.target
-
-[Service]
-Type=simple
-Restart=always
-User={{statping_user}}
-Group={{statping_group}}
-Environment=STATPING_DIR={{ statping_home }}/statping
-ExecStart=/usr/local/bin/statping -v 1 --config {{ statping_home }}/statping/config.yml --ip {{ statping_address }} --port {{ statping_port }}
-WorkingDirectory=/usr/local/bin
-
-[Install]
-WantedBy=multi-user.target
-
--- a/roles/statping/templates/status.imfreedom.org.conf.j2 Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-<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>
-
--- a/roles/statping/templates/status.pidgin.im.conf.j2 Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<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://{{ statping_address }}:{{ statping_port }}/
- ProxyPassReverse / http://{{ statping_address}}:{{ statping_port}}/
-</VirtualHost>
-
--- a/statping_servers.yaml Wed Jul 07 00:52:31 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-- hosts: statping_servers
- roles:
- - statping
-