mirror of
https://github.com/mdlayher/homelab.git
synced 2024-12-14 11:47:32 +00:00
ansible/traefik: remove, now in NixOS configuration
Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
parent
c0e7ded9bc
commit
1eab8e4a30
6 changed files with 1 additions and 277 deletions
|
@ -16,7 +16,6 @@ prometheus_jobs:
|
|||
params:
|
||||
module: [http_2xx]
|
||||
targets:
|
||||
- "http://servnerr-3:8080"
|
||||
- "https://grafana.servnerr.com"
|
||||
# TODO: move onto server and re-enable.
|
||||
# - "https://homeassistant.servnerr.com"
|
||||
|
@ -99,7 +98,7 @@ prometheus_jobs:
|
|||
relabel_target: "servnerr-3:9116"
|
||||
- job: "traefik"
|
||||
targets:
|
||||
- "servnerr-3:8080"
|
||||
- "routnerr-2:8080"
|
||||
- job: "wgipamd"
|
||||
targets:
|
||||
- "routnerr-2:9475"
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
---
|
||||
- name: download and checksum traefik {{ traefik_version }}
|
||||
tags:
|
||||
- traefik
|
||||
get_url:
|
||||
url: "{{ traefik_url }}"
|
||||
dest: "{{ traefik_tmp }}"
|
||||
checksum: "sha256:{{ traefik_sha256 }}"
|
||||
|
||||
- name: create traefik user
|
||||
tags:
|
||||
- traefik
|
||||
user:
|
||||
name: traefik
|
||||
shell: "/bin/false"
|
||||
comment: "traefik service user"
|
||||
|
||||
- name: check if traefik service exists
|
||||
tags:
|
||||
- traefik
|
||||
stat:
|
||||
path: "/etc/systemd/system/traefik.service"
|
||||
register: checked
|
||||
|
||||
- name: stop traefik service if it exists
|
||||
tags:
|
||||
- traefik
|
||||
when: checked.stat.exists
|
||||
service:
|
||||
name: traefik
|
||||
state: stopped
|
||||
|
||||
- name: copy traefik binary to {{ host_bin_path }}
|
||||
tags:
|
||||
- traefik
|
||||
command: "cp {{ traefik_tmp }} {{ host_bin_path }}/traefik"
|
||||
|
||||
- name: grant capabilities to traefik binary
|
||||
tags:
|
||||
- traefik
|
||||
capabilities:
|
||||
path: "{{ host_bin_path }}/traefik"
|
||||
capability: "cap_net_bind_service+ep"
|
||||
state: present
|
||||
|
||||
- name: set permissions on traefik binaries
|
||||
tags:
|
||||
- traefik
|
||||
file:
|
||||
path: "{{ host_bin_path }}/traefik"
|
||||
owner: traefik
|
||||
group: traefik
|
||||
mode: 0755
|
||||
|
||||
- name: create traefik config directory
|
||||
tags:
|
||||
- traefik
|
||||
file:
|
||||
path: "{{ traefik_config_dir }}"
|
||||
state: directory
|
||||
owner: traefik
|
||||
group: traefik
|
||||
mode: 0755
|
||||
|
||||
- name: create traefik configuration
|
||||
tags:
|
||||
- traefik
|
||||
template:
|
||||
src: traefik.toml.j2
|
||||
dest: "{{ traefik_config_dir }}/traefik.toml"
|
||||
with_items: "{{ traefik_config }}"
|
||||
|
||||
- name: remove traefik acme.json to force certificate renewal
|
||||
tags:
|
||||
- traefik
|
||||
file:
|
||||
path: "{{ traefik_config_dir }}/acme.json"
|
||||
state: absent
|
||||
|
||||
- name: create traefik systemd unit
|
||||
tags:
|
||||
- traefik
|
||||
template:
|
||||
src: traefik.service.j2
|
||||
dest: "/etc/systemd/system/traefik.service"
|
||||
|
||||
- name: reload systemd configurations
|
||||
tags:
|
||||
- traefik
|
||||
command: "systemctl daemon-reload"
|
||||
|
||||
- name: start traefik service
|
||||
tags:
|
||||
- traefik
|
||||
service:
|
||||
name: traefik
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: remove temporary traefik files
|
||||
tags:
|
||||
- traefik
|
||||
file:
|
||||
path: "{{ traefik_tmp }}"
|
||||
state: absent
|
|
@ -1,16 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
[Unit]
|
||||
Description=Traefik HTTP reverse proxy
|
||||
Documentation=https://docs.traefik.io/
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
User=traefik
|
||||
Group=traefik
|
||||
Type=simple
|
||||
ExecStart={{ host_bin_path }}/traefik \
|
||||
-c {{ traefik_config_dir }}/traefik.toml
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,67 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
# traefik configuration, Matt Layher, 2017-08-21
|
||||
|
||||
defaultEntryPoints = ["http", "https"]
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
address = ":80"
|
||||
[entryPoints.http.redirect]
|
||||
entryPoint = "https"
|
||||
[entryPoints.https]
|
||||
address = ":443"
|
||||
[entryPoints.https.tls]
|
||||
|
||||
[web]
|
||||
address = ":8080"
|
||||
[web.metrics.prometheus]
|
||||
Buckets= [0.1,0.3,1.2,5.0]
|
||||
|
||||
[acme]
|
||||
email = "{{ traefik_acme_email }}"
|
||||
storage = "{{ traefik_config_dir }}/acme.json"
|
||||
entryPoint = "https"
|
||||
|
||||
# Use HTTP-01 ACME challenge.
|
||||
[acme.httpChallenge]
|
||||
entryPoint = "http"
|
||||
|
||||
{% for domain in traefik_config %}
|
||||
[[acme.domains]]
|
||||
main = "{{ domain.domain }}"
|
||||
{% if domain.acme_sans is defined %}
|
||||
sans = [
|
||||
{% for san in domain.acme_sans %}
|
||||
"{{ san }}",
|
||||
{% endfor %}
|
||||
]
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
[file]
|
||||
|
||||
[frontends]
|
||||
{% for domain in traefik_config %}
|
||||
{% if domain.alias is defined %}
|
||||
[frontends.{{ domain.alias }}]
|
||||
backend = "{{ domain.alias }}"
|
||||
{% if domain.basic_auth is defined %}
|
||||
basicAuth = [
|
||||
{% for auth in domain.basic_auth %}
|
||||
"{{ auth }}",
|
||||
{% endfor %}
|
||||
]
|
||||
{% endif %}
|
||||
[frontends.{{ domain.alias}}.routes.{{ domain.alias }}]
|
||||
rule = "{{ domain.frontend_rule }}"
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
[backends]
|
||||
{% for domain in traefik_config %}
|
||||
{% if domain.alias is defined %}
|
||||
[backends.{{ domain.alias }}]
|
||||
[backends.{{ domain.alias}}.servers.{{ domain.alias }}]
|
||||
url = "{{ domain.backend_url }}"
|
||||
{% endif %}
|
||||
{% endfor %}
|
|
@ -1,86 +0,0 @@
|
|||
$ANSIBLE_VAULT;1.1;AES256
|
||||
63396666643636643262356139396236353364393861666663656436356534373433383261353163
|
||||
3333663631653834643532613133373336386639383862370a313033633038343235303733616365
|
||||
33616531646334656237663030316364623730626334623666653234643139393832663861613139
|
||||
3739323739376332620a663262396461633039613839313837386364623036616136353136656464
|
||||
33633530323663396137613763396437613535393361356235623838366563663331616338636536
|
||||
63633262323733643262646130663730646165386266396631396137663937646165316330323933
|
||||
39643637396637386562656265303934393465343364353263623333623933396336623535663639
|
||||
35396463303537376363623533313139626563666461323639646636616138633131323639313062
|
||||
61336266306238613362333531346239353839616233366636653463633931303164326630633739
|
||||
66363363363161656237656562626236636333363431313138396461326562333937343237333433
|
||||
39303433333331613836663037306531363162333536616236376330656361316263356635643162
|
||||
33376232643733373535633231303334366166336332623234356430396465346338643365663735
|
||||
36346130306239396331306431616437323039393934633932333664393530363163663330663939
|
||||
66353636396233646466336165323930656434623432363334303530656238383031396562363838
|
||||
30666234393035633331626363333863366330333661633663613431333534643162333932386432
|
||||
38323037666536663330366261353964346238653938376535613030306434363332376134393864
|
||||
66306633613238646437643564373132356631303963383832386234383665623365333439386431
|
||||
38643339333135306130363034333530666533333430363863653034383663343338623565313632
|
||||
63646439326231376237303362316137343930653432663030393338363966373339323135356165
|
||||
39613538613366346132393038633462373165326131633539373262343666643333306238386362
|
||||
61333139613665633133616264383939343932343238353762303031353063646135613464363562
|
||||
62306362336238343861643033363563303736383866656535386530656535373035383663666236
|
||||
62386232656462633661333930373938646362643565396663303739653761643561666531306437
|
||||
33363162626537306239363263366535373637323733633031633266626531396366363164623238
|
||||
38326164333063633065376663336638353433393734613237323266643535633932353938393661
|
||||
30653935343835316136333335393438653765376135383737633437353264366663633139656439
|
||||
37356533633163326439373365393965356438393936386339333638636330333766643363343434
|
||||
34653035386236376465666433336139373435626365326666353161636364623538323837613730
|
||||
37633637356239653036376537386431346637313231656536626233633539333164666537363463
|
||||
64373633353730343034326461383837386461346361373063653535643534336431626138336266
|
||||
39656538333730396437633430326563613361623166656231383163346430633039636338313064
|
||||
35386563633236616566393435366631393732386134616461373236336239316334383533373537
|
||||
64386631663734353130646266663231383132353265366635393235393365653134623835333164
|
||||
39626130373730623565313435353836633462386637326535313365303031346437336661383131
|
||||
64626134653736383264393436633938333137386132666437313534636431613562623361323861
|
||||
35613563623166306463643231323934363064373863646137643566633739353161363365343562
|
||||
39303534343336316130336637366163326565393937356166343533653338333564303032323864
|
||||
38343561363264313465643633343261396335373861306131663562396535346535346232346134
|
||||
36326130376364333537353266633966363162313237393563303863346533653766316430663037
|
||||
39336561316639616362356665653933343836333363643062646534626430363266373661306533
|
||||
61633834626666343461363562666530386333306665313332376139633162633937623034373763
|
||||
66386263353334363662313736396131653731353162343363316165663237353665363135313039
|
||||
62613038363362346130346136383536643534396135646334313337613564613536623237653939
|
||||
65363063316639363436306236666335323031623936333931383233396532383731373665623265
|
||||
34373164666162393462323666333032653038653933346338346432303834343438643262343964
|
||||
33343130383338653865346538623539666331616265386231386362646533663661386434363266
|
||||
33336466616432363836333039626538393132653937316233373865376464656265346636383637
|
||||
32613732366439393563613662656562623130353839333331376564303064633961373165386339
|
||||
38633161666165323561656531663765396332656135633738373333653232313565363765346130
|
||||
65656561376138306232336161383963653132653836653966396433336364376366383130306533
|
||||
38313565663762623231366337373863353162343730653462656639623338663563346664393335
|
||||
66383262653532666665656430323561373666663331356133613065343661613438363733333636
|
||||
35626134346334363436643762303261336331653164373261353938383334656238383364326235
|
||||
37653263613336316563323763636239313034383837653231653932353162363062396438343235
|
||||
64383566303663353039626638613835353135386366656564356466653736346637343436646162
|
||||
32636434653162396639656464613063396365316237646264613565316536313962326232396262
|
||||
31343437353233626266333365363931666332613361373738663665626336656161316163373438
|
||||
38373064346562653038316463303338643731393138303363623363663633353131616465613139
|
||||
39386335396136383762376637613731346336346537393237343633646132636135323631353134
|
||||
63333537356235386263303866393835643366663537336465333663663932663564333863653834
|
||||
31386265303266666438666463613361393133386634313564333838646332366133623435396638
|
||||
35666435313931623163653962396430323531626139633635383934633934363161356466623530
|
||||
32393962393764363963643065623432336464363237343230366631653563396466303235393635
|
||||
39653031613133636536653930353031653838666663626632653430636435333632646263346165
|
||||
61383332343731393964326637656238613636383162303839323137383736313335613539363839
|
||||
61613433376162356162656438636162643463313535313332633239323436343838393566613065
|
||||
35333136623963616463306561656636633435356163343433383635363464626565333339636133
|
||||
64636466356130356365333835396136343337326437333330626566303333656231336364343632
|
||||
61373138633866633337386364613563333536383361653665353535313335336235656533393031
|
||||
37623837303062633865356637363531653730646438316138303066663962313831373066336331
|
||||
61623164313338373031626461636565653137663365383364386531643464646435376163383237
|
||||
34336636646332653037653438343438386464333431303431306334623765346138326639356335
|
||||
36366564323963373764636662376336646439376330303133316431333666636231666337373461
|
||||
36313336376632386166633438366265383132663036383136623561633136636335633638386531
|
||||
64303033303530623465643738313663383864303936323938333439353336303235383135343637
|
||||
36646664613465346162663466383764613366343236356230616231646338326436663133313733
|
||||
62343136363138363538323165313765366432373164356131646232643335633730646237316330
|
||||
61363731356465666533353432323433353138623531333430646239373437613438663764653535
|
||||
39666133633762323739626232326466623831363135666665613862366232623138303938376663
|
||||
62616166333562653264333665316339323632333865336363316436613030353064373635393864
|
||||
33386136343033373833643331363437623833336162343037643563653163653462653833323263
|
||||
33373433333363326638643231653534353439633165303965663630626535613263653266336530
|
||||
31353866333131373334353665333463306466633062386464623737626566643264663763613331
|
||||
30663531643931636261616434313639306662323534383266663562666133373339393739656263
|
||||
3734
|
|
@ -17,6 +17,5 @@
|
|||
- prometheus
|
||||
- promtail
|
||||
- snmp_exporter
|
||||
- traefik
|
||||
- nfs
|
||||
- rtorrent_exporter
|
||||
|
|
Loading…
Reference in a new issue