chore(deps): update postgres docker tag to v17 - autoclosed #27
@ -1,33 +0,0 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Prepare Build
|
||||
runs-on: homelab
|
||||
container: git.comprofix.com/mmckinnon/alpine-runner:latest
|
||||
steps:
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Deploy containers
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.SSH_KNOWN_HOSTS }}" >> ~/.ssh/known_hosts
|
||||
chmod 644 ~/.ssh/known_hosts
|
||||
eval $(ssh-agent -s)
|
||||
ssh-add <(echo "${{ secrets.SSH_PRIVATE_KEY }}")
|
||||
echo "HOST *" > ~/.ssh/config
|
||||
echo "StrictHostKeyChecking no" >> ~/.ssh/config
|
||||
echo "${{ secrets.ANSIBLE_VAULT_PASSWORD }}" > ~/.vault_password.txt
|
||||
echo "nameserver 10.10.10.1" > /etc/resolv.conf
|
||||
./.gitea/workflows/deploy.sh "${{ github.event.before }}" "${{ github.sha }}"
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
changed_tasks=($(git diff --name-only $1 $2 | grep '\.yml$'))
|
||||
if [ ! -z "$changed_tasks" ]; then
|
||||
for task in "${changed_tasks[@]}"; do
|
||||
tag=$(echo "$task" | awk -F/ '{print $2}')
|
||||
if [[ "$tag" != "deploy-homelab.yml" && "$tag" != "main.yml" && "$tag" != "all.yml" && "$tag" != "all.example.yml" && "$tag" != "ISSUE_TEMPLATE" && "$tag" != "workflows" ]] ; then
|
||||
tag=${tag%.*}_install
|
||||
/root/.local/bin/ansible-playbook main.yml --tags "$tag" --vault-password-file ~/.vault_password.txt
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "No changes detected in task files. Skipping Ansible playbook execution."
|
||||
fi
|
@ -3,12 +3,6 @@
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Write notify script
|
||||
ansible.builtin.template:
|
||||
src: scripts/notify.sh.j2
|
||||
dest: /tmp/notify.sh
|
||||
|
||||
- name: Delete existing template
|
||||
community.general.proxmox_kvm:
|
||||
api_host: "{{ api_host }}"
|
||||
@ -39,12 +33,10 @@
|
||||
|
||||
- name: Install Tools to cloud-init image
|
||||
ansible.builtin.shell: |
|
||||
virt-copy-in -a {{ image.dest }} /tmp/notify.sh /usr/local/bin
|
||||
virt-customize -a {{ image.dest }} --run-command 'chmod +x /usr/local/bin/notify.sh'
|
||||
virt-customize -a {{ image.dest }} --run-command 'sed -i "s|primary.*|primary: http://mirror.amaze.com.au/debian|g" /etc/cloud/cloud.cfg'
|
||||
virt-customize -a {{ image.dest }} --run-command 'apt update'
|
||||
virt-customize -a {{ image.dest }} --install qemu-guest-agent
|
||||
|
||||
virt-customize -a {{ image.dest }} --install vim
|
||||
virt-customize -a {{ image.dest }} --install git
|
||||
|
||||
- name: Create new VM template from cloud-init image
|
||||
community.general.proxmox_kvm:
|
||||
api_host: "{{ api_host }}"
|
||||
@ -65,6 +57,9 @@
|
||||
ostype: "l26"
|
||||
vga: std
|
||||
scsihw: 'virtio-scsi-single'
|
||||
#scsi:
|
||||
#scsi0: "{{ storage_target }}:0,iothread=1,discard=on,import-from={{ image.dest }},format=raw"
|
||||
#scsi0: "{{ storage_target }}:0,import-from=/tmp/debian-12-generic-amd64.qcow2,format=raw"
|
||||
net:
|
||||
net0: 'virtio,bridge=vmbr0,firewall=1,tag=10'
|
||||
ipconfig:
|
||||
@ -72,7 +67,11 @@
|
||||
template: true
|
||||
timeout: 600
|
||||
vmid: 10000
|
||||
|
||||
|
||||
# - name: Pause for 5 seconds while template imported
|
||||
# ansible.builtin.pause:
|
||||
# seconds: 10
|
||||
|
||||
- name: Import HDD to Template
|
||||
command:
|
||||
cmd: "qm set 10000 --scsi0 {{ storage_target }}:0,iothread=1,discard=on,import-from=/tmp/debian-12-generic-amd64.qcow2,format=raw"
|
||||
|
10
frigate.yml
10
frigate.yml
@ -1,10 +0,0 @@
|
||||
---
|
||||
- hosts: frigate
|
||||
become: yes
|
||||
pre_tasks:
|
||||
- name: Base Install
|
||||
include_tasks: tasks/base.yml
|
||||
roles:
|
||||
- role: docker
|
||||
tags: docker_install
|
||||
tags: frigate_install
|
@ -1,124 +1,100 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
34646630343732313061396666373463393031646135353834353265613361303438356563383561
|
||||
3936383632386635396130633831623737373039353061390a343265636532343539376335666536
|
||||
61343039323530353536373531323939306130346162353535313937323066316135363437336466
|
||||
3233616635666233370a323336303866333361613535633562666662663732313536613930346461
|
||||
61356637393363373662613633336332616631393735646130366439316566306265326261373466
|
||||
66363865306337666238633530383238623763616433306533323934346366323763626231316262
|
||||
33656263643566666531626236316338353561333536366664356161353234366330396236323139
|
||||
64393735323130623736623131353631616265653332633862643863653130623732653265363533
|
||||
66353963643430306164363066303666326534623934383936306233343931343863663637313837
|
||||
62383030616266356366333236393030356235656231396265363135396461303564323335373830
|
||||
36626161326133366564323038316135666638633765373435343435336266366338306161353735
|
||||
39313862653864306432323536303665393130343035303931343834326236333933333235343864
|
||||
35313935353538636365373262336662343866383333356264656133373331656433616330613734
|
||||
65653433663533333237653762313466316133333935626661653631343537373832383337386439
|
||||
37613035633862353266366366336136626635373932383339383730366231353065313733643733
|
||||
32383035656137303966636565653734653162663766386665656534373862323032306135666363
|
||||
39393766643865306639363664373265323131353236626438626362356335356636626365616432
|
||||
37653366376235373830396363613461326663623336346235386530363132323532613666376161
|
||||
36313961383165643562313563663165646239303664633137366330613565366130323830656234
|
||||
62613434623833326233323234323939333263613736396335393833336332633064623564373863
|
||||
37376233616664313234656362393166396365656566313761383236616533663865623532666432
|
||||
64326639323535373437333564366539666630353661383661336635373636323235356137376564
|
||||
39613332633133303061633166393837386563316331303938326562323935333331616534633237
|
||||
39386335346232333964323938383934336665313365623239616539646131376465366635346663
|
||||
35616339386661313032316234323731336537633539323763623363346266653861653961356234
|
||||
63383530323432303538353837353061626335383162383464313131353436333630656131383437
|
||||
65373162393531313831376464333430303736393237323233643833653163613961613561363739
|
||||
34336162336531636439303839323632393532646633613834316432316631333463646262343636
|
||||
32313063363337363163343631623938656463323134326461616432663464313132386363393930
|
||||
39346637643139393561336235326137316663326562323362616166633735616532333364623935
|
||||
34306230353837643562646565336164366662626431643866623330363064393963383433633739
|
||||
33623764373838386531356636383630643438393635303638346262306566633437636639356134
|
||||
66383663326433343333393639633834636235316264386236623961653830363136333031333037
|
||||
37326631613236633466303935363638623961393363613232303137376132633234396631303461
|
||||
34343063323132643535346366646330306365316436373862396134613139383861363863336362
|
||||
61363230396437343337633062636437383133653639363265666230383538383566326432306533
|
||||
66323434383238336430323464376336656136393331343665646265613833656634356331623530
|
||||
39653966373733336332386432363463393665343562376366663933353833333462303937356134
|
||||
38326466396565646664643636376166303332373962333231313738626637306466373964353537
|
||||
62323434663462613536393963373162313439666262303031303161376161633730373263386439
|
||||
39323734383333323432313530376634303732663362306262643465353831373839633238313763
|
||||
34396237623739623037643336616366303135333137303566313330306666313837356536613265
|
||||
62323361643431376339353039323432623032333135653436363138666237323234333032373232
|
||||
33616366646465363165303839383562376366373561393932363236373737313736613863376633
|
||||
32626664393864613436336633353631633363366235366166316534333336653137373863333964
|
||||
36656363333961653735353063383964616333613561646339613364333537663661313563353436
|
||||
34623766306437653632396464323133386432353834306538313165636339316661363663383139
|
||||
61333366303162343337363265373132323830613134656563663966663233376139613861616436
|
||||
37316439643662623364346339366462336238363462666632616566333331306337396631393762
|
||||
62633866353538326138366463633461393361666335623362393063333064336236656137373037
|
||||
65316662313835623131363761396139663064653565643937316138356661306164653366303733
|
||||
35396432313731303533663930323131666233386164343036346230303261396161343762373863
|
||||
33613733633565626232336261626466356134353464323665613136373061343537323862313031
|
||||
32653533643463306664356238333761326637323463336237396339636539386232653866646639
|
||||
35306336323762396338316131366465326236363238353830336539363664343935346164653832
|
||||
64333039363066336561303561623331363839623139613939613535333763396564616437326662
|
||||
64303463333230653439376264386365363035373636366162613662353761643231613034353331
|
||||
64666334626637373863326264333031346338373337356363396264643864653334346234316332
|
||||
63373430306531353835313434336331636230306132653065653866613339333632396332363664
|
||||
62376235623430373536393839656534326665613936316163373562623866396665343334636461
|
||||
36643264383438636537633536326465313161633535636633643831653439653239653464376335
|
||||
37633736323232313030633063373031646161373836613535623438313138316631626130653064
|
||||
39646434323132353732653464656365666266623461376430346335643638346334636164303736
|
||||
32653766383537656133346632663232306230396366656635333165633465636334323639613265
|
||||
64613862623036303731373137376164383631386534646636366236636235666237613131636366
|
||||
30386530376534613066666631386338393265653735343932336263343066353930636230613861
|
||||
33633033646164626163653435303836336161303937313833303462333134383666623537383934
|
||||
37303466646230383632343466396230636563336131383165346630303335313633363961646466
|
||||
62643236653164336561323237316562633363306536653037616132616562653338393364643332
|
||||
35346130376136393437663535666130373233316439333935623138623561643461353636323539
|
||||
36313139353662366635313031663938376566343832623432383631646265393334313235333539
|
||||
31643537383462663361643461363439643065306666353737626431353662343630383432306638
|
||||
32396262313964326466303630613830626661353661643261373035636536613666363061323539
|
||||
31366565366337633462363830636162646239363132386563666637656439386161663730653531
|
||||
31666231663431626266653132633135306332626163393235383630386662326633383534383262
|
||||
66303163336638643530316137666162386139616234323066343666643834316236336663326166
|
||||
30333338313932313330616633346566663038663266653139386536653030343438316639363839
|
||||
62316435653965316662346564353133626232393636623563633530636430303362326534323065
|
||||
37366234653437323061613462353532393264353139656565326561353530613864343236656164
|
||||
61653066323966306663353935326136303537373832333738356364393938333139616339633061
|
||||
64336364313264323234663666386263306437333161313732643435633864386264396639613963
|
||||
63356132626263393665363163626662633531633264396133626139333062396264306664303762
|
||||
32316134623933326534633466396366653832363666353835323161333362646362633863396336
|
||||
36613366626663393538613732623037616339353632303966303665383438346666623465303737
|
||||
35346532663536326439646464333137646333656239636661383433373664306438366634663039
|
||||
62633562346166646466633138313936363138633134633631373133333434623830613566303363
|
||||
62653866663661653933323530656233333235306165616232343330316137656134373038306661
|
||||
65326533316135373461643564313461336161613237346235333663376162353565613163396133
|
||||
34316561613439323238666439616266636135656565353636353163653430656638363532623364
|
||||
37366561646233663464643064333965616166373338646638353834306631353830613334316163
|
||||
64323761623562623966643932626364376132343733323731343530613262636265356235636635
|
||||
39613131636663663338623166366165626263333436663339323564313633643134383537356364
|
||||
37306464633535646530306136666236336566353865356166626361656532373534356266653638
|
||||
36366533343732333330333234313334633665383939626662316365636333363662383733366132
|
||||
61326333346635353439356437306364303161646439333930663265303530353835376161393530
|
||||
35333438643130333334623365363566616165646133653733616661316161313765316463363334
|
||||
30333432323134646462613762323936346536613331353131613133323866346535383235383362
|
||||
61323132613163316432353236666130336333363062346638343864653065336237653435623762
|
||||
34663933316236356364343534623061623265666166346331383133343630363039373631313964
|
||||
32623766663432366136616566333339333835323531313438313832323365613736663061313264
|
||||
33653261303061643163343337613166653663333633343136306262643233303734323134306438
|
||||
63396561366135656333666435393961323461313566353466393133363965393137383761363237
|
||||
39626661336430646261353963343234303866336437663935656566653936303163343939656263
|
||||
39383637623961656166373463613561373737633731343034356261616530356133353365393962
|
||||
36383363666437316335343865396636303864366131623435316637353836376138616139666264
|
||||
33396363653932633062396634393735653832373933373266333165363438396537303763393765
|
||||
63316231633964333532323765356632333339383632366361356663616633366436316666643036
|
||||
66336533653163623762376235396235323536326333383663383538336436656231633230303361
|
||||
64353431636430353966346163313364333634343438656132326466306130386363303936333732
|
||||
35356666386264343237313161376538396336643130336134336339646331333536373365303637
|
||||
62633165333634616661656166636266353634613764326539346631383532323930316464356162
|
||||
66373762663432303736663961643037363164336137316239353939656665353239663331636330
|
||||
32346233613264323163646237353361633933323361373763653132323239373136366361626334
|
||||
37656130316636646539383366626136383931353836643239323633386161643332343639633537
|
||||
66373931396263346564373963616465646166346231323730326338613534373864366332383561
|
||||
63326236343933613766623961306236653865393863383261653939336138346232353864656662
|
||||
31353030316366373164313763316232326165646130356434663963343066653865333264363138
|
||||
35303361383136333866383038396563356632653263623432646130323036356538643062383630
|
||||
66366264646531623030373537386632653632656431663466323334306636626564386433306138
|
||||
33393339376135376462343639633238363631343862636562313534386265616331313263376430
|
||||
33356636646332626636623634616261323262343532383263643035326636383966616430356336
|
||||
33306562346634623666623061623365396230653566323032313335653536646539646634376636
|
||||
643562316534316563643238333762633339
|
||||
64343839626330386331646462663462663936396466316130313266623633613262616431383731
|
||||
3365393436363336313633323031326666363736643632310a393631396465396363323335313230
|
||||
36393861303062623565353632333262393431373861363239356431353931323630623563373035
|
||||
3832383534326139640a373832303461623665303530623138653962613062336665306132346261
|
||||
63346134666631623338383961353066373264346365343365646565313336626266383135343831
|
||||
61363132333634313233396364303631343436383630346232343863623163643536363031656565
|
||||
63383239643335663833383366633237336266663965353964666632393963343432333161393238
|
||||
62613965623834393866366630303131353830373764313139316263326235363531643661646134
|
||||
38313431303163333764616230336565643466653632373563343466383630303830343261646639
|
||||
38666666393831346365356338643366393234343261373763643938366265316232383139323232
|
||||
65386535633330383831653638343238623066316161623862326130366431333131313033653538
|
||||
30653964363163393033626439333037646236376135646362363735363438383462336333313161
|
||||
34356632646562373738333233626635333662373134343232363235386236393039356666656538
|
||||
39316439373837303133666261663732623730366666313363363330616537373039363661383338
|
||||
37376535653066613532376333393963353734346536383630393864316334646263376132646434
|
||||
37633630373734666636613639646631643039396666346161383435653739653737633239623436
|
||||
39623364616463646665643261653738343635663933323935343162653335656334346338376166
|
||||
36616334646337383230633361373663666534336261653838346262346630653263303236363465
|
||||
35366139653766663731393864356465616336353862383636633962323865353431646133323930
|
||||
65303563646535663530643664373861373938313561633366343466346532626632323136373563
|
||||
62383963393031353531373664336635303338323137323864376330343830323161623130393932
|
||||
36316538346637343430323735323338366463396233366238653532623336636562376538313038
|
||||
34343066623366656335326461316538643466346166643432663766316465386130623139373436
|
||||
64306230646338336632363134616430653634356262613066363834373339376363333439356234
|
||||
62663336633830393366336561343366626266613336363639616566376266303431323861323164
|
||||
63346638376564396161303634343765386661653461666266303566346365356664303038383362
|
||||
61393938383761313839373634353763613532623135383331393934376135383330303331383834
|
||||
31323664623338613161316464326432313764346432323236623237623232356139613664633935
|
||||
34316431323835306331316232656534346439356236353235313231363163633332643030613530
|
||||
30386435326535663533643237326439616666656261363638343664366633366532333037626139
|
||||
32393939323833386665663931376337613433646439633163326166613035326639623462306166
|
||||
65616433373264323663663839356637316466633836343233336666393435366535333732623666
|
||||
63656433323039666564613734393836353238623433393165616633383231613763346163306239
|
||||
64373338656431353336633130373635306666646430356266343566663063663036376339366162
|
||||
39326133386437623663643831633666396231336331326136303761656363326132643338343361
|
||||
32386365373932336561333366616437663235643832303834663737666564393333316464646136
|
||||
31306533373133383362393465613238366265653464313730383937636338343938366563393033
|
||||
34613238343333333663363132386162323033373331626339386636653435353063613634343738
|
||||
63313235323465383839383165323561646337633862326431646165326236373032323561386266
|
||||
36373034643862623937336633666637666662303134646137383930663865383832333630303033
|
||||
32313832353134333439396563366266393832663638383530663438663963663634376666613463
|
||||
61636531376166313463613365333435623032393634636130366261643961636534323064303066
|
||||
35373934653163303337316237643230336463353366633432666430316362646534623730376231
|
||||
33363661396233393662643435373263633836343237316336346138313663626533636231363739
|
||||
39646238633766303535333662646361396462323539626365346534653762323764313836613136
|
||||
30363766646365346165353163383335656531383230353536616432616331306661333837366430
|
||||
65653431376133303531356231663136626562346336373738386266303262646263353862356361
|
||||
65333337363864326466623361323461363361346262323031393130386435323063616261333237
|
||||
33303238386533623265386237333432616361366661623333316532386563336632396161323861
|
||||
37333833316664646539363364323163323264636133643030323631333430333030346561356332
|
||||
34336362396136656230383837393332316130363438396538323462623033666465383633656233
|
||||
65306637633764613130376233333130306263656530616430383265626639613566653836373165
|
||||
66303838633033643137303739336337333936653833353035346263633463353365306333353338
|
||||
31383162326334393536393664373137646332626536393266323932303038663038343665613437
|
||||
64353264396561643665303831626361353136316463626334303630306430646161393131313065
|
||||
38396536373933306330356434333861306434393962313436386464613631303165366535366463
|
||||
39316636326362326336333130336436613532366334613439373637636465336636323334303833
|
||||
35353061643865356138303662656633633763303461653137323965376133613236383061356330
|
||||
62326637666434353135363735346534363666396262383638373763626534343337643037643439
|
||||
61306266663662646464636432303631373736633033646131656431373531346331356530363139
|
||||
39366264386438643564346664353762303837613435393766613832376561613261623831653666
|
||||
35343236666661346361306438633061616534636433353462643337373331306130653134613231
|
||||
35326562373737623364363561323333353839633637623039653338653134643437393331396637
|
||||
34663535653439333663343239636335333265643232383637383264393635313532313466633232
|
||||
36373562646239383638396532653130646263366262373932363930313339396462356530383739
|
||||
34393235646234386532393630373436353834336637643435346630633961663638333839366132
|
||||
32666337366566346166343236303736643631386131373762386463633535623433336131353631
|
||||
62663036633866666162383833353666323763343337656362626166363164326562386436623662
|
||||
39323538653337626231303336666264663530346564613465613530643230333934613465373465
|
||||
62366137633532616335623530323961663830616663613938316437646630383434643430386433
|
||||
39373839636538303239646436366339656333353365343138313364643234346236316162616430
|
||||
31323238393135636165336636633336633232386661613762326563323638626533303034346131
|
||||
31323433316261633232383562646566376266633466643637366366346235333934623462636431
|
||||
37623135316634616334353062373139653865633934393930393364343430626163663064343533
|
||||
34616430663232356231343831306662666432373937316661346462643231343539643561363862
|
||||
30353636353362653366353438346531666637663763636138666366306339373633306335323537
|
||||
38393461303261666437393639363265373531643534373163633161646164616664663139333361
|
||||
62303062623833333537626332353062366566663138376364373062363664366438323039353735
|
||||
63303236336235316431343330356138376361643766646535363364363739343563623831336466
|
||||
62303462393033373631616236656664373431333532383935383663383762353763336663373039
|
||||
30656162333762363139393961663632316538393638316633633663393361363237366262383235
|
||||
34383964643933633839303736633633653566353836363230353438336134396566656664646434
|
||||
64326436636435323137363239656131303162646635373736656663353630303630336164353165
|
||||
35333066396132393337383431383862623437306430313730363633333138383232633431613262
|
||||
39353564303035666235303364393664376264323466643135373433656562656132346431396264
|
||||
63656461383438363736386633343835643063613932613339366132663963666466313132663033
|
||||
66633265323939653437373764353161623963636437663563613238323561633735643036346634
|
||||
32656539356135373163353533313733393932333766643730663239363163336666653039393531
|
||||
36613535663561323037613930306430323864366432633065356665383263636439633333323332
|
||||
36353364626465323338326634646439633836616534333763626265393732623039306639393838
|
||||
38363063386462383165316362353234623832306237396131316365343664666232643530363338
|
||||
66306331633361333762303337363061643664396335303135656235653537396433326230653863
|
||||
63363466363135333834346264613432653532336534643938616362643064656665393939306437
|
||||
39326366343239663461643262636564363632636431326134656163343862393731643133343637
|
||||
63353134656464616531373835323637363861316535663564313735356662313931313833373239
|
||||
30393463316665616439303064356438383665313832656139323737366234313732353136346364
|
||||
31353163393535356164386561323838623235383630666633346130353939633564346366373236
|
||||
34393332373438666461333061323430383663626436663735336636643531366539643439623636
|
||||
373264356538616535636564643665356562
|
||||
|
7
hosts
7
hosts
@ -1,12 +1,9 @@
|
||||
[proxmox]
|
||||
pve2.comprofix.xyz ansible_user=root
|
||||
|
||||
[cloud]
|
||||
vps02.comprofix.com
|
||||
|
||||
[docker]
|
||||
docker.comprofix.xyz
|
||||
|
||||
[omada]
|
||||
omada-lxc.comprofix.xyz ansible_user=root
|
||||
|
||||
|
||||
|
||||
|
85
main.yml
85
main.yml
@ -1,10 +1,11 @@
|
||||
---
|
||||
|
||||
- hosts: all
|
||||
name: Configure all servers
|
||||
tasks:
|
||||
- name: Gather facts if run with tags
|
||||
ansible.builtin.setup:
|
||||
when: ansible_run_tags | length
|
||||
- name: Gather facts if run with tags
|
||||
ansible.builtin.setup:
|
||||
when: ansible_run_tags | length
|
||||
tags: always
|
||||
|
||||
- hosts: all
|
||||
@ -15,16 +16,17 @@
|
||||
|
||||
- hosts: cloud
|
||||
become: yes
|
||||
roles:
|
||||
roles:
|
||||
- role: docker
|
||||
tags: docker_install
|
||||
|
||||
|
||||
- name: traefik
|
||||
vars:
|
||||
traefik_host: traefik01.comprofix.com
|
||||
tags: traefik_install
|
||||
|
||||
tasks:
|
||||
tasks:
|
||||
|
||||
- name: Deploy Vaultwarden
|
||||
import_tasks: tasks/vaultwarden.yml
|
||||
tags: vaultwarden_install
|
||||
@ -36,25 +38,21 @@
|
||||
|
||||
- hosts: docker
|
||||
become: yes
|
||||
pre_tasks:
|
||||
- name: Connect iscsi
|
||||
import_tasks: tasks/iscsi.yml
|
||||
tags: iscsi_connect
|
||||
|
||||
roles:
|
||||
- role: docker
|
||||
tags: docker_install
|
||||
- role: nfs
|
||||
mounts:
|
||||
- name: Data share
|
||||
path: /mnt/nfs/data
|
||||
src: truenas.comprofix.xyz:/mnt/datapool/data
|
||||
- name: Data share
|
||||
path: /mnt/nfs/data
|
||||
src: truenas.comprofix.xyz:/mnt/datapool/data
|
||||
tags: nfs_install
|
||||
- role: traefik
|
||||
vars:
|
||||
traefik_host: traefik02.comprofix.xyz
|
||||
tags: traefik_install
|
||||
tasks:
|
||||
|
||||
- name: Deploy comprofix.com website
|
||||
import_tasks: tasks/comprofix.com.yml
|
||||
tags: comprofix_install
|
||||
@ -62,23 +60,19 @@
|
||||
- name: Deploy iDrac Fan Controller
|
||||
import_tasks: tasks/idrac.yml
|
||||
tags: idrac_install
|
||||
|
||||
|
||||
- name: Deploy MariaDB
|
||||
import_tasks: tasks/mariadb.yml
|
||||
tags: mariadb_install
|
||||
|
||||
|
||||
- name: Deploy InvoiceNinja
|
||||
import_tasks: tasks/invoiceninja.yml
|
||||
tags: invoiceninja_install
|
||||
|
||||
- name: Deploy Guacamole
|
||||
import_tasks: tasks/guacamole.yml
|
||||
tags: guacamole_install
|
||||
|
||||
- name: Deploy Homepage
|
||||
import_tasks: tasks/homepage.yml
|
||||
tags: homepage_install
|
||||
|
||||
|
||||
# - name: Deploy osTicket
|
||||
# import_tasks: tasks/osticket.yml
|
||||
# tags: osticket_install
|
||||
@ -90,19 +84,19 @@
|
||||
- name: Deploy dozzle
|
||||
import_tasks: tasks/dozzle.yml
|
||||
tags: dozzle_install
|
||||
|
||||
|
||||
- name: Deploy jellyseerr
|
||||
import_tasks: tasks/jellyseerr.yml
|
||||
tags: jellyseerr_install
|
||||
|
||||
|
||||
- name: Deploy lidarr
|
||||
import_tasks: tasks/lidarr.yml
|
||||
tags: lidarr_install
|
||||
|
||||
|
||||
- name: Deploy prowlarr
|
||||
import_tasks: tasks/prowlarr.yml
|
||||
tags: prowlarr_install
|
||||
|
||||
|
||||
- name: Deploy radarr
|
||||
import_tasks: tasks/radarr.yml
|
||||
tags: radarr_install
|
||||
@ -110,7 +104,7 @@
|
||||
- name: Deploy readarr
|
||||
import_tasks: tasks/readarr.yml
|
||||
tags: readarr_install
|
||||
|
||||
|
||||
- name: Deploy sonarr
|
||||
import_tasks: tasks/sonarr.yml
|
||||
tags: sonarr_install
|
||||
@ -122,38 +116,19 @@
|
||||
- name: Deploy mealie
|
||||
import_tasks: tasks/mealie.yml
|
||||
tags: mealie_install
|
||||
|
||||
|
||||
- name: Deploy pyKMS
|
||||
import_tasks: tasks/pykms.yml
|
||||
tags: pykms_install
|
||||
|
||||
- name: Deploy gitea-runner-homelab
|
||||
import_tasks: tasks/gitea-runner-homelab.yml
|
||||
tags: gitea-runner-homelab_install
|
||||
|
||||
tags: dockerserver_install
|
||||
|
||||
- hosts: omada
|
||||
become: yes
|
||||
pre_tasks:
|
||||
- name: Update packages
|
||||
import_tasks: tasks/base.yml
|
||||
tags: base_install
|
||||
roles:
|
||||
- role: docker
|
||||
tags: docker_install
|
||||
- role: nfs
|
||||
mounts:
|
||||
- name: Data share
|
||||
path: /data
|
||||
src: truenas.comprofix.xyz:/mnt/datapool/docker
|
||||
tags: nfs_install
|
||||
tasks:
|
||||
- name: Deploy Dozzle Agent
|
||||
import_tasks: tasks/dozzle-agent.yml
|
||||
tags: dozzle-agent_install
|
||||
|
||||
- name: Deploy Omada
|
||||
import_tasks: tasks/omada.yml
|
||||
tags: omada_install
|
||||
tags: omada_lxc_install
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,25 +1,8 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:recommended",
|
||||
"renovatebot/renovate-config",
|
||||
":semanticCommitTypeAll(chore)"
|
||||
],
|
||||
"ignoreDeps": [
|
||||
"postgres"
|
||||
],
|
||||
"automerge": true,
|
||||
"automergeType": "branch",
|
||||
"automergeStrategy": "rebase",
|
||||
"commitBodyTable": true,
|
||||
"ignoreTests": true,
|
||||
"major": {
|
||||
"automerge": false,
|
||||
"dependencyDashboardApproval": true,
|
||||
"commitMessagePrefix": "chore(deps-major): ",
|
||||
"labels": [
|
||||
"dependencies",
|
||||
"breaking"
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:base",
|
||||
"renovatebot/renovate-config",
|
||||
":semanticCommitTypeAll(chore)"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -43,7 +43,6 @@
|
||||
- name: Setup cron job for backup
|
||||
cron:
|
||||
name: Docker Prune
|
||||
weekday: 0
|
||||
minute: 0
|
||||
hour: 5
|
||||
job: "docker system prune -af && docker image prune -af && docker system prune -af --volumes"
|
@ -1,51 +1,51 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
30353665336262626664323063343065646461316535613635646633653366653637363634636663
|
||||
6334616439316438303235613033646663316166316163390a303038313162376636333833373437
|
||||
37336665636437666463363935303162623366666636373732636137383234636136396630366564
|
||||
3438613335386432370a353762353637396230396364363632616661313337613431373337653934
|
||||
66386561613131313337313765386238323434373264636139393637333638346263613662366462
|
||||
31366639316666343563363564346536653131626532303765613064346666313364663466363038
|
||||
31613034353839613732646234383462346235393862333735643431303963663232316561643462
|
||||
66386561663135346130383564646462316532626534333366653565623836393361393765386234
|
||||
33366532666164653339663439356161386131373662386232383338646566323631363036323130
|
||||
61623339386437653235343935333739653739376232613533663635313765613366376339323232
|
||||
37376465336330316431653763363330633831313836623130663936323139333139366562326430
|
||||
38383232613336313135643836653638356261623161363266373465313934333339653763323836
|
||||
37313632636366653664366539333232616166366233653537323761386264353035666636633237
|
||||
65626432633937633034333838356637643764333165643932333465393538663335623662613435
|
||||
62656465623966326130363364343164303239393038353937356663303130303230626365333662
|
||||
66623531353237633432316161316565363935343735303530316662336232363636333266383332
|
||||
35333533376134393339626335383336643535623161376233646264663133623634636336616462
|
||||
31656236633364303464366539613037616130356637643939366561656534386663303339316134
|
||||
33643463303562363231383965653633623464396365363531333630333037333337396534376332
|
||||
39666536343636323834613565653234346230666361376232313135376463363934353365643061
|
||||
64613030663430633131363264303134353863336566643937306661393732666566643734373832
|
||||
38356465313339396530386430343863313330633566663839316564643437386464353138373266
|
||||
64373664636538653439333439303332346535383734653563616266323062306463303338366364
|
||||
34643161303532373530363338626334383662346562386266373138643736316332363039666361
|
||||
37656231326232383763363031643762393565616466326566356431613866646462643837313361
|
||||
65396563366339366461323833393134393236643664363831326465613931353762333261393033
|
||||
65633435643564343065323262613666646139366661343139313436316134616364366662613362
|
||||
39323337626265393061636662656334623133666636613663393131376632616637653761396430
|
||||
31396366386636626465326137326461636136643330613935623966653630313236626436356432
|
||||
38653362653831646266613734326132356139323665343366386362356435356137353162366661
|
||||
31396564393763393936646464666537626231353639366262613539623031393830333338356332
|
||||
63643866653365306532653464343465336565633734306139623862613063613030303234383733
|
||||
37343135643362306365613361363764643137643265666463666234643163623238303734373264
|
||||
35346562663331323034326465316666366232663734663537343936333332346337373062346534
|
||||
66363530323863636238303138383632316166386234653062313434633534303637666636353863
|
||||
38373466323431363037366538666238353231653138336133636232353530386630373930313334
|
||||
37633232393238373733363831383962633134633064613333386365346463326339613634636131
|
||||
33373662643162653762633338343332366461363465393934643337666466623835383238383133
|
||||
34626663393463383463623636323134376431666237366566636238316636623635393262336436
|
||||
62643839356364333239356161303838653164306161366234663339313430613635613233366265
|
||||
65393131326236663336306364333137333632323364313264376332613861656263383361373561
|
||||
61653831663332383135653566376337653132643062383965396634393538333963636433343061
|
||||
37613334643465363934306461376339363634306166363138323836626334393739633439363132
|
||||
32336662343963613531663733353430373932366634303239363937303932396533316233636663
|
||||
62373435343839633630376362666132613632393064323836323736383335386533306532656536
|
||||
34353165383861633063343565313733323263333262636262343264663061633863646362633036
|
||||
34333238386430613334653037346639303630633138643336616164356537313832633634356661
|
||||
62643738366263326539346139393032356533373735636263623838663435306264616537373266
|
||||
64626536626232393236393465653063343964666138616164323733363263633233346262326538
|
||||
3961613338643931323365636262313962316261323938306633
|
||||
39313339373165343238363465353965316536323664633761343236316532386661303662336231
|
||||
6338623335393732396162633239333465353534333638360a383761346336623538643564383239
|
||||
65333966336434306465613138623766666434346439313536363364613837663933316535393134
|
||||
3235303335393036300a613735393164396361353263333562396263643064343561353735353563
|
||||
64646631353136353432396561326335306636383336346430356461366431613037613163363163
|
||||
36323331666532613866373462373235393239613937613536663061613866376564333031333834
|
||||
65346564373835646236386230393838386431666539303263656637353663376234613562363136
|
||||
63306532373461653539303862373036373861383865653137383333383731616131323665333636
|
||||
63643935633032666164303335386436343566306237636162356630366236656337363633326530
|
||||
65306137316236646330353736663261623166343539303937346234326135666536373863653066
|
||||
65623731373135613764393532303065303936323835613139626637353565336335323866376338
|
||||
66343237383463393132396636656235346566373432643533303066386462323137643866373936
|
||||
62663666336663383664653065333134643762616530373561663061383932323762636661626434
|
||||
33383463383139343166613166383336393664356164616433636231383635343163376531313034
|
||||
30636435653038393332653964656230393936383837653065313831633736633861656163643463
|
||||
62333430656136333230353363643863303837366637373565663836326634646561346137343731
|
||||
65653939326366613930383935383564353930376131376139313265376335623534613262643934
|
||||
34353961343135313933636630616666316136643238363962646563636333633165616239356432
|
||||
64656330613336636363313833356439363038656265393561343263616366653231393438313533
|
||||
35636437643764366533393263393231336366353033646266383962396264333639643464306561
|
||||
35343633613863343431643831646164636264366561316366303338353965646634353036336231
|
||||
62626430636166643062343865613037626635356439646336396436343539386337363236393562
|
||||
61323037383331343636343266313762616664343336323163353131326130326134356437313832
|
||||
36356563316561393366636234396565366465333064303439336136356630386662323030393636
|
||||
62316334383064613938376335636264323731626634333061623966613663376266383535633964
|
||||
63383030326461323730383239323137656338623465653735303838383266333633656435653138
|
||||
37373632616536323466316439613865396239646137323666653533646333316434616466663438
|
||||
32633864313434316366663035386462653430306534353062656430623730656537366262346366
|
||||
39633262353665613766333161663263316463653861623130383062303161326133653736393564
|
||||
36366362363931313430356436633835343737396466386434623933323133626136353431363236
|
||||
65376230636262643962666466656532326438366138646239643262303536326630396562626336
|
||||
36666436663037383262366236623730386662386362616431383937623633356531306662643834
|
||||
35336236336566393561613861666330343937336232306333373733343136623064393861616466
|
||||
64386239346539386236306434373461313765363031633436393037663461333734373063373564
|
||||
33646265333538653835363063363031313439666237326433346265373362643364353130343738
|
||||
36363162303665623731353139313932316361336432376265333836326332313331366330616166
|
||||
36633764316462613538653265343031313033666534396361313837653339613339633232626666
|
||||
62323166623666393232633630666164363839616161383465386435316134303734316464356136
|
||||
64316565353161386162383237643964646432623939393532663962343964313966323032653531
|
||||
36643461633935306439396364616136333364376234613135306464383531616262666261343235
|
||||
62353565336535393439333263663434626332613533653165343134393166353036363038353561
|
||||
31666238363963383831383365656333653036653130333237616466393830326666306636383837
|
||||
65626138616262373032353865646261393534613165386437383166313939326331333238393638
|
||||
30343931393933663339623930393262306336656437383338643232393932363731616139323633
|
||||
39613361396630323961343731373439336464366332633837366333346239633836396130303766
|
||||
65323361636362303061386430346662373165663635633534383338333762386233623661383731
|
||||
36383262626533323636653933333961306137356366653131303235346362613231366335373630
|
||||
62336232373064363565353361656631386565393533343932663465373935313465343035326437
|
||||
34313563323764326135616462303830663365633630326533376666323632303732343761343935
|
||||
3636363938336630313736663832633833626530323834336566
|
||||
|
@ -16,14 +16,7 @@
|
||||
template:
|
||||
src: templates/traefik.yml.j2
|
||||
dest: "{{ data_folder }}/traefik/data/traefik.yml"
|
||||
mode: "0600"
|
||||
|
||||
- name: Copy Traefik config
|
||||
template:
|
||||
src: templates/config.yml.j2
|
||||
dest: "{{ data_folder }}/traefik/data/config.yml"
|
||||
mode: "0600"
|
||||
when: traefik_host == "traefik02.comprofix.xyz"
|
||||
mode: '0600'
|
||||
|
||||
- name: Check if {{ data_folder }}/traefik/data/acme.json exists
|
||||
ansible.builtin.stat:
|
||||
@ -36,7 +29,7 @@
|
||||
state: touch
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
mode: '0600'
|
||||
when: not file_status.stat.exists
|
||||
|
||||
- name: Check if {{ data_folder }}/traefik/data/traefik.json.log exists
|
||||
@ -50,13 +43,13 @@
|
||||
state: touch
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
mode: '0600'
|
||||
when: not file_status.stat.exists
|
||||
|
||||
- name: Create traefik Container
|
||||
docker_container:
|
||||
name: traefik
|
||||
image: traefik:v3.3
|
||||
image: traefik:v3.2
|
||||
restart_policy: unless-stopped
|
||||
networks:
|
||||
- name: "proxy"
|
||||
@ -72,7 +65,7 @@
|
||||
- "{{ data_folder }}/traefik/data/traefik.yml:/traefik.yml:ro"
|
||||
- "{{ data_folder }}/traefik/data/acme.json:/acme.json"
|
||||
- "{{ data_folder }}/traefik/data/traefik.json.log:/traefik.json.log"
|
||||
- "{{ data_folder }}/traefik/data/config.yml:/config.yml:ro"
|
||||
# - ./data/config.yml:/config.yml:ro
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.traefik.entrypoints: "http"
|
||||
@ -90,4 +83,4 @@
|
||||
traefik.http.routers.traefik-secure.tls.domains[0].sans: "*.comprofix.com"
|
||||
traefik.http.routers.traefik-secure.tls.domains[1].main: "comprofix.xyz"
|
||||
traefik.http.routers.traefik-secure.tls.domains[1].sans: "*.comprofix.xyz"
|
||||
traefik.http.routers.traefik-secure.service: "api@internal"
|
||||
traefik.http.routers.traefik-secure.service: "api@internal"
|
@ -1,51 +0,0 @@
|
||||
---
|
||||
http:
|
||||
routers:
|
||||
oc-router:
|
||||
entryPoints:
|
||||
- "https"
|
||||
service: oc-service
|
||||
rule: "Host(`omada.comprofix.xyz`)" # change it to actual address
|
||||
tls: {}
|
||||
middlewares:
|
||||
- default-headers
|
||||
- https-redirect
|
||||
|
||||
services:
|
||||
oc-service:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: https://omada-lxc.comprofix.xyz:8043 # change it to actual ip of the controller
|
||||
|
||||
middlewares:
|
||||
https-redirect:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
|
||||
default-headers:
|
||||
headers:
|
||||
frameDeny: true
|
||||
sslRedirect: true
|
||||
browserXssFilter: true
|
||||
contentTypeNosniff: true
|
||||
forceSTSHeader: true
|
||||
stsIncludeSubdomains: true
|
||||
stsPreload: true
|
||||
stsSeconds: 15552000
|
||||
customFrameOptionsValue: SAMEORIGIN
|
||||
customRequestHeaders:
|
||||
X-Forwarded-Proto: https
|
||||
|
||||
default-whitelist:
|
||||
IPAllowList:
|
||||
sourceRange:
|
||||
- "10.0.0.0/8"
|
||||
- "192.168.0.0/16"
|
||||
- "172.16.0.0/12"
|
||||
- "100.64.0.0/10"
|
||||
|
||||
secured:
|
||||
chain:
|
||||
middlewares:
|
||||
- default-headers
|
@ -1,14 +1,14 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
34363735643132373933616264396162333165313535636239613431353265363635623766353732
|
||||
3462383931646233383431373265636235303262623136640a626662386133653263376164393935
|
||||
62373365363439323965626665366463323463346533643632633031383936646338663632383934
|
||||
6233313931303834330a666530346639306137666638333439333038616335383239613738666265
|
||||
31666638363638646135313634356665353132666562363062346364346331656130393230626331
|
||||
34373236633238376531376133353531303563623533656331356631646131646634336337366238
|
||||
36646637326262323636623935346531616163626230333631376439646238626533363630633832
|
||||
39323137326365623431313338636233616330616139613934333262373664366664303764306261
|
||||
63623365623632623762663365646162663331303362633231313931363730653130353837646339
|
||||
32666438373165313233333235366233353536636232353138626632653234383831353939346230
|
||||
34646463393030633735376636373737346132333730633463386531633263663935363966393066
|
||||
32333365373331376161633062336565656536636566626330623137636561626263363438323765
|
||||
3231
|
||||
37326164353965653363666362343638666536626536646534363962626530383131643035373332
|
||||
3834663632333832336232316439666530613061363930350a346235613533396231323530306666
|
||||
61376536303332353762323930623664373835393266393464333739313461636164653431646438
|
||||
3139653830306461320a656233383866333239383432616131373831363564333531313761663666
|
||||
30633334383230663737376666376331326232343931376333383330363531656239613865386263
|
||||
66616439646361323838306535333633313233383034383730653166623831336238373566633066
|
||||
32383836396133383030343361623034633236373765613731616137333039323235363134373735
|
||||
39653530626661336362313865386134303362316663303834376132313832626533393334393531
|
||||
66363265386463313830663162633933316365363563306461623664323637366162383636616633
|
||||
35333433636539643733646333626133663365383061313730323261623538363532393532303335
|
||||
31626265323366343237393833623963353739356138393866346230373066613938306463363934
|
||||
32633063336231343063356530663261623532303330613630653636616466643231653463376165
|
||||
3539
|
||||
|
30
scripts/backupvpsdocker
Normal file
30
scripts/backupvpsdocker
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
# Backup vps02 docker data
|
||||
|
||||
|
||||
#Stop all containers
|
||||
docker stop $(docker ps -a -q)
|
||||
|
||||
date=$(date +%F)
|
||||
|
||||
cd /data
|
||||
for dir in */; do
|
||||
dir=${dir%*/}
|
||||
backupfile="$dir-$date.tar.gz"
|
||||
#echo "backup $dir"
|
||||
tar -zcf /tmp/$backupfile $dir
|
||||
|
||||
if [ $dir == "vaultwarden" ]; then
|
||||
#echo "rclone vaultwarden"
|
||||
rclone copy /tmp/$backupfile BitwardenBackup:BitwardenBackup
|
||||
else
|
||||
#echo "scp $backupfile"
|
||||
#scp /tmp/$backupfile mmckinnon@truenas.comprofix.xyz:/mnt/datapool/data/backup/docker/
|
||||
fi
|
||||
rm /tmp/$backupfile
|
||||
done
|
||||
|
||||
#Start all containers
|
||||
docker start $(docker ps -a -q)
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
curl -H "Content-Type: application/json" -d '{"text": "Cloud-init provisioning has been completed on '"$(hostname)"'!"}' "{{ TEAMS }}"
|
@ -1,12 +0,0 @@
|
||||
---
|
||||
- name: Create the dozzle container
|
||||
docker_container:
|
||||
name: dozzle_agent
|
||||
image: amir20/dozzle:v8.10.4
|
||||
restart_policy: unless-stopped
|
||||
command: agent
|
||||
recreate: true
|
||||
ports:
|
||||
- 7007:7007
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
@ -10,7 +10,7 @@
|
||||
- name: Create the dozzle container
|
||||
docker_container:
|
||||
name: dozzle
|
||||
image: amir20/dozzle:v8.10.4
|
||||
image: amir20/dozzle:v8.5.5
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
@ -19,11 +19,11 @@
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
env:
|
||||
DOZZLE_LEVEL: "trace"
|
||||
DOZZLE_REMOTE_AGENT: "omada-lxc.comprofix.xyz:7007"
|
||||
DOZZLE_REMOTE_HOST: "tcp://omada.comprofix.xyz:2375,tcp://vps02.comprofix.com:2375"
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.dozzle.rule: "Host(`dozzle.comprofix.xyz`)"
|
||||
traefik.http.routers.dozzle.entrypoints: "https"
|
||||
traefik.http.routers.dozzle.tls: "true"
|
||||
traefik.http.services.dozzle.loadbalancer.server.port: "8080"
|
||||
traefik.http.services.dozzle.loadbalancer.server.scheme: "http"
|
||||
traefik.http.services.dozzle.loadbalancer.server.scheme: "http"
|
@ -1,42 +0,0 @@
|
||||
- name: Create directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ data_folder }}/gitea-runner"
|
||||
- "{{ data_folder }}/gitea-runner/config"
|
||||
|
||||
- name: Check that config.yaml exists
|
||||
stat:
|
||||
path: "{{ data_folder }}/gitea-runner/config/config.yaml"
|
||||
register: configyaml
|
||||
|
||||
- name: Create config.yaml file
|
||||
file:
|
||||
path: "{{ data_folder }}/gitea-runner/config/config.yaml"
|
||||
state: touch
|
||||
mode: '0600'
|
||||
access_time: preserve
|
||||
modification_time: preserve
|
||||
when: configyaml.stat.exists == False
|
||||
|
||||
- name: Create the gitea-runner container
|
||||
docker_container:
|
||||
name: gitea-runner
|
||||
image: gitea/act_runner:0.2.11
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
# dns_servers:
|
||||
# - 10.10.10.1
|
||||
# - 127.0.0.11
|
||||
volumes:
|
||||
- "/etc/resolv.conf:/etc/resolv.conf:ro"
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- "{{ data_folder }}/gitea-runner/config/config.yaml:/config.yaml"
|
||||
- "/etc/hosts:/etc/hosts:ro"
|
||||
env:
|
||||
CONFIG_FILE: "/config.yaml"
|
||||
GITEA_INSTANCE_URL: "https://git.comprofix.com"
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN: "{{ GITEA_RUNNER_TOKEN }}"
|
||||
GITEA_RUNNER_NAME: "homelab-runner"
|
||||
GITEA_RUNNER_LABELS: "homelab:docker://alpine:latest,alpine-latest:docker://alpine:latest,ubuntu-latest:docker://node:22-bookworm"
|
@ -26,7 +26,7 @@
|
||||
- name: Create the Gitea container
|
||||
docker_container:
|
||||
name: gitea
|
||||
image: gitea/gitea:1.23
|
||||
image: gitea/gitea:1.22
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
# dns_servers:
|
||||
@ -92,9 +92,9 @@
|
||||
env:
|
||||
CONFIG_FILE: "/config.yaml"
|
||||
GITEA_INSTANCE_URL: "https://git.comprofix.com"
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN: "{{ GITEA_RUNNER_TOKEN }}"
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN: "A01dvleL55F0o5OMJpa4UsE0gJ38ANKrAw5vKei3" #"{{ GITEA_RUNNER_TOKEN }}"
|
||||
GITEA_RUNNER_NAME: "gitea-runner"
|
||||
GITEA_RUNNER_LABELS: "alpine-latest:docker://alpine:latest,ubuntu-latest:docker://node:22-bookworm"
|
||||
GITEA_RUNNER_LABELS: "alpine-latest:docker://alpine:latest,ubuntu-latest:docker://node:16-bullseye,ubuntu-22.04:docker://node:16-bullseye,ubuntu-20.04:docker://node:16-bullseye,ubuntu-18.04:docker://node:16-buster"
|
||||
|
||||
- name: Create directories
|
||||
file:
|
||||
@ -106,7 +106,7 @@
|
||||
- name: Create the opengist container
|
||||
docker_container:
|
||||
name: opengist
|
||||
image: ghcr.io/thomiceli/opengist:1.8
|
||||
image: ghcr.io/thomiceli/opengist:1.7
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
@ -1,36 +0,0 @@
|
||||
---
|
||||
- name: Create the guacd container
|
||||
docker_container:
|
||||
name: guacd
|
||||
image: guacamole/guacd:1.5.5
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
- name: proxy
|
||||
|
||||
- name: Create the guacamole container
|
||||
docker_container:
|
||||
name: guacamole
|
||||
image: guacamole/guacamole:1.5.5
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
- name: proxy
|
||||
env:
|
||||
MYSQL_DATABASE: "{{ GUAC_DB }}"
|
||||
MYSQL_HOSTNAME: "{{ MYSQL_HOST }}"
|
||||
MYSQL_USER: "{{ GUAC_USER }}"
|
||||
MYSQL_PASSWORD: "{{ GUAC_DB_PASS }}"
|
||||
GUACD_HOSTNAME: guacd
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.guacamole.rule: "Host(`remote.comprofix.xyz`)"
|
||||
traefik.http.routers.guacamole.entrypoints: "https"
|
||||
traefik.http.routers.guacamole.tls: "true"
|
||||
traefik.http.services.guacamole.loadbalancer.server.port: "8080"
|
||||
traefik.http.services.guacamole.loadbalancer.server.scheme: "http"
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
- name: Create the homepage container
|
||||
docker_container:
|
||||
name: homepage
|
||||
image: ghcr.io/gethomepage/homepage:v0.10.9
|
||||
image: ghcr.io/gethomepage/homepage:v0.9.10
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
@ -2,14 +2,14 @@
|
||||
- name: Create the Dell_R730xd Fan Contoller container
|
||||
docker_container:
|
||||
name: Dell_R730xd
|
||||
image: ghcr.io/tigerblue77/dell_idrac_fan_controller:latest@sha256:ac6ef2e7fc0052219d7041496bd895d046897a1622538ca721462282902198e8
|
||||
image: ghcr.io/tigerblue77/dell_idrac_fan_controller:latest@sha256:1e44a090af5332842332fd58ce22a1034c045764f0104e9cf38be2386b1e1753
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
env:
|
||||
IDRAC_HOST: "10.10.10.138"
|
||||
IDRAC_USERNAME: "root"
|
||||
IDRAC_PASSWORD: "calvin"
|
||||
FAN_SPEED: "50"
|
||||
FAN_SPEED: "35"
|
||||
CPU_TEMPERATURE_THRESHOLD: "80"
|
||||
CHECK_INTERVAL: "60"
|
||||
DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE: "true"
|
||||
DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE: "true"
|
@ -73,7 +73,7 @@
|
||||
- name: Create the invoiceninja-nginx container
|
||||
docker_container:
|
||||
name: invoiceninja-nginx
|
||||
image: nginx:1.27.3
|
||||
image: nginx:1.27.2
|
||||
env_file: "{{ data_folder }}/invoiceninja/stack.env"
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
|
@ -1,88 +0,0 @@
|
||||
---
|
||||
- name: Ensure open-iscsi is installed
|
||||
package:
|
||||
name: open-iscsi
|
||||
state: present
|
||||
|
||||
- name: Ensure parted is installed
|
||||
package:
|
||||
name: parted
|
||||
state: present
|
||||
|
||||
- name: Discover iSCSI targets
|
||||
command: sudo iscsiadm -m discovery -t sendtargets -p "10.10.10.2"
|
||||
register: iscsi_discovery
|
||||
|
||||
- name: Set target_iqn variable based on discovery
|
||||
set_fact:
|
||||
target_iqn: "{{ item.split(' ')[1] }}"
|
||||
loop: "{{ iscsi_discovery.stdout_lines }}"
|
||||
when: item.startswith("10.10.10.2")
|
||||
|
||||
- name: Check if iSCSI target is already connected
|
||||
command: iscsiadm -m session
|
||||
register: iscsi_sessions
|
||||
changed_when: false
|
||||
failed_when: iscsi_sessions.rc not in [0, 21] # Allow success if the return code is 0 or 21
|
||||
|
||||
- name: Connect to iSCSI target
|
||||
command: sudo iscsiadm -m node -T "{{ target_iqn }}" -p "10.10.10.2" --login
|
||||
when: target_iqn is defined and target_iqn not in iscsi_sessions.stdout
|
||||
|
||||
- name: Set iSCSI target for automatic login
|
||||
command: sudo iscsiadm -m node -T "{{ target_iqn }}" -p "10.10.10.2" --op update --name node.startup --value automatic
|
||||
when: target_iqn is defined
|
||||
|
||||
- name: Fail if no target_iqn found
|
||||
fail:
|
||||
msg: "No target IQN found for iSCSI server IP 10.10.10.2"
|
||||
when: target_iqn is not defined
|
||||
|
||||
- name: List all block devices
|
||||
command: lsblk -o NAME,SIZE,TYPE,MODEL
|
||||
register: lsblk_output
|
||||
|
||||
- name: Set iSCSI device variable
|
||||
set_fact:
|
||||
iscsi_device: "/dev/{{ item.split()[0] }}"
|
||||
loop: "{{ lsblk_output.stdout_lines }}"
|
||||
when: item.split()[2] == 'disk' and 'iSCSI' in item # Adjust based on the MODEL you observe
|
||||
|
||||
- name: Fail if no iSCSI device found
|
||||
fail:
|
||||
msg: "No iSCSI device found!"
|
||||
when: iscsi_device is not defined
|
||||
|
||||
- name: Create a partition on iSCSI device using parted
|
||||
parted:
|
||||
device: "{{ iscsi_device }}"
|
||||
number: 1
|
||||
state: present
|
||||
part_type: primary
|
||||
fs_type: ext4
|
||||
part_start: 0% # Start at the beginning of the device
|
||||
part_end: 100% # Use the entire available space
|
||||
|
||||
- name: Create filesystem on new partition
|
||||
filesystem:
|
||||
fstype: ext4
|
||||
dev: "{{ iscsi_device }}1" # Format the partition
|
||||
|
||||
- name: Create mount point
|
||||
file:
|
||||
path: /data
|
||||
state: directory
|
||||
|
||||
- name: Mount iSCSI target
|
||||
mount:
|
||||
path: /data
|
||||
src: "{{ iscsi_device }}1" # Mount the new partition
|
||||
fstype: ext4
|
||||
opts: defaults,_netdev
|
||||
state: mounted
|
||||
|
||||
# - name: Ensure iSCSI target is mounted at boot
|
||||
# lineinfile:
|
||||
# path: /etc/fstab
|
||||
# line: "{{ iscsi_device }}1 /data ext4 _netdev 0 0"
|
||||
# state: present
|
@ -10,7 +10,7 @@
|
||||
- name: Create the jellyseerr container
|
||||
docker_container:
|
||||
name: jellyseerr
|
||||
image: fallenbagel/jellyseerr:2.3.0
|
||||
image: fallenbagel/jellyseerr:1.9.2
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
@ -14,7 +14,7 @@
|
||||
- name: Create the lidarr container
|
||||
docker_container:
|
||||
name: lidarr
|
||||
image: ghcr.io/linuxserver/lidarr:latest@sha256:24a9bff8d50bf818d564198da43361d0576dfca8e51269b7ad3b922bd0f8da2f
|
||||
image: ghcr.io/linuxserver/lidarr:latest@sha256:c3d8c0970b0e5a7dce0b29930efc83ab33a0fff8d1afbfca88a2104affb80c45
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
@ -14,7 +14,7 @@
|
||||
- name: Create the mariadb container
|
||||
docker_container:
|
||||
name: "mariadb"
|
||||
image: ghcr.io/linuxserver/mariadb:10.11.10
|
||||
image: ghcr.io/linuxserver/mariadb:10.11.8
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
ports:
|
||||
|
@ -10,7 +10,7 @@
|
||||
- name: Create the mealie container
|
||||
docker_container:
|
||||
name: mealie
|
||||
image: ghcr.io/mealie-recipes/mealie:v2.4.2
|
||||
image: ghcr.io/mealie-recipes/mealie:v1.12.0
|
||||
restart_policy: unless-stopped
|
||||
networks:
|
||||
- name: proxy
|
||||
|
@ -1,24 +0,0 @@
|
||||
---
|
||||
- name: Create directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ data_folder }}/omada"
|
||||
- "{{ data_folder }}/omada/data"
|
||||
- "{{ data_folder }}/omada/logs"
|
||||
|
||||
- name: Create the omada container
|
||||
docker_container:
|
||||
name: omada
|
||||
image: mbentley/omada-controller:5.15
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
network_mode: host
|
||||
volumes:
|
||||
- "{{ data_folder }}/omada/data:/opt/tplink/EAPController/data"
|
||||
- "{{ data_folder }}/omada/logs:/opt/tplink/EAPController/logs"
|
||||
env:
|
||||
PUID: "1000"
|
||||
PGID: "1000"
|
||||
TZ: "Australia/Brisbane"
|
@ -10,7 +10,7 @@
|
||||
- name: Create the postgres container
|
||||
docker_container:
|
||||
name: postgres
|
||||
image: postgres:16-alpine
|
||||
image: postgres:17-alpine
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
ports:
|
||||
|
@ -10,7 +10,7 @@
|
||||
- name: Create the prowlarr container
|
||||
docker_container:
|
||||
name: prowlarr
|
||||
image: linuxserver/prowlarr:1.29.2
|
||||
image: linuxserver/prowlarr:1.24.3
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
@ -13,6 +13,8 @@
|
||||
image: ghcr.io/py-kms-organization/py-kms:latest
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
- name: proxy_network
|
||||
ports:
|
||||
- "1688:1688"
|
||||
env:
|
||||
|
@ -10,7 +10,7 @@
|
||||
- name: Create the radarr container
|
||||
docker_container:
|
||||
name: radarr
|
||||
image: linuxserver/radarr:5.17.2
|
||||
image: linuxserver/radarr:5.11.0
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
@ -10,7 +10,7 @@
|
||||
- name: Create the readarr container
|
||||
docker_container:
|
||||
name: readarr
|
||||
image: ghcr.io/linuxserver/readarr:develop@sha256:0ee742f72f9f2731a3fde321cf5f0c1b3ab1087c45e73f4ceec39d9457a706dc
|
||||
image: ghcr.io/linuxserver/readarr:develop@sha256:2502c4fb7824e61932bde9db79b903e083ded22d1ed0ebbb0b7ce5508347877b
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
@ -10,7 +10,7 @@
|
||||
- name: Create the sabnzbd container
|
||||
docker_container:
|
||||
name: sabnzbd
|
||||
image: linuxserver/sabnzbd:4.4.1
|
||||
image: linuxserver/sabnzbd:4.3.3
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
@ -10,7 +10,7 @@
|
||||
- name: Create the sonarr container
|
||||
docker_container:
|
||||
name: sonarr
|
||||
image: linuxserver/sonarr:4.0.12
|
||||
image: linuxserver/sonarr:4.0.9
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
@ -11,7 +11,7 @@
|
||||
- name: Create the speedtest container
|
||||
docker_container:
|
||||
name: speedtest
|
||||
image: lscr.io/linuxserver/speedtest-tracker:0.26.0
|
||||
image: lscr.io/linuxserver/speedtest-tracker:0.21.2
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
@ -6,14 +6,11 @@
|
||||
with_items:
|
||||
- "{{ data_folder }}/vaultwarden"
|
||||
- "{{ data_folder }}/vaultwarden/config"
|
||||
- "{{ data_folder }}/vaultwardenbackup"
|
||||
- "{{ data_folder }}/vaultwardenbackup/config"
|
||||
- "{{ data_folder }}/vaultwardenbackup/config/rclone"
|
||||
|
||||
- name: Create the vaultwarden container
|
||||
docker_container:
|
||||
name: vaultwarden
|
||||
image: vaultwarden/server:1.32.7
|
||||
image: vaultwarden/server:1.32.1
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
@ -33,30 +30,33 @@
|
||||
traefik.http.services.vaultwarden.loadbalancer.server.port: "80"
|
||||
register: container
|
||||
|
||||
- name: Create rclone config folder
|
||||
file:
|
||||
path: "/root/.config/rclone"
|
||||
state: directory
|
||||
|
||||
- name: Copy rclone config
|
||||
copy:
|
||||
src: scripts/rclone.conf
|
||||
dest: "{{ data_folder }}/vaultwardenbackup/config/rclone/rclone.conf"
|
||||
dest: /root/.config/rclone/rclone.conf
|
||||
decrypt: yes
|
||||
mode: "0600"
|
||||
|
||||
- name: Create the vaultwarden container
|
||||
docker_container:
|
||||
name: vaultwardenbackup
|
||||
image: ttionya/vaultwarden-backup:1.22.0
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
env:
|
||||
PUID: "1000"
|
||||
PGID: "1000"
|
||||
TZ: "Australia/Brisbane"
|
||||
CRON: "0 4 * * *"
|
||||
BACKUP_KEEP_DAYS: "14"
|
||||
ZIP_PASSWORD: "{{ VAULTWARDEN_BACKUP_ZIP_PASSWORD }}"
|
||||
volumes:
|
||||
- "{{ data_folder }}/vaultwarden/data:/bitwarden/data"
|
||||
- "{{ data_folder }}/vaultwardenbackup/config:/config"
|
||||
register: container
|
||||
- name: copy backup script
|
||||
copy:
|
||||
src: scripts/backupvpsdocker
|
||||
dest: /usr/local/sbin/backupvpsdocker
|
||||
mode: 0755
|
||||
|
||||
- name: Setup cron job for backup
|
||||
cron:
|
||||
name: backup backupvpsdocker
|
||||
minute: 0
|
||||
hour: 4
|
||||
job: "/usr/local/sbin/backupvpsdocker >/dev/null 2>&1"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user