Files
jdelpilarandJordan Del Pilar a0a75b413d
Johto Infrastructure Pipeline / Run Ansible Lint (push) Successful in 1m47s
Johto Infrastructure Pipeline / Deploy to Production (push) Successful in 2m49s
feat: add restic backup plan (#11)
### Description
This PR adds in a new role to setup backup for all hosts via restic with an rclone backend.
Added new host_vars to all host for both rclone and restic settings. All secrets are saved via ansible-vault encrypted strings.
New role creates `rclone.conf` to correctly map remotes. This conf file uses client id and client secret for google cloud project to allow for faster api access and better security.

### Related Issue
Closes #10

### Testing Done
- [x] Ran `ansible-lint` aganist local copy to verify syntax
- [x] Ran new role against testing environment to verify functionality.
- [x] Verified created backup service runs via triggering manually
- [x] Verified systemd timers trigger correctly

### Checklist
- [x] My code follows the project's style guidelines.
- [x] I have performed a self-review of my own code.

---------

Co-authored-by: Jordan Del Pilar <[email protected]>
Reviewed-on: #11
2026-07-12 12:01:23 -07:00

89 lines
5.7 KiB
YAML

---
ansible_user: jdelpilar
ansible_become_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
38343539383461386463663730376139636633656434396264626532313465393762323835393931
3030333739373033396639643539613235646364656331660a346431323433366239653535396566
62353361393734623632316463393931636566613965306262313038616665323466373363653665
6434333764636333370a653836343436643631643833333838643264326663333062646235656164
31653163653066653561393333343263653732333335633566363136353164666330
podman_config_base_dir: /home/{{ ansible_user }}/podman
podman_quadlet_base_dir: "/home/{{ ansible_user }}/.config/containers/systemd"
rclone_remotes:
- remote_name: server-gdrive
client_id: !vault |
$ANSIBLE_VAULT;1.1;AES256
39326465313031353665303231376432333337303261373331663163316666343261313237636237
3236393437623731653966636230623432646165653937630a373633363738653662313664636634
32376234643637613430383038393533363063336330623631393335636434393531396366636463
3130366462356364370a333764343431363365663637393339663962343765363839653837383434
39386438363634316131313764333937366535306463323635653534613236333064633435323061
31643364313634663037333936373132333335343966373232363136346361363461313532373033
38663239383330336238353232636361306530396535363833636632383232613662383334613839
36613662636336633762
client_secret: !vault |
$ANSIBLE_VAULT;1.1;AES256
62343763323438343864633238613435663738393563306663356333313830306662613038363139
3663366562633036636136613464653666616333633230320a333438633264313932633763303663
66393336393030313739363062623737343534353063633230643264663939323730393564613638
3639306334613330340a323363366431383039616566643237386162333234623866326230393063
61613231326465353139316166636338383939623034353132656365316339636530393435633034
6661636237316238633564373730373031346532396136626130
client_auth_token: !vault |
$ANSIBLE_VAULT;1.1;AES256
35383162613236346339663135366239316134353133356635363731303032353536663064336335
3237633033633336623862616664323730373234373737650a333336326136346637653137316137
39333566356432643866663064343435333861646231643962383335643937333330373461636239
3333633366323339300a333535386135326631613362366337363264343137313532333563633865
34313636356332633265343832376336343765326237386538333439386238666632363432656638
63343363353664313030653930306237636363386235626535663532643231343463663161623235
33386339346461646337353638346337303233653262373361386563366631366231336266366661
61623937346134626661626232383130326432656237663034393062656236663764366263343939
34306433303333373566383538386463353164656466633534653563393336356638663338323339
36316334653936386331623538623334326139653463343366346166333934383439303538326364
39623865343736373364363332616130656162363530366631373032636435353830626539303962
62373530343738353131363237663131306334363235653137356430383264396132633466623964
61356239636362353036333732656663643435626662633737373939343338376464646262653864
39393331353837643938616132666234356161626263623932643038376439356362656539623165
32643663346538383635643338376636633864663362323833383161316362653461363663343361
65303061306331663132656464343462366533376536323339393339383336313865383865353832
61626635353762363334313536313830353930306164316633656263326233373164326138316265
65663437323235363734323430393038313432616636326437336339386133643030656464663333
66616134636663666565326265633236336434363461333633343335646439653034393538353662
34353064653264353064336534393931356638646432363263376430323965383834326232393663
33326463363062323431396534313836363030313633356434616239633939626239636330303361
37356363346466393936373866333565616639353764363530303862646261626437663231393131
66623961663836333637303439376133376133316565343564393032336636353035626632663836
35643465336239396332353233373830333161366263313539643733316239333137653230663665
30366634346266306636646263323463656538613462363062316238333636663965393831393132
66623766616533646132316465333563326462353665643835663933346134393135636362613262
63633636313337623439373564386538313130633630386333623831396631386664343635646362
32396439333031653930
team_drive_id: !vault |
$ANSIBLE_VAULT;1.1;AES256
36343736643764353661393361333134346632303135303832396562656333613036626338636661
6335303438663939623931386635333336646332653439310a623439653730346633373031613264
36323637666664643332383637666461373638316434633762636131653763393366623061633464
6334366336376135380a396233656138303237326565316635616433373061633438396364663165
63336634343039646665313833383938303338663934323065383231656235666131
restic_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
39346537333832343832363633363638363438393866323162366661643732333734643766393039
3465653230373864626562656365613731303739383536350a666238373337333061386264623738
34613561666433656663373338343536663062613564353135623530643338656565366666333738
3865636531386134330a333438306465303535636538346565333962353665393539313938343165
32663830356532373038326662303262633266353766383364636636623330386139
backup_name: "goldenrod-backup"
restic_repo_url: "rclone:server-gdrive:{{ backup_name }}"
restic_password_file: "/etc/restic/password"
rclone_config_path: "/etc/rclone/rclone.conf"
backup_paths:
- /home
- /etc
- /var
keep_daily: 7
keep_weekly: 4