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
|
become: yes
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Write notify script
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: scripts/notify.sh.j2
|
|
||||||
dest: /tmp/notify.sh
|
|
||||||
|
|
||||||
- name: Delete existing template
|
- name: Delete existing template
|
||||||
community.general.proxmox_kvm:
|
community.general.proxmox_kvm:
|
||||||
api_host: "{{ api_host }}"
|
api_host: "{{ api_host }}"
|
||||||
@ -39,11 +33,9 @@
|
|||||||
|
|
||||||
- name: Install Tools to cloud-init image
|
- name: Install Tools to cloud-init image
|
||||||
ansible.builtin.shell: |
|
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 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
|
- name: Create new VM template from cloud-init image
|
||||||
community.general.proxmox_kvm:
|
community.general.proxmox_kvm:
|
||||||
@ -65,6 +57,9 @@
|
|||||||
ostype: "l26"
|
ostype: "l26"
|
||||||
vga: std
|
vga: std
|
||||||
scsihw: 'virtio-scsi-single'
|
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:
|
net:
|
||||||
net0: 'virtio,bridge=vmbr0,firewall=1,tag=10'
|
net0: 'virtio,bridge=vmbr0,firewall=1,tag=10'
|
||||||
ipconfig:
|
ipconfig:
|
||||||
@ -73,6 +68,10 @@
|
|||||||
timeout: 600
|
timeout: 600
|
||||||
vmid: 10000
|
vmid: 10000
|
||||||
|
|
||||||
|
# - name: Pause for 5 seconds while template imported
|
||||||
|
# ansible.builtin.pause:
|
||||||
|
# seconds: 10
|
||||||
|
|
||||||
- name: Import HDD to Template
|
- name: Import HDD to Template
|
||||||
command:
|
command:
|
||||||
cmd: "qm set 10000 --scsi0 {{ storage_target }}:0,iothread=1,discard=on,import-from=/tmp/debian-12-generic-amd64.qcow2,format=raw"
|
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,120 +1,100 @@
|
|||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
37653035376133366661653938306536626438616463386137386164393530336166363965633161
|
64343839626330386331646462663462663936396466316130313266623633613262616431383731
|
||||||
3266623761396161636433373036376362336464383862320a323733623665373365383532623131
|
3365393436363336313633323031326666363736643632310a393631396465396363323335313230
|
||||||
61343138613330666465323236633164616162316432633331643130393036663566623833313630
|
36393861303062623565353632333262393431373861363239356431353931323630623563373035
|
||||||
3531313266646538300a376439336336646466383339396138636631656136383865623330343837
|
3832383534326139640a373832303461623665303530623138653962613062336665306132346261
|
||||||
38323031343733346632613830333836316433383631323530623631393738393665666132363334
|
63346134666631623338383961353066373264346365343365646565313336626266383135343831
|
||||||
36626364373361396261646533316631663535633166386230363239316661346362313831306264
|
61363132333634313233396364303631343436383630346232343863623163643536363031656565
|
||||||
37646661353632336136646430663732633764376332663534333665316566326462386638636232
|
63383239643335663833383366633237336266663965353964666632393963343432333161393238
|
||||||
31303132636535323734636135643633373365306662303965653034333234303265363738653939
|
62613965623834393866366630303131353830373764313139316263326235363531643661646134
|
||||||
33313738323033616266313665633932323136636366346461393933326236633335623335633432
|
38313431303163333764616230336565643466653632373563343466383630303830343261646639
|
||||||
37363261366637613639386630643836383864653465353735643735633337663866366139653164
|
38666666393831346365356338643366393234343261373763643938366265316232383139323232
|
||||||
37646461383466636134336365646533306262643438356264376430346432376235616565383039
|
65386535633330383831653638343238623066316161623862326130366431333131313033653538
|
||||||
31653065383732313435343563623765373231396562343637313437363731633435336530393936
|
30653964363163393033626439333037646236376135646362363735363438383462336333313161
|
||||||
61353166316564313336383232366134313839333635353230383037386534326538393430323034
|
34356632646562373738333233626635333662373134343232363235386236393039356666656538
|
||||||
65353532346137346531633935393437393264373166663763323861633235633566383534616337
|
39316439373837303133666261663732623730366666313363363330616537373039363661383338
|
||||||
62613265316163623861326333396230386264303533613735646130363836626133353161396665
|
37376535653066613532376333393963353734346536383630393864316334646263376132646434
|
||||||
61316561303466646361613665386263363135326638376239346531383536346462333637313662
|
37633630373734666636613639646631643039396666346161383435653739653737633239623436
|
||||||
33633266323235663733636265656339313464343832303930303937303630623230376332636465
|
39623364616463646665643261653738343635663933323935343162653335656334346338376166
|
||||||
38633765313063666338306433386136356366303633323363343838653531313962356262366466
|
36616334646337383230633361373663666534336261653838346262346630653263303236363465
|
||||||
33313239393562396664326366353966306263623362376238393863356361376430636261643763
|
35366139653766663731393864356465616336353862383636633962323865353431646133323930
|
||||||
61633561306166396230643031326635356263326236613164396335333465663937656463363766
|
65303563646535663530643664373861373938313561633366343466346532626632323136373563
|
||||||
61393362353163343266373561656431373465626538333966313937383732613437363030386337
|
62383963393031353531373664336635303338323137323864376330343830323161623130393932
|
||||||
30343464316262353737366535393533373634643966633733393535623834613130363533663330
|
36316538346637343430323735323338366463396233366238653532623336636562376538313038
|
||||||
37356634323562666662623833313362383739643061373162643733373234313564653465346666
|
34343066623366656335326461316538643466346166643432663766316465386130623139373436
|
||||||
66343631353732353931303137343239373337373732316630363265633532306432356337313664
|
64306230646338336632363134616430653634356262613066363834373339376363333439356234
|
||||||
61386561363030656366313739316461326235613764383264646535363039313330306664353235
|
62663336633830393366336561343366626266613336363639616566376266303431323861323164
|
||||||
62306265323735333166613965373866336530613339313065373836393431653564303233323864
|
63346638376564396161303634343765386661653461666266303566346365356664303038383362
|
||||||
35666235303964316530376332356634333932643938396430636133313238346630316539303639
|
61393938383761313839373634353763613532623135383331393934376135383330303331383834
|
||||||
30623134313532653634623138323339333732376564366533366162653562643638343233643633
|
31323664623338613161316464326432313764346432323236623237623232356139613664633935
|
||||||
65663139356330316233623832346537306438643637323262383965353164313134373036373031
|
34316431323835306331316232656534346439356236353235313231363163633332643030613530
|
||||||
32303666313231623135653332656538346632333331623032373062326234643364373834656461
|
30386435326535663533643237326439616666656261363638343664366633366532333037626139
|
||||||
64613961386436323930643762633431363162363430313139653338656339333132313662393537
|
32393939323833386665663931376337613433646439633163326166613035326639623462306166
|
||||||
31393565303836393634613034623235396537336465336137316632366264353536643236353965
|
65616433373264323663663839356637316466633836343233336666393435366535333732623666
|
||||||
66663133643462323139653631303230313731333235363764613463343665366335626438613561
|
63656433323039666564613734393836353238623433393165616633383231613763346163306239
|
||||||
33373432376232313264343437656262616462663466373731633737643035303565663535623533
|
64373338656431353336633130373635306666646430356266343566663063663036376339366162
|
||||||
38303230313130616266376163373931666239616436336438363364376665356561383231326666
|
39326133386437623663643831633666396231336331326136303761656363326132643338343361
|
||||||
32386330623364626266306466653432326564663134646362653133346138306336363231613164
|
32386365373932336561333366616437663235643832303834663737666564393333316464646136
|
||||||
61383236393630623336346663383161366461333635343239313438366134336330666663363037
|
31306533373133383362393465613238366265653464313730383937636338343938366563393033
|
||||||
61396338313866373562646533643831343831663231613563376132656338653662313532313037
|
34613238343333333663363132386162323033373331626339386636653435353063613634343738
|
||||||
64616333373066653035623639323764346365316433336166376261343736306338333739393034
|
63313235323465383839383165323561646337633862326431646165326236373032323561386266
|
||||||
61333033383661386434656233316364646562363066616164666436323433613564636539316631
|
36373034643862623937336633666637666662303134646137383930663865383832333630303033
|
||||||
31626134623239396664616561363538363932303565636662636335653430316439353662326537
|
32313832353134333439396563366266393832663638383530663438663963663634376666613463
|
||||||
34373433636265616231643865353862396237336561356262333236343837353631393664323438
|
61636531376166313463613365333435623032393634636130366261643961636534323064303066
|
||||||
36303636316532633566616661636436366336396237366135656663616330306239343461643337
|
35373934653163303337316237643230336463353366633432666430316362646534623730376231
|
||||||
38383736633364666463356131326233366565663535346531393135616138303734386335643063
|
33363661396233393662643435373263633836343237316336346138313663626533636231363739
|
||||||
31643763306361306131366163663161623439623034383462643036303765313631663966326164
|
39646238633766303535333662646361396462323539626365346534653762323764313836613136
|
||||||
37303133353736636265356635646436643334383932613332643632643230346339353132633434
|
30363766646365346165353163383335656531383230353536616432616331306661333837366430
|
||||||
65633566663237633639666331323338383364306266386433306461383838316132383939323765
|
65653431376133303531356231663136626562346336373738386266303262646263353862356361
|
||||||
61356435633965303765363261623531363935303835376535616339666537333964363665363431
|
65333337363864326466623361323461363361346262323031393130386435323063616261333237
|
||||||
31626238643238366466323531313861393234356266336637336561363266636135623739626330
|
33303238386533623265386237333432616361366661623333316532386563336632396161323861
|
||||||
61653566613139656537663237336132633863306638393233333930336363656237636438323538
|
37333833316664646539363364323163323264636133643030323631333430333030346561356332
|
||||||
64323239373431323366383034333438656539333765346266623261636338343938306632626132
|
34336362396136656230383837393332316130363438396538323462623033666465383633656233
|
||||||
39626330643163613437396463326532356262616233643034333261646266363932303839616665
|
65306637633764613130376233333130306263656530616430383265626639613566653836373165
|
||||||
62323563663561653164306538626631666565623737613932366636653639376339623065623831
|
66303838633033643137303739336337333936653833353035346263633463353365306333353338
|
||||||
65323837643164663531396230366634373830303236373834643336666338333833313062306431
|
31383162326334393536393664373137646332626536393266323932303038663038343665613437
|
||||||
38383238393437633338303335613266383564303131616663346439343031303438653434633461
|
64353264396561643665303831626361353136316463626334303630306430646161393131313065
|
||||||
30366532346464343038313033336637653561616333356631343433363536303661643064383933
|
38396536373933306330356434333861306434393962313436386464613631303165366535366463
|
||||||
66626131333065343734396339646462336533346338316662303230666662616135623834333036
|
39316636326362326336333130336436613532366334613439373637636465336636323334303833
|
||||||
37373965356632316236633136316435326633303063353538666130333036613561646163623839
|
35353061643865356138303662656633633763303461653137323965376133613236383061356330
|
||||||
62653631386432396130383465396266633966336663383239623735346363386461343234653830
|
62326637666434353135363735346534363666396262383638373763626534343337643037643439
|
||||||
36623130663963653832393932333962373566623862663137316337636633356362316139343732
|
61306266663662646464636432303631373736633033646131656431373531346331356530363139
|
||||||
31643137653835303766353734646637663735613063353265316533363963356235653363613736
|
39366264386438643564346664353762303837613435393766613832376561613261623831653666
|
||||||
33633334633065656665313462336266366561363933356465613161353839343234666562656462
|
35343236666661346361306438633061616534636433353462643337373331306130653134613231
|
||||||
36316366636235363738383634663365343438643933366334313765366265646438316336373134
|
35326562373737623364363561323333353839633637623039653338653134643437393331396637
|
||||||
31333165663463643763363335316430376335303261343734393238383933636630366133353239
|
34663535653439333663343239636335333265643232383637383264393635313532313466633232
|
||||||
63383933363762643033393165386638373239336465636431303261396561313938316562363539
|
36373562646239383638396532653130646263366262373932363930313339396462356530383739
|
||||||
64393066316534376632623362353563626165653330663431363734656339323032643331386661
|
34393235646234386532393630373436353834336637643435346630633961663638333839366132
|
||||||
32613535313831633936636236303832393039393864656561313866353734323161393336653039
|
32666337366566346166343236303736643631386131373762386463633535623433336131353631
|
||||||
63636336626330353030393935636164633137626338326232393531383864636534643635323262
|
62663036633866666162383833353666323763343337656362626166363164326562386436623662
|
||||||
37643835336534333737613838663363346266653265366433333333353362656262653861393437
|
39323538653337626231303336666264663530346564613465613530643230333934613465373465
|
||||||
39313233363332323839346562386234343135633134356238623164353931303261633932363438
|
62366137633532616335623530323961663830616663613938316437646630383434643430386433
|
||||||
36376462303761396662363234386239323030376362303763653966656237366461343134366662
|
39373839636538303239646436366339656333353365343138313364643234346236316162616430
|
||||||
63333836353465306331633836356632643934303637323764653033663366616639373164306237
|
31323238393135636165336636633336633232386661613762326563323638626533303034346131
|
||||||
64373830633166663531373861303534356662386563323339643961653361613265323933333634
|
31323433316261633232383562646566376266633466643637366366346235333934623462636431
|
||||||
38393065383764376237663038396437376138643933383033376135643463643732306137386634
|
37623135316634616334353062373139653865633934393930393364343430626163663064343533
|
||||||
32653938663862303435373436616461656133376263653236333038333433396234636465396361
|
34616430663232356231343831306662666432373937316661346462643231343539643561363862
|
||||||
30326561353330616436326662353436656432363738313765363666646133316638623331373530
|
30353636353362653366353438346531666637663763636138666366306339373633306335323537
|
||||||
38393962666133613334663463363665323366343630343832343066383566396330346665393861
|
38393461303261666437393639363265373531643534373163633161646164616664663139333361
|
||||||
36383733313032316363626631333763396262653164326236633962346132326431326563633064
|
62303062623833333537626332353062366566663138376364373062363664366438323039353735
|
||||||
33626230313766303966623261346664333438303434316365313932393732663330336637353530
|
63303236336235316431343330356138376361643766646535363364363739343563623831336466
|
||||||
66383165353766626235643939613535373336373232363935333838363038363762636366393264
|
62303462393033373631616236656664373431333532383935383663383762353763336663373039
|
||||||
37633534613166336639393136666636373261623239613931366435663432346535363834623765
|
30656162333762363139393961663632316538393638316633633663393361363237366262383235
|
||||||
61636230333861313433633539336463316464306339356331313865396539303965306334633939
|
34383964643933633839303736633633653566353836363230353438336134396566656664646434
|
||||||
35633135613034643136353437303537343139653165613131393133353934393062616334386532
|
64326436636435323137363239656131303162646635373736656663353630303630336164353165
|
||||||
61666264393561333130306632353432663231663839656239316566336566636430666533626464
|
35333066396132393337383431383862623437306430313730363633333138383232633431613262
|
||||||
37336362623931373161623330613339353739356632346635623533313961373133623864643366
|
39353564303035666235303364393664376264323466643135373433656562656132346431396264
|
||||||
66316161346130663531626436383664386437306432613731303632346163653730663762366537
|
63656461383438363736386633343835643063613932613339366132663963666466313132663033
|
||||||
35393838396435623839313537333132643737626134353333626535313861666535646330383038
|
66633265323939653437373764353161623963636437663563613238323561633735643036346634
|
||||||
62626563333538613736663831303433366266643331646366356161343936363538313066373733
|
32656539356135373163353533313733393932333766643730663239363163336666653039393531
|
||||||
36336331626334393661623163636435633430323132343732646363356565636232373736376563
|
36613535663561323037613930306430323864366432633065356665383263636439633333323332
|
||||||
38303363323263363463626361306164393839363339303831353730353632633035306531353064
|
36353364626465323338326634646439633836616534333763626265393732623039306639393838
|
||||||
36353163303830353965333765336233313033393233326165363939386564353661656465643932
|
38363063386462383165316362353234623832306237396131316365343664666232643530363338
|
||||||
32353461613134333663346633613034656132313434353438393236363036613463613734363138
|
66306331633361333762303337363061643664396335303135656235653537396433326230653863
|
||||||
30313661616264353465363935353639326265333639663739386433313834316130656231383433
|
63363466363135333834346264613432653532336534643938616362643064656665393939306437
|
||||||
34616631646161663331363336323366343535646166663432636166396562333632663162393235
|
39326366343239663461643262636564363632636431326134656163343862393731643133343637
|
||||||
66323931653434346138653464653531656261366662346261366336323965353636393539656130
|
63353134656464616531373835323637363861316535663564313735356662313931313833373239
|
||||||
66353235306233373833643436343735323935313834373638396335396432363532396430303533
|
30393463316665616439303064356438383665313832656139323737366234313732353136346364
|
||||||
35633735326337636539333061626439623833646362393963323032363330306463613662393065
|
31353163393535356164386561323838623235383630666633346130353939633564346366373236
|
||||||
61636466646264636535626332653264356430313536313263633030333435613539666236363636
|
34393332373438666461333061323430383663626436663735336636643531366539643439623636
|
||||||
37656362303135363339613034383961363830616237366265643131306162316461313432333462
|
373264356538616535636564643665356562
|
||||||
63646434326139313664396162386137623662343337643938613662613434653832666537316136
|
|
||||||
64306664353362636134343061363664316264383838663461653066383366313231653533643662
|
|
||||||
38653135316263633437643434356436343739613034656363306636643366363361396239306266
|
|
||||||
65626439636331346561393638316433323630376537646639623035336235663266333730393465
|
|
||||||
64663435303463346363383065336662656630393534366237366539656230303665623063316164
|
|
||||||
65643365393937613861313061633366613962393738633065663438623332663862303531316536
|
|
||||||
64363237613330643061666534383638343839663165346161383130343433663465386230656632
|
|
||||||
37633231333162623165313536613836316664636632343231393961346637363364303435396434
|
|
||||||
34623465633930363437343162633865393831393863393632396335383330633565333837346634
|
|
||||||
37323663643566373262626663323361343036643533376331653033336165383631313164626662
|
|
||||||
37333239356436613461303332666463383865343531666332383563663234646234316333613036
|
|
||||||
65316337383233326363326363633232396461356335383536613036313461613037323235616238
|
|
||||||
39613232623635636138396366323339616430633363313530353237393338323762326366646132
|
|
||||||
37626466646530356239373834636333303564646535616339346231376364636331346335333663
|
|
||||||
66646364376235373732616461653866666132646563656438636232346562306662353437386661
|
|
||||||
32396535353765353138343336623833646365633731376233326161373563366562353239343530
|
|
||||||
34623962643737356661613562393361396230363130616138326431333961343263663032346139
|
|
||||||
62373736623064623338313634623761666265336236353564646633353064633931396461303762
|
|
||||||
37633762396663653232396432653839653863326361313135303933376163316332366431663063
|
|
||||||
353131333632363166616666646661383437
|
|
||||||
|
7
hosts
7
hosts
@ -1,12 +1,9 @@
|
|||||||
[proxmox]
|
|
||||||
pve2.comprofix.xyz ansible_user=root
|
|
||||||
|
|
||||||
[cloud]
|
[cloud]
|
||||||
vps02.comprofix.com
|
vps02.comprofix.com
|
||||||
|
|
||||||
[docker]
|
[docker]
|
||||||
docker.comprofix.xyz
|
docker.comprofix.xyz
|
||||||
|
|
||||||
[omada]
|
|
||||||
omada-lxc.comprofix.xyz ansible_user=root
|
|
||||||
|
|
||||||
|
57
main.yml
57
main.yml
@ -1,10 +1,11 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
name: Configure all servers
|
name: Configure all servers
|
||||||
tasks:
|
tasks:
|
||||||
- name: Gather facts if run with tags
|
- name: Gather facts if run with tags
|
||||||
ansible.builtin.setup:
|
ansible.builtin.setup:
|
||||||
when: ansible_run_tags | length
|
when: ansible_run_tags | length
|
||||||
tags: always
|
tags: always
|
||||||
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
@ -25,6 +26,7 @@
|
|||||||
tags: traefik_install
|
tags: traefik_install
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Deploy Vaultwarden
|
- name: Deploy Vaultwarden
|
||||||
import_tasks: tasks/vaultwarden.yml
|
import_tasks: tasks/vaultwarden.yml
|
||||||
tags: vaultwarden_install
|
tags: vaultwarden_install
|
||||||
@ -36,25 +38,21 @@
|
|||||||
|
|
||||||
- hosts: docker
|
- hosts: docker
|
||||||
become: yes
|
become: yes
|
||||||
pre_tasks:
|
|
||||||
- name: Connect iscsi
|
|
||||||
import_tasks: tasks/iscsi.yml
|
|
||||||
tags: iscsi_connect
|
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: docker
|
- role: docker
|
||||||
tags: docker_install
|
tags: docker_install
|
||||||
- role: nfs
|
- role: nfs
|
||||||
mounts:
|
mounts:
|
||||||
- name: Data share
|
- name: Data share
|
||||||
path: /mnt/nfs/data
|
path: /mnt/nfs/data
|
||||||
src: truenas.comprofix.xyz:/mnt/datapool/data
|
src: truenas.comprofix.xyz:/mnt/datapool/data
|
||||||
tags: nfs_install
|
tags: nfs_install
|
||||||
- role: traefik
|
- role: traefik
|
||||||
vars:
|
vars:
|
||||||
traefik_host: traefik02.comprofix.xyz
|
traefik_host: traefik02.comprofix.xyz
|
||||||
tags: traefik_install
|
tags: traefik_install
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Deploy comprofix.com website
|
- name: Deploy comprofix.com website
|
||||||
import_tasks: tasks/comprofix.com.yml
|
import_tasks: tasks/comprofix.com.yml
|
||||||
tags: comprofix_install
|
tags: comprofix_install
|
||||||
@ -122,34 +120,15 @@
|
|||||||
- name: Deploy pyKMS
|
- name: Deploy pyKMS
|
||||||
import_tasks: tasks/pykms.yml
|
import_tasks: tasks/pykms.yml
|
||||||
tags: pykms_install
|
tags: pykms_install
|
||||||
|
|
||||||
- name: Deploy gitea-runner-homelab
|
|
||||||
import_tasks: tasks/gitea-runner-homelab.yml
|
|
||||||
tags: gitea-runner-homelab_install
|
|
||||||
|
|
||||||
tags: dockerserver_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",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"extends": [
|
"extends": [
|
||||||
"config:recommended",
|
"config:base",
|
||||||
"renovatebot/renovate-config",
|
"renovatebot/renovate-config",
|
||||||
":semanticCommitTypeAll(chore)"
|
":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"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
- name: Setup cron job for backup
|
- name: Setup cron job for backup
|
||||||
cron:
|
cron:
|
||||||
name: Docker Prune
|
name: Docker Prune
|
||||||
weekday: 0
|
|
||||||
minute: 0
|
minute: 0
|
||||||
hour: 5
|
hour: 5
|
||||||
job: "docker system prune -af && docker image prune -af && docker system prune -af --volumes"
|
job: "docker system prune -af && docker image prune -af && docker system prune -af --volumes"
|
@ -1,51 +1,51 @@
|
|||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
38366130306535633564303136306635643965383961636561366233653333333934326331633837
|
39313339373165343238363465353965316536323664633761343236316532386661303662336231
|
||||||
6563626566653165386636626236313761636563386564610a336165656132393339626334376238
|
6338623335393732396162633239333465353534333638360a383761346336623538643564383239
|
||||||
30653062373161653730393865663330643231653763346436336230386638616235303834646639
|
65333966336434306465613138623766666434346439313536363364613837663933316535393134
|
||||||
3734343334356130360a386365633565363538653435346363343766383938633934383638333833
|
3235303335393036300a613735393164396361353263333562396263643064343561353735353563
|
||||||
37653762393739376663353430646435306334303538613735663639623562666230353431613839
|
64646631353136353432396561326335306636383336346430356461366431613037613163363163
|
||||||
64656234396263656433643764346336656364313635313537643765633736373532376336303366
|
36323331666532613866373462373235393239613937613536663061613866376564333031333834
|
||||||
62363565613361326532653837323961323937643061643562376562306535326331633137313930
|
65346564373835646236386230393838386431666539303263656637353663376234613562363136
|
||||||
34663663306632663735643139653437316463373361393662633866613436376361353461616132
|
63306532373461653539303862373036373861383865653137383333383731616131323665333636
|
||||||
35326261353062653630666635313566623833343130356139396430616132373632666132393237
|
63643935633032666164303335386436343566306237636162356630366236656337363633326530
|
||||||
34616165376366333137396139623439346537313037306434363364393461343364363265643264
|
65306137316236646330353736663261623166343539303937346234326135666536373863653066
|
||||||
37666632343636633165643961376231386637373463663834663735316536316336396632353330
|
65623731373135613764393532303065303936323835613139626637353565336335323866376338
|
||||||
61376138333564616366616365303134393334656666393433373936623962666134653265653038
|
66343237383463393132396636656235346566373432643533303066386462323137643866373936
|
||||||
34343432373733313365376133633436343536626165366331303639303261346237623162376531
|
62663666336663383664653065333134643762616530373561663061383932323762636661626434
|
||||||
65363830366437613831636564323134343036656230353331326138626330373339343365303766
|
33383463383139343166613166383336393664356164616433636231383635343163376531313034
|
||||||
66313430363137643132383830333463623730636664386135646566653934343136383038373838
|
30636435653038393332653964656230393936383837653065313831633736633861656163643463
|
||||||
35623361646535386661633134613361376565366334386665323638626133646431636163333865
|
62333430656136333230353363643863303837366637373565663836326634646561346137343731
|
||||||
35366164316562643664643631333833316464613961303563633263333865623166613035653565
|
65653939326366613930383935383564353930376131376139313265376335623534613262643934
|
||||||
64646337393964616161623536366431613462663466313634643730636461656364353732653437
|
34353961343135313933636630616666316136643238363962646563636333633165616239356432
|
||||||
33653935373666333366383036643565653361343965653436363836623032613764336566643737
|
64656330613336636363313833356439363038656265393561343263616366653231393438313533
|
||||||
34326562353436356234383634653036366562663434626134666663393636393636613033393136
|
35636437643764366533393263393231336366353033646266383962396264333639643464306561
|
||||||
30303163386265393963613036363964643331363965393032626565353161636230383834356435
|
35343633613863343431643831646164636264366561316366303338353965646634353036336231
|
||||||
64636337613634643831326630346563356166373332303866393636356566633264313961336661
|
62626430636166643062343865613037626635356439646336396436343539386337363236393562
|
||||||
34343932356166616362636133316638393735353735383138633631323439343665353633313461
|
61323037383331343636343266313762616664343336323163353131326130326134356437313832
|
||||||
35636166313436316534623634653631366366346563636138303265343763623935323336383632
|
36356563316561393366636234396565366465333064303439336136356630386662323030393636
|
||||||
64623063623264313962356461386231663832366562383730313965663233613930373437643464
|
62316334383064613938376335636264323731626634333061623966613663376266383535633964
|
||||||
64666533633162313031376536303965303831393137383965393532366331343665663962376138
|
63383030326461323730383239323137656338623465653735303838383266333633656435653138
|
||||||
65393436353231663432656665646436306665353865633265633534636238646336666239613764
|
37373632616536323466316439613865396239646137323666653533646333316434616466663438
|
||||||
34303633343432376134636239336637316434643536613562313137663634666662353433653762
|
32633864313434316366663035386462653430306534353062656430623730656537366262346366
|
||||||
66623035313335626463623632633535323335363434396436326330393338373532613930623736
|
39633262353665613766333161663263316463653861623130383062303161326133653736393564
|
||||||
66313761656231353232643937636134643531396134383236333164666332376365653865363963
|
36366362363931313430356436633835343737396466386434623933323133626136353431363236
|
||||||
34393637646238376563356134613361363638386665633337396564393538366165643735323066
|
65376230636262643962666466656532326438366138646239643262303536326630396562626336
|
||||||
32663437623736386565646265666338376236633363316664306361646235343063633039353638
|
36666436663037383262366236623730386662386362616431383937623633356531306662643834
|
||||||
62316266366530656465653566363137663738633266623663306639653337626562313439653530
|
35336236336566393561613861666330343937336232306333373733343136623064393861616466
|
||||||
64346538646637323730386331383661366532303764643936666232303835363930313866393732
|
64386239346539386236306434373461313765363031633436393037663461333734373063373564
|
||||||
65383564376131613664373437373365643662313862643834316638306534353263306262363265
|
33646265333538653835363063363031313439666237326433346265373362643364353130343738
|
||||||
32313135656463393237633065633430353031616630643563373730396630616431613363663961
|
36363162303665623731353139313932316361336432376265333836326332313331366330616166
|
||||||
37366634373866306461343035363135343064643539336165633534313635326433643235393263
|
36633764316462613538653265343031313033666534396361313837653339613339633232626666
|
||||||
61653935383831393332656562323032336662303562313964356165353562373639396562386536
|
62323166623666393232633630666164363839616161383465386435316134303734316464356136
|
||||||
35306265343861366565636262383436633637373337383962336438636134393065376538323638
|
64316565353161386162383237643964646432623939393532663962343964313966323032653531
|
||||||
35646431316639316139393430653563363566353035343738653432306164393665303936383434
|
36643461633935306439396364616136333364376234613135306464383531616262666261343235
|
||||||
34336236646637646162306463396166383334356134653961306634363962643731373761376330
|
62353565336535393439333263663434626332613533653165343134393166353036363038353561
|
||||||
36346663643835646235326632626135396632316636636131343761396265323734613566613136
|
31666238363963383831383365656333653036653130333237616466393830326666306636383837
|
||||||
66326539333130663361336564333233333337353562376665646361663339323565343232393431
|
65626138616262373032353865646261393534613165386437383166313939326331333238393638
|
||||||
39636363643232396338386630323337383038336564633235323231376638646133336139383864
|
30343931393933663339623930393262306336656437383338643232393932363731616139323633
|
||||||
64626561366563386164366664633039666661386337386637323335656530396665623532653261
|
39613361396630323961343731373439336464366332633837366333346239633836396130303766
|
||||||
62646262626534303362656435663066646633623562636533363138613433663165633738636639
|
65323361636362303061386430346662373165663635633534383338333762386233623661383731
|
||||||
62383330633937653365353136646264653162343966613165373630613631616433653763353233
|
36383262626533323636653933333961306137356366653131303235346362613231366335373630
|
||||||
66653762313764326236316631303663613239336539363633373132623564326339343762653965
|
62336232373064363565353361656631386565393533343932663465373935313465343035326437
|
||||||
34363963353731303132623333363835646334353833383336393066333861623538356233383463
|
34313563323764326135616462303830663365633630326533376666323632303732343761343935
|
||||||
3364363533653462643633386131623535326436333130646434
|
3636363938336630313736663832633833626530323834336566
|
||||||
|
@ -16,14 +16,7 @@
|
|||||||
template:
|
template:
|
||||||
src: templates/traefik.yml.j2
|
src: templates/traefik.yml.j2
|
||||||
dest: "{{ data_folder }}/traefik/data/traefik.yml"
|
dest: "{{ data_folder }}/traefik/data/traefik.yml"
|
||||||
mode: "0600"
|
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"
|
|
||||||
|
|
||||||
- name: Check if {{ data_folder }}/traefik/data/acme.json exists
|
- name: Check if {{ data_folder }}/traefik/data/acme.json exists
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
@ -36,7 +29,7 @@
|
|||||||
state: touch
|
state: touch
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0600"
|
mode: '0600'
|
||||||
when: not file_status.stat.exists
|
when: not file_status.stat.exists
|
||||||
|
|
||||||
- name: Check if {{ data_folder }}/traefik/data/traefik.json.log exists
|
- name: Check if {{ data_folder }}/traefik/data/traefik.json.log exists
|
||||||
@ -50,7 +43,7 @@
|
|||||||
state: touch
|
state: touch
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0600"
|
mode: '0600'
|
||||||
when: not file_status.stat.exists
|
when: not file_status.stat.exists
|
||||||
|
|
||||||
- name: Create traefik Container
|
- name: Create traefik Container
|
||||||
@ -72,7 +65,7 @@
|
|||||||
- "{{ data_folder }}/traefik/data/traefik.yml:/traefik.yml:ro"
|
- "{{ data_folder }}/traefik/data/traefik.yml:/traefik.yml:ro"
|
||||||
- "{{ data_folder }}/traefik/data/acme.json:/acme.json"
|
- "{{ data_folder }}/traefik/data/acme.json:/acme.json"
|
||||||
- "{{ data_folder }}/traefik/data/traefik.json.log:/traefik.json.log"
|
- "{{ 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:
|
labels:
|
||||||
traefik.enable: "true"
|
traefik.enable: "true"
|
||||||
traefik.http.routers.traefik.entrypoints: "http"
|
traefik.http.routers.traefik.entrypoints: "http"
|
||||||
|
@ -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
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
35313033393235333137316165383639623864633332613139393630653931353836643332343062
|
37326164353965653363666362343638666536626536646534363962626530383131643035373332
|
||||||
3336383464363162336333356636393865343634393439370a623130396430383266666634633730
|
3834663632333832336232316439666530613061363930350a346235613533396231323530306666
|
||||||
32613332396230333436396338396434393932353037653062613433393932613932333132346335
|
61376536303332353762323930623664373835393266393464333739313461636164653431646438
|
||||||
3564366130306466370a643062633839376636333537393130316332323830306238343861306636
|
3139653830306461320a656233383866333239383432616131373831363564333531313761663666
|
||||||
62336532316364376664313765376462653731646433613939353833353632343765616365383632
|
30633334383230663737376666376331326232343931376333383330363531656239613865386263
|
||||||
39616237663731313664633038333365333036386332613738313865396139366537623235646532
|
66616439646361323838306535333633313233383034383730653166623831336238373566633066
|
||||||
34613831666364383065343737643661653931333435393564346139663162313631336162383162
|
32383836396133383030343361623034633236373765613731616137333039323235363134373735
|
||||||
32313038663962326163303533636339306535646362303561613262613632643837333634313230
|
39653530626661336362313865386134303362316663303834376132313832626533393334393531
|
||||||
62393836303366653639303735366430373565373938656162623064356239623131626361633439
|
66363265386463313830663162633933316365363563306461623664323637366162383636616633
|
||||||
65633337303337323934356466656365373136643664313535323734666130306366313434373666
|
35333433636539643733646333626133663365383061313730323261623538363532393532303335
|
||||||
66616463663436623131613238616536313963623566313532653536356637656365363134386535
|
31626265323366343237393833623963353739356138393866346230373066613938306463363934
|
||||||
36306462396161376264643061366534363231326239646665336666333732613230383134383266
|
32633063336231343063356530663261623532303330613630653636616466643231653463376165
|
||||||
3938
|
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.8.2
|
|
||||||
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
|
- name: Create the dozzle container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: dozzle
|
name: dozzle
|
||||||
image: amir20/dozzle:v8.8.2
|
image: amir20/dozzle:v8.5.5
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
networks:
|
networks:
|
||||||
@ -19,7 +19,7 @@
|
|||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
env:
|
env:
|
||||||
DOZZLE_LEVEL: "trace"
|
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:
|
labels:
|
||||||
traefik.enable: "true"
|
traefik.enable: "true"
|
||||||
traefik.http.routers.dozzle.rule: "Host(`dozzle.comprofix.xyz`)"
|
traefik.http.routers.dozzle.rule: "Host(`dozzle.comprofix.xyz`)"
|
||||||
|
@ -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"
|
|
@ -92,9 +92,9 @@
|
|||||||
env:
|
env:
|
||||||
CONFIG_FILE: "/config.yaml"
|
CONFIG_FILE: "/config.yaml"
|
||||||
GITEA_INSTANCE_URL: "https://git.comprofix.com"
|
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_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
|
- name: Create directories
|
||||||
file:
|
file:
|
||||||
@ -106,7 +106,7 @@
|
|||||||
- name: Create the opengist container
|
- name: Create the opengist container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: opengist
|
name: opengist
|
||||||
image: ghcr.io/thomiceli/opengist:1.8
|
image: ghcr.io/thomiceli/opengist:1.7
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
networks:
|
networks:
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
- name: Create the homepage container
|
- name: Create the homepage container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: homepage
|
name: homepage
|
||||||
image: ghcr.io/gethomepage/homepage:v0.9.13
|
image: ghcr.io/gethomepage/homepage:v0.9.10
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
networks:
|
networks:
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
- name: Create the Dell_R730xd Fan Contoller container
|
- name: Create the Dell_R730xd Fan Contoller container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: Dell_R730xd
|
name: Dell_R730xd
|
||||||
image: ghcr.io/tigerblue77/dell_idrac_fan_controller:latest@sha256:ba28498f50f0c1ccc494e208e96ea4958a5303f1be2197725f5de59e516e3b6c
|
image: ghcr.io/tigerblue77/dell_idrac_fan_controller:latest@sha256:1e44a090af5332842332fd58ce22a1034c045764f0104e9cf38be2386b1e1753
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
env:
|
env:
|
||||||
IDRAC_HOST: "10.10.10.138"
|
IDRAC_HOST: "10.10.10.138"
|
||||||
IDRAC_USERNAME: "root"
|
IDRAC_USERNAME: "root"
|
||||||
IDRAC_PASSWORD: "calvin"
|
IDRAC_PASSWORD: "calvin"
|
||||||
FAN_SPEED: "50"
|
FAN_SPEED: "35"
|
||||||
CPU_TEMPERATURE_THRESHOLD: "80"
|
CPU_TEMPERATURE_THRESHOLD: "80"
|
||||||
CHECK_INTERVAL: "60"
|
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
|
- name: Create the invoiceninja-nginx container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: invoiceninja-nginx
|
name: invoiceninja-nginx
|
||||||
image: nginx:1.27.3
|
image: nginx:1.27.2
|
||||||
env_file: "{{ data_folder }}/invoiceninja/stack.env"
|
env_file: "{{ data_folder }}/invoiceninja/stack.env"
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
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
|
- name: Create the jellyseerr container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: jellyseerr
|
name: jellyseerr
|
||||||
image: fallenbagel/jellyseerr:2.1.0
|
image: fallenbagel/jellyseerr:1.9.2
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
networks:
|
networks:
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
- name: Create the lidarr container
|
- name: Create the lidarr container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: lidarr
|
name: lidarr
|
||||||
image: ghcr.io/linuxserver/lidarr:latest@sha256:5c1f7a05944a1ceea242481801bbc5f908a4cc66e95ae0153b5a59f2d6224b17
|
image: ghcr.io/linuxserver/lidarr:latest@sha256:c3d8c0970b0e5a7dce0b29930efc83ab33a0fff8d1afbfca88a2104affb80c45
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
networks:
|
networks:
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
- name: Create the mariadb container
|
- name: Create the mariadb container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: "mariadb"
|
name: "mariadb"
|
||||||
image: ghcr.io/linuxserver/mariadb:10.11.10
|
image: ghcr.io/linuxserver/mariadb:10.11.8
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
ports:
|
ports:
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
- name: Create the mealie container
|
- name: Create the mealie container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: mealie
|
name: mealie
|
||||||
image: ghcr.io/mealie-recipes/mealie:v2.2.0
|
image: ghcr.io/mealie-recipes/mealie:v1.12.0
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- name: proxy
|
- 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.14
|
|
||||||
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
|
- name: Create the postgres container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: postgres
|
name: postgres
|
||||||
image: postgres:16-alpine
|
image: postgres:17-alpine
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
ports:
|
ports:
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
- name: Create the prowlarr container
|
- name: Create the prowlarr container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: prowlarr
|
name: prowlarr
|
||||||
image: linuxserver/prowlarr:1.27.0
|
image: linuxserver/prowlarr:1.24.3
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
networks:
|
networks:
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
image: ghcr.io/py-kms-organization/py-kms:latest
|
image: ghcr.io/py-kms-organization/py-kms:latest
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
|
networks:
|
||||||
|
- name: proxy_network
|
||||||
ports:
|
ports:
|
||||||
- "1688:1688"
|
- "1688:1688"
|
||||||
env:
|
env:
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
- name: Create the radarr container
|
- name: Create the radarr container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: radarr
|
name: radarr
|
||||||
image: linuxserver/radarr:5.15.1
|
image: linuxserver/radarr:5.11.0
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
networks:
|
networks:
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
- name: Create the readarr container
|
- name: Create the readarr container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: readarr
|
name: readarr
|
||||||
image: ghcr.io/linuxserver/readarr:develop@sha256:cce7bf45fb74b0eceff09975c4c9e39ca2df467043787c19f6ce8f6d3ecb80e8
|
image: ghcr.io/linuxserver/readarr:develop@sha256:2502c4fb7824e61932bde9db79b903e083ded22d1ed0ebbb0b7ce5508347877b
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
networks:
|
networks:
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
- name: Create the sonarr container
|
- name: Create the sonarr container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: sonarr
|
name: sonarr
|
||||||
image: linuxserver/sonarr:4.0.11
|
image: linuxserver/sonarr:4.0.9
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
networks:
|
networks:
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
- name: Create the speedtest container
|
- name: Create the speedtest container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: speedtest
|
name: speedtest
|
||||||
image: lscr.io/linuxserver/speedtest-tracker:0.24.2
|
image: lscr.io/linuxserver/speedtest-tracker:0.21.2
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
networks:
|
networks:
|
||||||
|
@ -6,14 +6,11 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- "{{ data_folder }}/vaultwarden"
|
- "{{ data_folder }}/vaultwarden"
|
||||||
- "{{ data_folder }}/vaultwarden/config"
|
- "{{ data_folder }}/vaultwarden/config"
|
||||||
- "{{ data_folder }}/vaultwardenbackup"
|
|
||||||
- "{{ data_folder }}/vaultwardenbackup/config"
|
|
||||||
- "{{ data_folder }}/vaultwardenbackup/config/rclone"
|
|
||||||
|
|
||||||
- name: Create the vaultwarden container
|
- name: Create the vaultwarden container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: vaultwarden
|
name: vaultwarden
|
||||||
image: vaultwarden/server:1.32.5
|
image: vaultwarden/server:1.32.1
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
recreate: true
|
recreate: true
|
||||||
networks:
|
networks:
|
||||||
@ -33,30 +30,33 @@
|
|||||||
traefik.http.services.vaultwarden.loadbalancer.server.port: "80"
|
traefik.http.services.vaultwarden.loadbalancer.server.port: "80"
|
||||||
register: container
|
register: container
|
||||||
|
|
||||||
|
- name: Create rclone config folder
|
||||||
|
file:
|
||||||
|
path: "/root/.config/rclone"
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: Copy rclone config
|
- name: Copy rclone config
|
||||||
copy:
|
copy:
|
||||||
src: scripts/rclone.conf
|
src: scripts/rclone.conf
|
||||||
dest: "{{ data_folder }}/vaultwardenbackup/config/rclone/rclone.conf"
|
dest: /root/.config/rclone/rclone.conf
|
||||||
decrypt: yes
|
decrypt: yes
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
|
|
||||||
- name: Create the vaultwarden container
|
- name: copy backup script
|
||||||
docker_container:
|
copy:
|
||||||
name: vaultwardenbackup
|
src: scripts/backupvpsdocker
|
||||||
image: ttionya/vaultwarden-backup:1.21.3
|
dest: /usr/local/sbin/backupvpsdocker
|
||||||
restart_policy: unless-stopped
|
mode: 0755
|
||||||
recreate: true
|
|
||||||
env:
|
- name: Setup cron job for backup
|
||||||
PUID: "1000"
|
cron:
|
||||||
PGID: "1000"
|
name: backup backupvpsdocker
|
||||||
TZ: "Australia/Brisbane"
|
minute: 0
|
||||||
CRON: "0 4 * * *"
|
hour: 4
|
||||||
BACKUP_KEEP_DAYS: "14"
|
job: "/usr/local/sbin/backupvpsdocker >/dev/null 2>&1"
|
||||||
ZIP_PASSWORD: "{{ VAULTWARDEN_BACKUP_ZIP_PASSWORD }}"
|
|
||||||
volumes:
|
|
||||||
- "{{ data_folder }}/vaultwarden/data:/bitwarden/data"
|
|
||||||
- "{{ data_folder }}/vaultwardenbackup/config:/config"
|
|
||||||
register: container
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user