Compare commits
34 Commits
dfcb781a90
...
master
Author | SHA1 | Date | |
---|---|---|---|
1d5ce38922
|
|||
0b9e66f067
|
|||
379a113b86
|
|||
8538c00175
|
|||
645276018b
|
|||
ce5d682842
|
|||
de5b0f66bd
|
|||
64602b1db3
|
|||
caecb9b57e
|
|||
e8be04d5e1
|
|||
a7f90da43f
|
|||
0f80206c62
|
|||
1daff82cc5
|
|||
9b4293c624
|
|||
0d93e8094c
|
|||
b92ab556e5
|
|||
8086799c7b
|
|||
6ec5df4b66
|
|||
fb91e45806
|
|||
44f82434e7
|
|||
31ca27750e
|
|||
4be8d297ba
|
|||
bcd8e62691
|
|||
160f4219c5
|
|||
c518125bbd
|
|||
e16e23d18c
|
|||
ede37e7fa3
|
|||
b4cddb337a
|
|||
35f1abd718
|
|||
21b52a1887
|
|||
af39ca9de8
|
|||
e10b37a9f6
|
|||
85627f8931
|
|||
38e2294a65
|
@@ -46,8 +46,9 @@ tasks:
|
|||||||
- >
|
- >
|
||||||
ansible localhost
|
ansible localhost
|
||||||
--module-name template
|
--module-name template
|
||||||
--args "src=files/authelia/configuration.yml.j2 dest={{.DEST_FILE}}"
|
--args "src=files/authelia/configuration.template.yml dest={{.DEST_FILE}}"
|
||||||
--extra-vars "@vars/secrets.yml"
|
--extra-vars "@vars/secrets.yml"
|
||||||
|
--extra-vars "@files/authelia/secrets.yml"
|
||||||
- defer: rm -f {{.DEST_FILE}}
|
- defer: rm -f {{.DEST_FILE}}
|
||||||
- >
|
- >
|
||||||
{{.AUTHELIA_DOCKER}}
|
{{.AUTHELIA_DOCKER}}
|
||||||
|
1683
files/authelia/configuration.template.yml
Normal file
1683
files/authelia/configuration.template.yml
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@ services:
|
|||||||
|
|
||||||
authelia_app:
|
authelia_app:
|
||||||
container_name: 'authelia_app'
|
container_name: 'authelia_app'
|
||||||
image: 'docker.io/authelia/authelia:4.39.5'
|
image: 'docker.io/authelia/authelia:4.39.8'
|
||||||
user: '{{ user_create_result.uid }}:{{ user_create_result.group }}'
|
user: '{{ user_create_result.uid }}:{{ user_create_result.group }}'
|
||||||
restart: 'unless-stopped'
|
restart: 'unless-stopped'
|
||||||
networks:
|
networks:
|
||||||
|
136
files/authelia/secrets.yml
Normal file
136
files/authelia/secrets.yml
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
37373465363866623436393966626530656465653837363463323664383666663164363233623738
|
||||||
|
3233383234343332623065386134643161346132653431350a303935373631656366633339663333
|
||||||
|
32353263346437626633346263323533313238613462613334353334643236343438306630333037
|
||||||
|
6435313930313262310a386662336637623461303636633337303531353261343861313966383764
|
||||||
|
32353439333364353434653164666434326232383562363063313433373137383138396266383134
|
||||||
|
36613538653531346232353236313262313138656234626638623034363436303337313961333536
|
||||||
|
66366666383363333439333439623931626662383764393463663733333034636633353538656137
|
||||||
|
62386263613533343963396166666532313862366433636536613266353064633932323765336362
|
||||||
|
34643634643962333563346633306665313765393663306364363362333536646635343832333634
|
||||||
|
30383361653063396333616433323235663338346439303465323135626639646166303164643339
|
||||||
|
31616534633034393339373934346531633433323433646436333863306566356462613531663136
|
||||||
|
61343561616434306163616130626338663737633866646537323263316636626137366361363963
|
||||||
|
31303361366365616335363230343239663038623830303232376236393639663232333764643064
|
||||||
|
34666439316430356664313531333363626562633636326463313765343263393636333465386339
|
||||||
|
33623037343134633535303863626564373630656463336330396336303462373735346331616663
|
||||||
|
63666161356565643539343431386231396162323030383836366161303634626266663934356362
|
||||||
|
61623833613734333661613338373663663230363331373236323166636534613962613763343663
|
||||||
|
31666534303965333466653335646263343764346465373461326166666266303138363933653566
|
||||||
|
37636530306632346636626336616536346236663664383864623863653835366133633635613861
|
||||||
|
63303634333962343039646564353534313063383434386462366333386331303433366665623734
|
||||||
|
61353039313762383664626330663230656237373061616132376564323763393632356665306633
|
||||||
|
34643865333165616664376162306634366532386437383461396163376366363832363834356164
|
||||||
|
64376637373135383539353636346461353761366561303530326363366238393932333039313264
|
||||||
|
34316539626365306461323336396631633532306637306331373863613531656565366236656338
|
||||||
|
30306237626561613561353265643137353965313033313939643161613163643566663632663964
|
||||||
|
61623134656238363134626530363933623930346532336366393163363562386265626233393139
|
||||||
|
63633333313531666335376538613765663933626533636137306564616333373766613665613332
|
||||||
|
65643331626361626136623432346233633364343963653932306632646436626433653337326665
|
||||||
|
39343033353030616630663865613630613032333831626538323461383264636633623439393765
|
||||||
|
65343866323237386336613764386439313830646239613135636161333138646664666339626137
|
||||||
|
36616433393339346139323333363030613731313236636464393864616135346234643664343533
|
||||||
|
31396661306664343031393865306533373762663962623730313261353231363661306134623934
|
||||||
|
64613931356164386431663536363361386566353361333861666365636564643536306638376238
|
||||||
|
37633865303063643962346664346366346362313463386432376637663934363165343537323532
|
||||||
|
63363431623663656163316662343435636165306134373839613731326139636337343862326338
|
||||||
|
61326433343631343065303735663434316330303139303834316137663330363762666664393062
|
||||||
|
30653236636538396234313735613365386635323062666236656164633136313362643834336339
|
||||||
|
32623834343334613839313138313462376237666238636663343333643533643537376261666433
|
||||||
|
64323933323134393461623034623563316135333566326135326434613237363830623063626535
|
||||||
|
66323533356366346130626530633337393263663664353430646330353339313534396434653137
|
||||||
|
36663737396261653162663337663338373433653233616363626130333833323533303363643730
|
||||||
|
66613135633761346433626164643130353963313762643361306537653639373934333565373439
|
||||||
|
31636133383866373032373562653933316163353936386339326266363233663633623437346665
|
||||||
|
66393630346434356563393039626537336537313930393437663562303031626338616266363361
|
||||||
|
65653033363539633364326531653563383634303830386362303665306438663035373831646562
|
||||||
|
30356564623733623939663332393463663730643533666134636361316263633166626566333831
|
||||||
|
66376461383139626230343136373437393464646331633139633435303236623132343035373037
|
||||||
|
39363131623330376262326235646633303232623139626239326361313236316665316464616265
|
||||||
|
35303166333561626130323864363430663332306338353731383139386131346132653632633132
|
||||||
|
37643865393462623831623435633838323664666264623232326561653866626437373864666232
|
||||||
|
64393466326162323236353539326364336238643031313434346566316434383733663663356334
|
||||||
|
62343337386532393236353432653239643735323531306337373739343839306264356666636635
|
||||||
|
35626665646634653766323939633434303238633564613962643364356631623539623032363039
|
||||||
|
31336535333763323236633531616661313834636231363362376661313931623131343364356364
|
||||||
|
35653539393265323636303930633639316139643631386632646139643266303531653865623664
|
||||||
|
31303930613561323330356337396138633033616265356137353336613638656161633063663964
|
||||||
|
33373965383532656634333863643131333461376135646635323035316230393439386130663036
|
||||||
|
37373331356364343433316435666130373031303038643063313131653835333365366138656238
|
||||||
|
38643437376234316332306434633039346564643863656461353364346335353839303734366565
|
||||||
|
32613364356532623231623632363637373664393764636262346264383134366439373238623032
|
||||||
|
62326163306532356262393565373937316530623963313266373736356632313831313465666663
|
||||||
|
61303962333836373832383236663532376130316465393039326366636133323233316134646430
|
||||||
|
63313437663662353962633561643535396332303533343962643038393165373239336431336664
|
||||||
|
65356663393565383263613530663762643731356463653538316439303863643363303261363838
|
||||||
|
33353739306337326665393164366232393665363465343537373866396136346164333663393738
|
||||||
|
31316335366238316537386236393461656266323566636364343139393665616138663432333564
|
||||||
|
37653837646666376530373530636164343633653162343131373034633432333138613138346339
|
||||||
|
32303332626338653561323835343266353633613434346465616162326162393733643837663230
|
||||||
|
62333630333464633362656661336139393639623863343036636534323637336561333734373262
|
||||||
|
36373365306531383830383361303566626239343062316166303636323539373966626336613638
|
||||||
|
31623863643632653036323834346362663834666431643637666137376139386666643834323465
|
||||||
|
63626264643337376663633335666631653637626364653866353131393336303937633430366430
|
||||||
|
38383066313831346461643862333838386566613661623130313038386137323331373434363033
|
||||||
|
34613537303134343532643430383532353934623066383530653435626566333239333162316435
|
||||||
|
30386361346336666665656336646633353663376337326131663435636533646162616332306530
|
||||||
|
30373263376437646639623039343234393537303931346461643966383732336366363331643135
|
||||||
|
65383462353034643464366334636136373035313437366639336338366133663765313735353366
|
||||||
|
62386239326134343761313464383239316465633932363862303536353365376338643863643834
|
||||||
|
32633233336262626336383061316137646431353766303930336562386136383530613538383837
|
||||||
|
66336235643437636138646663393565383466636232366133343232306563363635316561346565
|
||||||
|
36633637303163303963396132653731663134666238363939666663303033316564356364633162
|
||||||
|
31376233306138666131333634336639643163666562653934336162323964613863646564616361
|
||||||
|
33666264303163326664633839303562333664383130356134383836313635376239353137313363
|
||||||
|
66613132663137383737373530326131663861303935663635373464306334363962333566663261
|
||||||
|
64616361366137626163626139333630653331383763353632396130306231376662666363353962
|
||||||
|
66343064313932386631303663373432646135353438313632316634336235316139313237666362
|
||||||
|
31383638393362663038363765303634363366326265643332393165643635643339343137373930
|
||||||
|
37633031626365353033333938623466663963376366353561303166373164386132376365643630
|
||||||
|
32333134316464643564373537643734353534366563666435663663616331383039393862613838
|
||||||
|
63633962316533386337366263636265646334636235323430383832363964343939633264343338
|
||||||
|
64366539383831373636343330356537323662666533323935646634363466663239663362326531
|
||||||
|
66363863383762303539373636336330353834303239376330623964393439356130646166663332
|
||||||
|
65326162336366363466646230656362653531386162356235326235333866373966636434326537
|
||||||
|
38653139393563373337346636333337373039343439343139313366316264613763663664633037
|
||||||
|
32313237653239643635393363316465346561613331623033323137653865396239633639323534
|
||||||
|
61326262643365363737393031383461626530636266393836663937666135363662353665376362
|
||||||
|
63643039373931316439303731663762393237623065643236303737643966393836646335626132
|
||||||
|
36376665656662373437653933356330636638626162666564393636633630663562303839326662
|
||||||
|
35626261616534386361373539633636356136616137323737393466633364653730356138343638
|
||||||
|
36663537663361393566616365383161366236646630653737643765666638346531376136643163
|
||||||
|
37643530373330353238323431343761653633306464643835343333623837313135303031666535
|
||||||
|
30326538636432303363666131376334393361333232313834623230306630373834633265333237
|
||||||
|
34323731333835363863643031346166636464653731636636313161643265613861336638313338
|
||||||
|
32383438353763343933383537636464666466386131363566306562333136356538326239656232
|
||||||
|
33343631613134616265393232613063643561633335323665383133313536313364343066366665
|
||||||
|
63636439376436393162306638303062616435333039343566613961626434303766616535623364
|
||||||
|
32643866393430303137366264306262643365663034613965666332313430366630653736303537
|
||||||
|
39663832326132393066373166613161613130363033363633366563353461663435393565326362
|
||||||
|
37616462393933303937643664343663373234663066633834626164303866323835363333366266
|
||||||
|
36356133336165613032646436306162663534306239313330353935336332643637653534626233
|
||||||
|
38303965646361316434343131653461353234396163613736333235656639326231353734636266
|
||||||
|
61613566336437666265366637336363326266383666383165343661333766303830633633393664
|
||||||
|
34613061396564616337643032666561633038663062336233666263306132663139396565323035
|
||||||
|
33353438633338363263313630393239376162366461383265386633613939663461616233396334
|
||||||
|
35616433663862616530636362396333343464393339396538333861303763393066626439396361
|
||||||
|
32303732393062383662633937653531653933333463366638613035333832636235346233653866
|
||||||
|
35656664636636326163353439626538343463613465613634656530366566323165623162303565
|
||||||
|
31303139343138616132383731323061346431336133643735356532373838663761313139663361
|
||||||
|
33656365636261303532333131346633373732643232303139353431663132346532616334613034
|
||||||
|
30363137613133396335343162643936623330393834356365663932626262313366616534663033
|
||||||
|
37376132656233633361623733356334636266383361656437613331306636656333623139303661
|
||||||
|
38353639346266333833663533366661633136313262396465633738373438623262306637643336
|
||||||
|
34656136343139663461336264346666333537633065343766316630626566363761396537643334
|
||||||
|
30323766633664666639363965363138396334343365346333663035323839613030626533303830
|
||||||
|
31333734386565383831373939306265636432386332313531623638333663643162623339613366
|
||||||
|
34363935636266313736366639373833636230633661323935646331376336623937353039343561
|
||||||
|
39623865663462663431643738653663663733663765383663623437383163613232336332653531
|
||||||
|
64663133353934313436336633666435343162316135303663636130353936363936363032313263
|
||||||
|
65376436316237663434323736663263376164346139616465663737323963316361373438633339
|
||||||
|
31323261343635633338613636643232616537653331326331353161396331633461643861323466
|
||||||
|
64633033623537386263376263346666633939336133616234363964363339616331636464326163
|
||||||
|
63633862373030323132613439343431333938343864383637613435323732356234613965666364
|
||||||
|
37343765353735633737393664306533633262353562323565306537646534663833343430643662
|
||||||
|
39326134353335653938396532363136376332306162613836663464636233383436333735663731
|
||||||
|
313461396466396230323561646662653063
|
@@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
echo "Backup: perform gitea backup"
|
|
||||||
su --login gitea --command '/home/gitea/backup.sh'
|
|
||||||
|
|
||||||
echo "Backup: perform outline backup"
|
|
||||||
su --login outline --command '/home/outline/backup.sh'
|
|
||||||
|
|
||||||
echo "Backup: perform gramps backup"
|
|
||||||
su --login gramps --command '/home/gramps/backup.sh'
|
|
||||||
|
|
||||||
echo "Backup: perform miniflux backup"
|
|
||||||
su --login miniflux --command '/home/miniflux/backup.sh'
|
|
||||||
|
|
||||||
echo "Backup: perform wakapi backup"
|
|
||||||
su --login wakapi --command '/home/wakapi/backup.sh'
|
|
||||||
|
|
||||||
echo "Backup: send backups to remote storage with retic"
|
|
||||||
|
|
||||||
restic-shell.sh backup --verbose /home/gitea/backups /home/outline/backups /home/gramps/backups /home/miniflux/backups /home/wakapi/backups \
|
|
||||||
&& restic-shell.sh check \
|
|
||||||
&& restic-shell.sh forget --compact --prune --keep-daily 90 --keep-monthly 36 \
|
|
||||||
&& restic-shell.sh check
|
|
||||||
|
|
||||||
|
|
||||||
echo "Backup: send notification"
|
|
||||||
|
|
||||||
curl -s -X POST 'https://api.telegram.org/bot{{ notifications_tg_bot_token }}/sendMessage' \
|
|
||||||
-d 'chat_id={{ notifications_tg_chat_id }}' \
|
|
||||||
-d 'parse_mode=HTML' \
|
|
||||||
-d 'text=<b>{{ notifications_name }}</b>: бекап успешно завершен!'
|
|
||||||
|
|
||||||
|
|
||||||
echo -e "\nBackup: done"
|
|
326
files/backups/backup-all.template.py
Normal file
326
files/backups/backup-all.template.py
Normal file
@@ -0,0 +1,326 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Backup script for all applications
|
||||||
|
Automatically discovers and runs backup scripts for all users,
|
||||||
|
then creates restic backups and sends notifications.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
import logging
|
||||||
|
import pwd
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import List, Tuple, Optional
|
||||||
|
import requests
|
||||||
|
|
||||||
|
# Configure logging
|
||||||
|
logging.basicConfig(
|
||||||
|
level=logging.INFO,
|
||||||
|
format="%(asctime)s - %(levelname)s - %(message)s",
|
||||||
|
handlers=[
|
||||||
|
logging.StreamHandler(sys.stdout),
|
||||||
|
logging.FileHandler("/var/log/backup-all.log"),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
# Configuration from Ansible template variables
|
||||||
|
RESTIC_REPOSITORY = "{{ restic_repository }}"
|
||||||
|
RESTIC_PASSWORD = "{{ restic_password }}"
|
||||||
|
AWS_ACCESS_KEY_ID = "{{ restic_s3_access_key }}"
|
||||||
|
AWS_SECRET_ACCESS_KEY = "{{ restic_s3_access_secret }}"
|
||||||
|
AWS_DEFAULT_REGION = "{{ restic_s3_region }}"
|
||||||
|
TELEGRAM_BOT_TOKEN = "{{ notifications_tg_bot_token }}"
|
||||||
|
TELEGRAM_CHAT_ID = "{{ notifications_tg_chat_id }}"
|
||||||
|
NOTIFICATIONS_NAME = "{{ notifications_name }}"
|
||||||
|
|
||||||
|
|
||||||
|
class BackupManager:
|
||||||
|
def __init__(self):
|
||||||
|
self.errors = []
|
||||||
|
self.warnings = []
|
||||||
|
self.successful_backups = []
|
||||||
|
|
||||||
|
def get_home_directories(self) -> List[Tuple[str, str]]:
|
||||||
|
"""Get all home directories and their owners"""
|
||||||
|
home_dirs = []
|
||||||
|
home_path = Path("/home")
|
||||||
|
|
||||||
|
if not home_path.exists():
|
||||||
|
logger.error("/home directory does not exist")
|
||||||
|
return home_dirs
|
||||||
|
|
||||||
|
for user_dir in home_path.iterdir():
|
||||||
|
if user_dir.is_dir():
|
||||||
|
try:
|
||||||
|
# Get the owner of the directory
|
||||||
|
stat_info = user_dir.stat()
|
||||||
|
owner = pwd.getpwuid(stat_info.st_uid).pw_name
|
||||||
|
home_dirs.append((str(user_dir), owner))
|
||||||
|
except (KeyError, OSError) as e:
|
||||||
|
logger.warning(f"Could not get owner for {user_dir}: {e}")
|
||||||
|
|
||||||
|
return home_dirs
|
||||||
|
|
||||||
|
def find_backup_script(self, home_dir: str) -> Optional[str]:
|
||||||
|
"""Find backup script in user's home directory"""
|
||||||
|
possible_scripts = [
|
||||||
|
os.path.join(home_dir, "backup.sh"),
|
||||||
|
os.path.join(home_dir, "backup"),
|
||||||
|
]
|
||||||
|
|
||||||
|
for script_path in possible_scripts:
|
||||||
|
if os.path.exists(script_path):
|
||||||
|
# Check if file is executable
|
||||||
|
if os.access(script_path, os.X_OK):
|
||||||
|
return script_path
|
||||||
|
else:
|
||||||
|
logger.warning(
|
||||||
|
f"Backup script {script_path} exists but is not executable"
|
||||||
|
)
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
def run_user_backup(self, script_path: str, username: str) -> bool:
|
||||||
|
"""Run backup script as the specified user"""
|
||||||
|
try:
|
||||||
|
logger.info(f"Running backup script {script_path} as user {username}")
|
||||||
|
|
||||||
|
# Use su to run the script as the user
|
||||||
|
cmd = ["su", "--login", username, "--command", script_path]
|
||||||
|
|
||||||
|
result = subprocess.run(
|
||||||
|
cmd, capture_output=True, text=True, timeout=3600 # 1 hour timeout
|
||||||
|
)
|
||||||
|
|
||||||
|
if result.returncode == 0:
|
||||||
|
logger.info(f"Backup script for {username} completed successfully")
|
||||||
|
self.successful_backups.append(username)
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
error_msg = f"Backup script for {username} failed with return code {result.returncode}"
|
||||||
|
if result.stderr:
|
||||||
|
error_msg += f": {result.stderr}"
|
||||||
|
logger.error(error_msg)
|
||||||
|
self.errors.append(f"User {username}: {error_msg}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
except subprocess.TimeoutExpired:
|
||||||
|
error_msg = f"Backup script for {username} timed out"
|
||||||
|
logger.error(error_msg)
|
||||||
|
self.errors.append(f"User {username}: {error_msg}")
|
||||||
|
return False
|
||||||
|
except Exception as e:
|
||||||
|
error_msg = f"Failed to run backup script for {username}: {str(e)}"
|
||||||
|
logger.error(error_msg)
|
||||||
|
self.errors.append(f"User {username}: {error_msg}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def get_backup_directories(self) -> List[str]:
|
||||||
|
"""Get all backup directories that exist"""
|
||||||
|
backup_dirs = []
|
||||||
|
home_dirs = self.get_home_directories()
|
||||||
|
|
||||||
|
for home_dir, _ in home_dirs:
|
||||||
|
backup_path = os.path.join(home_dir, "backups")
|
||||||
|
if os.path.exists(backup_path) and os.path.isdir(backup_path):
|
||||||
|
backup_dirs.append(backup_path)
|
||||||
|
|
||||||
|
return backup_dirs
|
||||||
|
|
||||||
|
def run_restic_backup(self, backup_dirs: List[str]) -> bool:
|
||||||
|
"""Run restic backup for all backup directories"""
|
||||||
|
if not backup_dirs:
|
||||||
|
logger.warning("No backup directories found")
|
||||||
|
return True
|
||||||
|
|
||||||
|
try:
|
||||||
|
logger.info("Starting restic backup")
|
||||||
|
|
||||||
|
# Set environment variables for restic
|
||||||
|
env = os.environ.copy()
|
||||||
|
env.update(
|
||||||
|
{
|
||||||
|
"RESTIC_REPOSITORY": RESTIC_REPOSITORY,
|
||||||
|
"RESTIC_PASSWORD": RESTIC_PASSWORD,
|
||||||
|
"AWS_ACCESS_KEY_ID": AWS_ACCESS_KEY_ID,
|
||||||
|
"AWS_SECRET_ACCESS_KEY": AWS_SECRET_ACCESS_KEY,
|
||||||
|
"AWS_DEFAULT_REGION": AWS_DEFAULT_REGION,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Run backup
|
||||||
|
backup_cmd = ["restic", "backup", "--verbose"] + backup_dirs
|
||||||
|
result = subprocess.run(backup_cmd, env=env, capture_output=True, text=True)
|
||||||
|
|
||||||
|
if result.returncode != 0:
|
||||||
|
error_msg = f"Restic backup failed: {result.stderr}"
|
||||||
|
logger.error(error_msg)
|
||||||
|
self.errors.append(f"Restic backup: {error_msg}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
logger.info("Restic backup completed successfully")
|
||||||
|
|
||||||
|
# Run check
|
||||||
|
check_cmd = ["restic", "check"]
|
||||||
|
result = subprocess.run(check_cmd, env=env, capture_output=True, text=True)
|
||||||
|
|
||||||
|
if result.returncode != 0:
|
||||||
|
error_msg = f"Restic check failed: {result.stderr}"
|
||||||
|
logger.error(error_msg)
|
||||||
|
self.errors.append(f"Restic check: {error_msg}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
logger.info("Restic check completed successfully")
|
||||||
|
|
||||||
|
# Run forget and prune
|
||||||
|
forget_cmd = [
|
||||||
|
"restic",
|
||||||
|
"forget",
|
||||||
|
"--compact",
|
||||||
|
"--prune",
|
||||||
|
"--keep-daily",
|
||||||
|
"90",
|
||||||
|
"--keep-monthly",
|
||||||
|
"36",
|
||||||
|
]
|
||||||
|
result = subprocess.run(forget_cmd, env=env, capture_output=True, text=True)
|
||||||
|
|
||||||
|
if result.returncode != 0:
|
||||||
|
error_msg = f"Restic forget/prune failed: {result.stderr}"
|
||||||
|
logger.error(error_msg)
|
||||||
|
self.errors.append(f"Restic forget/prune: {error_msg}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
logger.info("Restic forget/prune completed successfully")
|
||||||
|
|
||||||
|
# Final check
|
||||||
|
result = subprocess.run(check_cmd, env=env, capture_output=True, text=True)
|
||||||
|
|
||||||
|
if result.returncode != 0:
|
||||||
|
error_msg = f"Final restic check failed: {result.stderr}"
|
||||||
|
logger.error(error_msg)
|
||||||
|
self.errors.append(f"Final restic check: {error_msg}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
logger.info("Final restic check completed successfully")
|
||||||
|
return True
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
error_msg = f"Restic backup process failed: {str(e)}"
|
||||||
|
logger.error(error_msg)
|
||||||
|
self.errors.append(f"Restic: {error_msg}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
def send_telegram_notification(self, success: bool) -> None:
|
||||||
|
"""Send notification to Telegram"""
|
||||||
|
try:
|
||||||
|
if success and not self.errors:
|
||||||
|
message = f"<b>{NOTIFICATIONS_NAME}</b>: бекап успешно завершен!"
|
||||||
|
if self.successful_backups:
|
||||||
|
message += (
|
||||||
|
f"\n\nУспешные бекапы: {', '.join(self.successful_backups)}"
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
message = f"<b>{NOTIFICATIONS_NAME}</b>: бекап завершен с ошибками!"
|
||||||
|
|
||||||
|
if self.successful_backups:
|
||||||
|
message += (
|
||||||
|
f"\n\n✅ Успешные бекапы: {', '.join(self.successful_backups)}"
|
||||||
|
)
|
||||||
|
|
||||||
|
if self.warnings:
|
||||||
|
message += f"\n\n⚠️ Предупреждения:\n" + "\n".join(self.warnings)
|
||||||
|
|
||||||
|
if self.errors:
|
||||||
|
message += f"\n\n❌ Ошибки:\n" + "\n".join(self.errors)
|
||||||
|
|
||||||
|
url = f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage"
|
||||||
|
data = {"chat_id": TELEGRAM_CHAT_ID, "parse_mode": "HTML", "text": message}
|
||||||
|
|
||||||
|
response = requests.post(url, data=data, timeout=30)
|
||||||
|
|
||||||
|
if response.status_code == 200:
|
||||||
|
logger.info("Telegram notification sent successfully")
|
||||||
|
else:
|
||||||
|
logger.error(
|
||||||
|
f"Failed to send Telegram notification: {response.status_code} - {response.text}"
|
||||||
|
)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Failed to send Telegram notification: {str(e)}")
|
||||||
|
|
||||||
|
def run_backup_process(self) -> bool:
|
||||||
|
"""Main backup process"""
|
||||||
|
logger.info("Starting backup process")
|
||||||
|
|
||||||
|
# Get all home directories
|
||||||
|
home_dirs = self.get_home_directories()
|
||||||
|
logger.info(f"Found {len(home_dirs)} home directories")
|
||||||
|
|
||||||
|
# Process each user's backup
|
||||||
|
for home_dir, username in home_dirs:
|
||||||
|
logger.info(f"Processing backup for user: {username} ({home_dir})")
|
||||||
|
|
||||||
|
# Find backup script
|
||||||
|
backup_script = self.find_backup_script(home_dir)
|
||||||
|
|
||||||
|
if backup_script is None:
|
||||||
|
warning_msg = (
|
||||||
|
f"No backup script found for user {username} in {home_dir}"
|
||||||
|
)
|
||||||
|
logger.warning(warning_msg)
|
||||||
|
self.warnings.append(warning_msg)
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Run backup script
|
||||||
|
self.run_user_backup(backup_script, username)
|
||||||
|
|
||||||
|
# Get backup directories
|
||||||
|
backup_dirs = self.get_backup_directories()
|
||||||
|
logger.info(f"Found backup directories: {backup_dirs}")
|
||||||
|
|
||||||
|
# Run restic backup
|
||||||
|
restic_success = self.run_restic_backup(backup_dirs)
|
||||||
|
|
||||||
|
# Determine overall success
|
||||||
|
overall_success = restic_success and len(self.errors) == 0
|
||||||
|
|
||||||
|
# Send notification
|
||||||
|
self.send_telegram_notification(overall_success)
|
||||||
|
|
||||||
|
logger.info("Backup process completed")
|
||||||
|
|
||||||
|
if self.errors:
|
||||||
|
logger.error(f"Backup completed with {len(self.errors)} errors")
|
||||||
|
return False
|
||||||
|
elif self.warnings:
|
||||||
|
logger.warning(f"Backup completed with {len(self.warnings)} warnings")
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
logger.info("Backup completed successfully")
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Main entry point"""
|
||||||
|
try:
|
||||||
|
backup_manager = BackupManager()
|
||||||
|
success = backup_manager.run_backup_process()
|
||||||
|
|
||||||
|
if success:
|
||||||
|
sys.exit(0)
|
||||||
|
else:
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
logger.info("Backup process interrupted by user")
|
||||||
|
sys.exit(130)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Unexpected error in backup process: {str(e)}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
@@ -91,3 +91,14 @@ rssbridge.vakhrushev.me {
|
|||||||
reverse_proxy rssbridge_app:80
|
reverse_proxy rssbridge_app:80
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dozzle.vakhrushev.me {
|
||||||
|
tls anwinged@ya.ru
|
||||||
|
|
||||||
|
forward_auth authelia_app:9091 {
|
||||||
|
uri /api/authz/forward-auth
|
||||||
|
copy_headers Remote-User Remote-Groups Remote-Email Remote-Name Remote-Filter
|
||||||
|
}
|
||||||
|
|
||||||
|
reverse_proxy dozzle_app:8080
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
{{ service_name }}:
|
{{ service_name }}:
|
||||||
image: caddy:2.10.0
|
image: caddy:2.10.2
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
container_name: {{ service_name }}
|
container_name: {{ service_name }}
|
||||||
ports:
|
ports:
|
||||||
|
23
files/dozzle/docker-compose.yml.j2
Normal file
23
files/dozzle/docker-compose.yml.j2
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
dozzle_app:
|
||||||
|
image: amir20/dozzle:v8.13.12
|
||||||
|
container_name: dozzle_app
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
networks:
|
||||||
|
- "web_proxy_network"
|
||||||
|
environment:
|
||||||
|
DOZZLE_HOSTNAME: vakhrushev.me
|
||||||
|
DOZZLE_AUTH_PROVIDER: forward-proxy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "/dozzle", "healthcheck"]
|
||||||
|
interval: 3s
|
||||||
|
timeout: 30s
|
||||||
|
retries: 5
|
||||||
|
start_period: 30s
|
||||||
|
|
||||||
|
networks:
|
||||||
|
web_proxy_network:
|
||||||
|
external: true
|
@@ -1,7 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
gitea_app:
|
gitea_app:
|
||||||
image: gitea/gitea:1.24.3
|
image: gitea/gitea:1.24.5
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
container_name: gitea_app
|
container_name: gitea_app
|
||||||
ports:
|
ports:
|
||||||
@@ -15,8 +15,8 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- "web_proxy_network"
|
- "web_proxy_network"
|
||||||
environment:
|
environment:
|
||||||
- "USER_UID=${USER_UID}"
|
- "USER_UID={{ user_create_result.uid }}"
|
||||||
- "USER_GID=${USER_GID}"
|
- "USER_GID={{ user_create_result.group }}"
|
||||||
- "GITEA__server__SSH_PORT=2222"
|
- "GITEA__server__SSH_PORT=2222"
|
||||||
|
|
||||||
# Mailer
|
# Mailer
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
gramps_app: &gramps_app
|
gramps_app: &gramps_app
|
||||||
image: ghcr.io/gramps-project/grampsweb:25.7.3
|
image: ghcr.io/gramps-project/grampsweb:25.8.0
|
||||||
container_name: gramps_app
|
container_name: gramps_app
|
||||||
depends_on:
|
depends_on:
|
||||||
- gramps_redis
|
- gramps_redis
|
||||||
|
@@ -5,23 +5,27 @@ services:
|
|||||||
miniflux_app:
|
miniflux_app:
|
||||||
image: miniflux/miniflux:2.2.10
|
image: miniflux/miniflux:2.2.10
|
||||||
container_name: miniflux_app
|
container_name: miniflux_app
|
||||||
|
user: "{{ user_create_result.uid }}:{{ user_create_result.group }}"
|
||||||
depends_on:
|
depends_on:
|
||||||
miniflux_postgres:
|
miniflux_postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
restart: 'unless-stopped'
|
||||||
networks:
|
networks:
|
||||||
- "miniflux_network"
|
- "miniflux_network"
|
||||||
- "web_proxy_network"
|
- "web_proxy_network"
|
||||||
|
volumes:
|
||||||
|
- "{{ secrets_dir }}:/secrets:ro"
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgres://{{ miniflux_postgres_user }}:{{ miniflux_postgres_password }}@miniflux_postgres/{{ miniflux_postgres_database }}?sslmode=disable
|
- DATABASE_URL_FILE=/secrets/miniflux_database_url
|
||||||
- RUN_MIGRATIONS=1
|
- RUN_MIGRATIONS=1
|
||||||
- CREATE_ADMIN=1
|
- CREATE_ADMIN=1
|
||||||
- ADMIN_USERNAME={{ miniflux_admin_user }}
|
- ADMIN_USERNAME_FILE=/secrets/miniflux_admin_user
|
||||||
- ADMIN_PASSWORD={{ miniflux_admin_password }}
|
- ADMIN_PASSWORD_FILE=/secrets/miniflux_admin_password
|
||||||
- BASE_URL=https://miniflux.vakhrushev.me
|
- BASE_URL=https://miniflux.vakhrushev.me
|
||||||
- DISABLE_LOCAL_AUTH=1
|
- DISABLE_LOCAL_AUTH=1
|
||||||
- OAUTH2_OIDC_DISCOVERY_ENDPOINT=https://auth.vakhrushev.me
|
- OAUTH2_OIDC_DISCOVERY_ENDPOINT=https://auth.vakhrushev.me
|
||||||
- OAUTH2_CLIENT_ID={{ miniflux_oidc_client_id }}
|
- OAUTH2_CLIENT_ID_FILE=/secrets/miniflux_oidc_client_id
|
||||||
- OAUTH2_CLIENT_SECRET={{ miniflux_oidc_client_secret }}
|
- OAUTH2_CLIENT_SECRET_FILE=/secrets/miniflux_oidc_client_secret
|
||||||
- OAUTH2_OIDC_PROVIDER_NAME=Authelia
|
- OAUTH2_OIDC_PROVIDER_NAME=Authelia
|
||||||
- OAUTH2_PROVIDER=oidc
|
- OAUTH2_PROVIDER=oidc
|
||||||
- OAUTH2_REDIRECT_URL=https://miniflux.vakhrushev.me/oauth2/oidc/callback
|
- OAUTH2_REDIRECT_URL=https://miniflux.vakhrushev.me/oauth2/oidc/callback
|
||||||
@@ -32,17 +36,21 @@ services:
|
|||||||
miniflux_postgres:
|
miniflux_postgres:
|
||||||
image: postgres:16.3-bookworm
|
image: postgres:16.3-bookworm
|
||||||
container_name: miniflux_postgres
|
container_name: miniflux_postgres
|
||||||
|
user: "{{ user_create_result.uid }}:{{ user_create_result.group }}"
|
||||||
|
restart: 'unless-stopped'
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER={{ miniflux_postgres_user }}
|
- POSTGRES_USER={{ miniflux_postgres_user }}
|
||||||
- POSTGRES_PASSWORD={{ miniflux_postgres_password }}
|
- POSTGRES_PASSWORD_FILE=/secrets/miniflux_postgres_password
|
||||||
- POSTGRES_DB={{ miniflux_postgres_database }}
|
- POSTGRES_DB={{ miniflux_postgres_database }}
|
||||||
networks:
|
networks:
|
||||||
- "miniflux_network"
|
- "miniflux_network"
|
||||||
- "monitoring_network"
|
- "monitoring_network"
|
||||||
volumes:
|
volumes:
|
||||||
- {{ postgres_data_dir }}:/var/lib/postgresql/data
|
- "/etc/passwd:/etc/passwd:ro"
|
||||||
|
- "{{ secrets_dir }}:/secrets:ro"
|
||||||
|
- "{{ postgres_data_dir }}:/var/lib/postgresql/data"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "pg_isready", "-U", "miniflux"]
|
test: ["CMD", "pg_isready", "--username={{ miniflux_postgres_user }}", "--dbname={{ miniflux_postgres_database }}"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
start_period: 30s
|
start_period: 30s
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
netdata:
|
netdata:
|
||||||
image: netdata/netdata:v2.6.1
|
image: netdata/netdata:v2.6.3
|
||||||
container_name: netdata
|
container_name: netdata
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
cap_add:
|
cap_add:
|
||||||
|
@@ -19,3 +19,6 @@ jobs:
|
|||||||
selector:
|
selector:
|
||||||
allow:
|
allow:
|
||||||
- "miniflux_*"
|
- "miniflux_*"
|
||||||
|
|
||||||
|
- name: transcriber
|
||||||
|
url: http://transcriber_app:8080/metrics
|
||||||
|
@@ -3,7 +3,7 @@ services:
|
|||||||
# See sample https://github.com/outline/outline/blob/main/.env.sample
|
# See sample https://github.com/outline/outline/blob/main/.env.sample
|
||||||
|
|
||||||
outline_app:
|
outline_app:
|
||||||
image: outlinewiki/outline:0.85.1
|
image: outlinewiki/outline:0.87.3
|
||||||
container_name: outline_app
|
container_name: outline_app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
rssbridge_app:
|
rssbridge_app:
|
||||||
image: rssbridge/rss-bridge:2025-06-03
|
image: rssbridge/rss-bridge:2025-08-05
|
||||||
container_name: rssbridge_app
|
container_name: rssbridge_app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
|
44
files/transcriber/config.secrets.toml
Normal file
44
files/transcriber/config.secrets.toml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
33396537353265633634336630353330653337623861373731613734663938633837613437366537
|
||||||
|
3439383366633266623463366530626662346338393165630a663539313066663061353635666366
|
||||||
|
61393437393131333166626165306563366661353338363138633239666566313330363331666537
|
||||||
|
3763356535396334380a386362383436363732353234333033613133383264643934306432313335
|
||||||
|
34646164323664636532663835306230386633316539373564383163346663376666633564326134
|
||||||
|
30666135626637343963383766383836653135633739636261353666303666633566346562643962
|
||||||
|
63376165636434343066306539653637343736323437653465656436323533636237643333326438
|
||||||
|
35626239323530643066363533323039393237333338316135313838643464306161646635313062
|
||||||
|
36386565626435373333393566393831366538363864313737306565343162316536353539333864
|
||||||
|
63376264643566613266373665666363366662643262616634333132386535383731396462633430
|
||||||
|
32343738343039616139343833366661303430383766376139636434616565356161396433643035
|
||||||
|
37363165383935373937346464343738643430333764336264373931616332393964346566636638
|
||||||
|
39303434343461326464623363323937396663376335316237373166306134636432376435663033
|
||||||
|
34346436623435626363636237373965633139343661623135633764303862353465306235666563
|
||||||
|
66653764666635636462636434663264646665383236343166643133613966366334653030653262
|
||||||
|
38326437313939616332636638323033346139343732653933356239306132613665376163646164
|
||||||
|
30316663643666633334653133613764396165646533636534613931663138666366316235396466
|
||||||
|
61313964396264626339306135376635633133366433303033633363396132303938363638346333
|
||||||
|
66326466326134313535393831343262363862663065323135643630316431336531373833316363
|
||||||
|
64376338653366353031333836643137333736363534363164306331313337353663653961623665
|
||||||
|
64626562366637336637353433303261303964633236356162363139396339396136393237643935
|
||||||
|
34316266326561663834353762343766363933313463313263393063343562613933393361653861
|
||||||
|
38363635323231666438366536626435373365323733663139666534636564623666356436346539
|
||||||
|
63326436386436356636633637373738343032353664323736653939346234643165313461643833
|
||||||
|
35666439613136396264313033336539313537613238393262306365656238396464373936616538
|
||||||
|
64316365616464386638313331653030346330393665353539393834346135643434363736323135
|
||||||
|
37663433326439356663633162616435313061353662373766633731636439636266666466613363
|
||||||
|
39343930386534376330663230623832643933336235636166626534366664366562356165373764
|
||||||
|
63343432323864366162376263656565646661633536666336643030363039616666343063386165
|
||||||
|
37343238303034313832393538313632396261316232376635633732656663396631323261363433
|
||||||
|
38373738363833323934353739643538376237316535623035383965613965636337646537326537
|
||||||
|
64663837643632666334393634323264613139353332306263613165383733386662366333316139
|
||||||
|
63373839346265366166333331353231663763306163323063613138323835313831303666306561
|
||||||
|
39316666343761303464333535336361333462623363633333383363303134336139356436666165
|
||||||
|
62616364373030613837353939363636653537373965613531636130383266643637333233316137
|
||||||
|
39353866366239643265366162663031346439663234363935353138323739393337313835313062
|
||||||
|
33373263326565383735366364316461323930336437623834356132346633636364313732383661
|
||||||
|
66346634613762613037386238656334616430633037343066623463313035646339313638653137
|
||||||
|
65643166316664626236633332326136303235623934306462643636373437373630346435633835
|
||||||
|
66346364393236393563623032306631396561623263653236393939313333373635303365316638
|
||||||
|
66373037333565323733656331636337336665363038353635383531386366633632363031623430
|
||||||
|
31356461663438653736316464363231303938653932613561633139316361633461626361383132
|
||||||
|
396436303634613135383839396566393135
|
23
files/transcriber/docker-compose.yml.j2
Normal file
23
files/transcriber/docker-compose.yml.j2
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
transcriber_app:
|
||||||
|
image: "{{ registry_transcriber_image }}"
|
||||||
|
container_name: transcriber_app
|
||||||
|
user: '{{ user_create_result.uid }}:{{ user_create_result.group }}'
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- "{{ config_file }}:/config/config.toml:ro"
|
||||||
|
- "{{ data_dir }}:/data"
|
||||||
|
networks:
|
||||||
|
- "web_proxy_network"
|
||||||
|
- "monitoring_network"
|
||||||
|
environment:
|
||||||
|
- "USER_UID={{ user_create_result.uid }}"
|
||||||
|
- "USER_GID={{ user_create_result.group }}"
|
||||||
|
command: ./transcriber --config=/config/config.toml
|
||||||
|
|
||||||
|
networks:
|
||||||
|
web_proxy_network:
|
||||||
|
external: true
|
||||||
|
monitoring_network:
|
||||||
|
external: true
|
@@ -3,7 +3,7 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
wakapi_app:
|
wakapi_app:
|
||||||
image: ghcr.io/muety/wakapi:2.14.1
|
image: ghcr.io/muety/wakapi:2.15.0
|
||||||
container_name: wakapi_app
|
container_name: wakapi_app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
user: '{{ user_create_result.uid }}:{{ user_create_result.group }}'
|
user: '{{ user_create_result.uid }}:{{ user_create_result.group }}'
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
vars_files:
|
vars_files:
|
||||||
- vars/ports.yml
|
- vars/ports.yml
|
||||||
- vars/secrets.yml
|
- vars/secrets.yml
|
||||||
|
- files/authelia/secrets.yml
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
app_name: "authelia"
|
app_name: "authelia"
|
||||||
@@ -30,19 +31,17 @@
|
|||||||
loop:
|
loop:
|
||||||
- "{{ config_dir }}"
|
- "{{ config_dir }}"
|
||||||
|
|
||||||
- name: "Copy configuration files"
|
- name: "Copy users file"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "files/{{ app_name }}/{{ item }}"
|
src: "files/{{ app_name }}/users.secrets.yml"
|
||||||
dest: "{{ (config_dir, item) | path_join }}"
|
dest: "{{ (config_dir, 'users.yml') | path_join }}"
|
||||||
owner: "{{ app_user }}"
|
owner: "{{ app_user }}"
|
||||||
group: "{{ app_user }}"
|
group: "{{ app_user }}"
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
loop:
|
|
||||||
- "users.yml"
|
|
||||||
|
|
||||||
- name: "Copy configuration files (templates)"
|
- name: "Copy configuration files (templates)"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "files/{{ app_name }}/configuration.yml.j2"
|
src: "files/{{ app_name }}/configuration.template.yml"
|
||||||
dest: "{{ (config_dir, 'configuration.yml') | path_join }}"
|
dest: "{{ (config_dir, 'configuration.yml') | path_join }}"
|
||||||
owner: "{{ app_user }}"
|
owner: "{{ app_user }}"
|
||||||
group: "{{ app_user }}"
|
group: "{{ app_user }}"
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
vars:
|
vars:
|
||||||
restic_shell_script: "{{ (bin_prefix, 'restic-shell.sh') | path_join }}"
|
restic_shell_script: "{{ (bin_prefix, 'restic-shell.sh') | path_join }}"
|
||||||
backup_all_script: "{{ (bin_prefix, 'backup-all.sh') | path_join }}"
|
backup_all_script: "{{ (bin_prefix, 'backup-all.py') | path_join }}"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Copy restic shell script"
|
- name: "Copy restic shell script"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
- name: "Copy backup all script"
|
- name: "Copy backup all script"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "files/backups/backup-all.sh.j2"
|
src: "files/backups/backup-all.template.py"
|
||||||
dest: "{{ backup_all_script }}"
|
dest: "{{ backup_all_script }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
@@ -21,11 +21,7 @@
|
|||||||
- "docker-{{ docker_edition }}-cli"
|
- "docker-{{ docker_edition }}-cli"
|
||||||
- "docker-{{ docker_edition }}-rootless-extras"
|
- "docker-{{ docker_edition }}-rootless-extras"
|
||||||
docker_users:
|
docker_users:
|
||||||
- major
|
- "{{ primary_user }}"
|
||||||
|
|
||||||
- name: "Login to yandex docker registry."
|
|
||||||
ansible.builtin.script:
|
|
||||||
cmd: "files/yandex-docker-registry-auth.sh"
|
|
||||||
|
|
||||||
- name: Create a network for web proxy
|
- name: Create a network for web proxy
|
||||||
community.docker.docker_network:
|
community.docker.docker_network:
|
||||||
|
34
playbook-dozzle.yml
Normal file
34
playbook-dozzle.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
- name: "Configure dozzle application"
|
||||||
|
hosts: all
|
||||||
|
|
||||||
|
vars_files:
|
||||||
|
- vars/ports.yml
|
||||||
|
- vars/secrets.yml
|
||||||
|
|
||||||
|
vars:
|
||||||
|
app_name: "dozzle"
|
||||||
|
app_user: "{{ app_name }}"
|
||||||
|
base_dir: "/home/{{ app_user }}"
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: "Create user and environment"
|
||||||
|
ansible.builtin.import_role:
|
||||||
|
name: owner
|
||||||
|
vars:
|
||||||
|
owner_name: "{{ app_user }}"
|
||||||
|
owner_extra_groups: ["docker"]
|
||||||
|
|
||||||
|
- name: "Copy docker compose file"
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "./files/{{ app_name }}/docker-compose.yml.j2"
|
||||||
|
dest: "{{ base_dir }}/docker-compose.yml"
|
||||||
|
owner: "{{ app_user }}"
|
||||||
|
group: "{{ app_user }}"
|
||||||
|
mode: "0640"
|
||||||
|
|
||||||
|
- name: "Run application with docker compose"
|
||||||
|
community.docker.docker_compose_v2:
|
||||||
|
project_src: "{{ base_dir }}"
|
||||||
|
state: "present"
|
||||||
|
remove_orphans: true
|
@@ -11,6 +11,7 @@
|
|||||||
app_user: "{{ app_name }}"
|
app_user: "{{ app_name }}"
|
||||||
base_dir: "/home/{{ app_user }}"
|
base_dir: "/home/{{ app_user }}"
|
||||||
data_dir: "{{ (base_dir, 'data') | path_join }}"
|
data_dir: "{{ (base_dir, 'data') | path_join }}"
|
||||||
|
secrets_dir: "{{ (base_dir, 'secrets') | path_join }}"
|
||||||
postgres_data_dir: "{{ (base_dir, 'data', 'postgres') | path_join }}"
|
postgres_data_dir: "{{ (base_dir, 'data', 'postgres') | path_join }}"
|
||||||
postgres_backups_dir: "{{ (base_dir, 'backups', 'postgres') | path_join }}"
|
postgres_backups_dir: "{{ (base_dir, 'backups', 'postgres') | path_join }}"
|
||||||
|
|
||||||
@@ -32,6 +33,21 @@
|
|||||||
loop:
|
loop:
|
||||||
- "{{ postgres_backups_dir }}"
|
- "{{ postgres_backups_dir }}"
|
||||||
|
|
||||||
|
- name: "Copy secrets"
|
||||||
|
ansible.builtin.import_role:
|
||||||
|
name: secrets
|
||||||
|
vars:
|
||||||
|
secrets_dest: "{{ secrets_dir }}"
|
||||||
|
secrets_user: "{{ app_user }}"
|
||||||
|
secrets_group: "{{ app_user }}"
|
||||||
|
secrets_vars:
|
||||||
|
- "miniflux_database_url"
|
||||||
|
- "miniflux_admin_user"
|
||||||
|
- "miniflux_admin_password"
|
||||||
|
- "miniflux_oidc_client_id"
|
||||||
|
- "miniflux_oidc_client_secret"
|
||||||
|
- "miniflux_postgres_password"
|
||||||
|
|
||||||
- name: "Copy docker compose file"
|
- name: "Copy docker compose file"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "./files/{{ app_name }}/docker-compose.yml.j2"
|
src: "./files/{{ app_name }}/docker-compose.yml.j2"
|
||||||
@@ -52,4 +68,5 @@
|
|||||||
community.docker.docker_compose_v2:
|
community.docker.docker_compose_v2:
|
||||||
project_src: "{{ base_dir }}"
|
project_src: "{{ base_dir }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
recreate: "always"
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
|
92
playbook-transcriber.yml
Normal file
92
playbook-transcriber.yml
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
---
|
||||||
|
- name: "Deploy transcriber application"
|
||||||
|
hosts: all
|
||||||
|
|
||||||
|
vars_files:
|
||||||
|
- vars/ports.yml
|
||||||
|
- vars/secrets.yml
|
||||||
|
|
||||||
|
|
||||||
|
vars:
|
||||||
|
app_name: "transcriber"
|
||||||
|
app_user: "{{ app_name }}"
|
||||||
|
base_dir: "/home/{{ app_user }}"
|
||||||
|
|
||||||
|
config_dir: "{{ (base_dir, 'config') | path_join }}"
|
||||||
|
config_file: "{{ (config_dir, 'config.toml') | path_join }}"
|
||||||
|
|
||||||
|
data_dir: "{{ (base_dir, 'data') | path_join }}"
|
||||||
|
backups_dir: "{{ (base_dir, 'backups') | path_join }}"
|
||||||
|
|
||||||
|
docker_registry_prefix: "cr.yandex/crplfk0168i4o8kd7ade"
|
||||||
|
|
||||||
|
# transcriber_image: "{{ transcriber_image | default(omit) }}"
|
||||||
|
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: "Create user and environment"
|
||||||
|
ansible.builtin.import_role:
|
||||||
|
name: owner
|
||||||
|
vars:
|
||||||
|
owner_name: "{{ app_user }}"
|
||||||
|
owner_extra_groups: ["docker"]
|
||||||
|
|
||||||
|
- name: "Create application internal directories"
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: "directory"
|
||||||
|
owner: "{{ app_user }}"
|
||||||
|
group: "{{ app_user }}"
|
||||||
|
mode: "0750"
|
||||||
|
loop:
|
||||||
|
- "{{ config_dir }}"
|
||||||
|
- "{{ data_dir }}"
|
||||||
|
- "{{ backups_dir }}"
|
||||||
|
|
||||||
|
- name: "Copy configuration files (templates)"
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "files/{{ app_name }}/config.secrets.toml"
|
||||||
|
dest: "{{ config_file }}"
|
||||||
|
owner: "{{ app_user }}"
|
||||||
|
group: "{{ app_user }}"
|
||||||
|
mode: "0600"
|
||||||
|
|
||||||
|
- name: "Login to yandex docker registry."
|
||||||
|
ansible.builtin.script:
|
||||||
|
cmd: "files/yandex-docker-registry-auth.sh"
|
||||||
|
|
||||||
|
- name: "Deploy service"
|
||||||
|
when: transcriber_image is defined
|
||||||
|
block:
|
||||||
|
# - name: "Check is web service image passed"
|
||||||
|
# ansible.builtin.assert:
|
||||||
|
# that:
|
||||||
|
# - "transcriber_image is defined"
|
||||||
|
# fail_msg: 'You must pass variable "transcriber_image"'
|
||||||
|
|
||||||
|
- name: "Create full image name with container registry"
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
registry_transcriber_image: "{{ (docker_registry_prefix, transcriber_image) | path_join }}"
|
||||||
|
|
||||||
|
- name: "Push web service image to remote registry"
|
||||||
|
community.docker.docker_image:
|
||||||
|
state: present
|
||||||
|
source: local
|
||||||
|
name: "{{ transcriber_image }}"
|
||||||
|
repository: "{{ registry_transcriber_image }}"
|
||||||
|
push: true
|
||||||
|
delegate_to: 127.0.0.1
|
||||||
|
|
||||||
|
- name: "Copy docker compose file"
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "./files/{{ app_name }}/docker-compose.yml.j2"
|
||||||
|
dest: "{{ base_dir }}/docker-compose.yml"
|
||||||
|
owner: "{{ app_user }}"
|
||||||
|
group: "{{ app_user }}"
|
||||||
|
mode: "0640"
|
||||||
|
|
||||||
|
- name: "Run application with docker compose"
|
||||||
|
community.docker.docker_compose_v2:
|
||||||
|
project_src: "{{ base_dir }}"
|
||||||
|
state: "present"
|
||||||
|
remove_orphans: true
|
55
roles/secrets/README.md
Normal file
55
roles/secrets/README.md
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# Secrets Role
|
||||||
|
|
||||||
|
Ansible роль для сохранения секретов на удаленной машине.
|
||||||
|
|
||||||
|
## Описание
|
||||||
|
|
||||||
|
Роль позволяет безопасно сохранять секреты на удаленной машине в виде файлов с ограниченными правами доступа. Поддерживает сохранение переменных как файлов и копирование существующих файлов.
|
||||||
|
|
||||||
|
## Параметры
|
||||||
|
|
||||||
|
### Обязательные параметры
|
||||||
|
|
||||||
|
- `secrets_dest` - директория, куда будут сохранены секреты в виде файлов
|
||||||
|
- `secrets_user` - имя пользователя, который будет владеть директорией и файлами
|
||||||
|
- `secrets_group` - группа, которая будет владеть директорией и файлами (по умолчанию равна `secrets_user`)
|
||||||
|
|
||||||
|
### Опциональные параметры
|
||||||
|
|
||||||
|
- `secrets_vars` - список переменных, из которых будут извлечены секреты (по умолчанию: `[]`)
|
||||||
|
- `secrets_files` - список файлов, которые будут скопированы "как есть" (по умолчанию: `[]`)
|
||||||
|
- `secrets_dir_mode` - права доступа для директории (по умолчанию: `0750`)
|
||||||
|
- `secrets_file_mode` - права доступа для файлов с секретами (по умолчанию: `0400`)
|
||||||
|
|
||||||
|
## Функциональность
|
||||||
|
|
||||||
|
1. Создает директорию `secrets_dest` если она не существует
|
||||||
|
2. Сохраняет каждую переменную из `secrets_vars` как файл с таким же именем
|
||||||
|
3. Копирует файлы из `secrets_files` в директорию назначения
|
||||||
|
4. Устанавливает права доступа `0400` для всех файлов с секретами
|
||||||
|
5. Назначает указанного пользователя и группу владельцами директории и файлов
|
||||||
|
|
||||||
|
## Пример использования
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Save application secrets
|
||||||
|
include_role:
|
||||||
|
name: secrets
|
||||||
|
vars:
|
||||||
|
secrets_dest: /opt/myapp/secrets
|
||||||
|
secrets_user: myapp
|
||||||
|
secrets_group: myapp
|
||||||
|
secrets_vars:
|
||||||
|
- database_password
|
||||||
|
- api_key
|
||||||
|
- jwt_secret
|
||||||
|
secrets_files:
|
||||||
|
- /path/to/ssl/certificate.pem
|
||||||
|
- /path/to/ssl/private.key
|
||||||
|
```
|
||||||
|
|
||||||
|
## Безопасность
|
||||||
|
|
||||||
|
- Все файлы с секретами создаются с правами `0400` (только чтение для владельца)
|
||||||
|
- Директория создается с правами `0750` (полный доступ для владельца, чтение и выполнение для группы)
|
||||||
|
- Используется `no_log: true` для предотвращения вывода секретов в логи Ansible
|
9
roles/secrets/defaults/main.yml
Normal file
9
roles/secrets/defaults/main.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# Default variables for secrets role
|
||||||
|
secrets_dest: ""
|
||||||
|
secrets_user: ""
|
||||||
|
secrets_group: "{{ secrets_user }}"
|
||||||
|
secrets_vars: []
|
||||||
|
secrets_files: []
|
||||||
|
secrets_dir_mode: "0750"
|
||||||
|
secrets_file_mode: "0400"
|
22
roles/secrets/meta/main.yml
Normal file
22
roles/secrets/meta/main.yml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
galaxy_info:
|
||||||
|
author: 'Anton Vakhrushev'
|
||||||
|
description: Ansible role for saving secrets on remote machine
|
||||||
|
license: MIT
|
||||||
|
min_ansible_version: '2.9'
|
||||||
|
platforms:
|
||||||
|
- name: Ubuntu
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
- name: Debian
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
- name: EL
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
galaxy_tags:
|
||||||
|
- secrets
|
||||||
|
- security
|
||||||
|
- files
|
||||||
|
|
||||||
|
dependencies: []
|
46
roles/secrets/tasks/main.yml
Normal file
46
roles/secrets/tasks/main.yml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
---
|
||||||
|
# tasks file for secrets role
|
||||||
|
|
||||||
|
- name: "Validate secrets_dest parameter"
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: "secrets_dest is required but not defined"
|
||||||
|
when: secrets_dest is not defined or secrets_dest == ""
|
||||||
|
|
||||||
|
- name: "Validate secrets_user parameter"
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: "secrets_user is required but not defined"
|
||||||
|
when: secrets_user is not defined or secrets_user == ""
|
||||||
|
|
||||||
|
- name: "Validate secrets_group parameter"
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: "secrets_group is required but not defined"
|
||||||
|
when: secrets_group is not defined or secrets_group == ""
|
||||||
|
|
||||||
|
- name: "Create secrets destination directory"
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ secrets_dest }}"
|
||||||
|
state: directory
|
||||||
|
owner: "{{ secrets_user }}"
|
||||||
|
group: "{{ secrets_group }}"
|
||||||
|
mode: "{{ secrets_dir_mode }}"
|
||||||
|
|
||||||
|
- name: "Save variables as secret files"
|
||||||
|
ansible.builtin.copy:
|
||||||
|
content: "{{ lookup('vars', item) }}"
|
||||||
|
dest: "{{ secrets_dest }}/{{ item }}"
|
||||||
|
owner: "{{ secrets_user }}"
|
||||||
|
group: "{{ secrets_group }}"
|
||||||
|
mode: "{{ secrets_file_mode }}"
|
||||||
|
loop: "{{ secrets_vars }}"
|
||||||
|
when: secrets_vars | length > 0
|
||||||
|
no_log: true
|
||||||
|
|
||||||
|
- name: "Copy secret files"
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: "{{ secrets_dest }}/{{ item | basename }}"
|
||||||
|
owner: "{{ secrets_user }}"
|
||||||
|
group: "{{ secrets_group }}"
|
||||||
|
mode: "{{ secrets_file_mode }}"
|
||||||
|
loop: "{{ secrets_files }}"
|
||||||
|
when: secrets_files | length > 0
|
278
vars/secrets.yml
278
vars/secrets.yml
@@ -1,138 +1,142 @@
|
|||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
61383134373463613262303063353238633639636230313365313565323234623661396165306532
|
39383739333834626566633766343639323331333132396231613638323463316361393939616532
|
||||||
3833363335613266653961646539663264336661323062330a616466636338313761316536663231
|
3632323939633533313766616630333137393962623433620a343062373935633966643933326263
|
||||||
61636531383163363534663361663965303766666437623033643465653238356564336261303533
|
61316632373262323534636265356664636466643361656365303366616464373734653766373265
|
||||||
6239353836376365330a613537613565373166393232653663353464616665366638366531636436
|
3531356432303735640a343965613833616631653836656561656262656263626363333436383165
|
||||||
33386165363362306338656431343832343165343262356336656564333262633131353663386363
|
39336332303365393562353036633033633064333961323735383239643533323038623739646134
|
||||||
39386239396531646435373231653863623734373331333739333239373462323263316139613331
|
34326465393261323539386438323737653938366333306633613066363738646639323139306337
|
||||||
33353631373930613061333438653130373433643635643463613662666662383437636638646230
|
62333966613033616535363830626661663066303838393366653834346136396339643136363238
|
||||||
39353537316435333466653639363130313332636332636339373466303534373436343665663639
|
38336166373238393364616463633865633431396335343562323731636639343965346365333966
|
||||||
62363339613731626561383237313634663430646232613562393066643638633832373230383461
|
30306335313337616161666535396236373465396239663966616532313731356566653733643239
|
||||||
35616535656666393836653833313330303964373236643034376438653865346238353835326665
|
66366361666134323136626662323932386664386165663236366436376562373431613736343663
|
||||||
38363430303761323665616164333037356239303633333663343364663430323062366533653930
|
35613738616364393138633762316265316236616136626131376332353133353666623330343763
|
||||||
32653966373636333339643236346666643930396130323531636264643534366236613035363566
|
38313731663739346636306435623831313835363866383138633130336638633834616564313232
|
||||||
62303232356334666532383730303636636264646365666536303261633138303962646232646163
|
61626239303162346138346138383131613135393035353435393331623135663734306530343434
|
||||||
39653931356638313031333065636162346136666261656330653434393335366637333666666435
|
35613463356139313034656335303637386666643435306534363637653931616631613932383763
|
||||||
62633462663763393532626661363738666262386366363337353235666338653864623861393535
|
34626331303232323964636631663537623638313538386336336666353262613062393365306161
|
||||||
37616165623130376436653633396430393532613663386632386137343931623266616438336266
|
33663865356533396334656361376464356534313537313739616661353665333532343032303634
|
||||||
64343839646439376237633564333332653837363461363962663164643230306332666639383030
|
61333334393432626366313836663762333965393133313163346338613662316462376438316564
|
||||||
61633635333538636262316330376636646434653964303737626236383537323264383164626139
|
36396632646538663262643135663364373331623730303965326237336132356434653331393932
|
||||||
30333835356133333437646236633335333863376139633562366537336430366361623762646139
|
38623561656263326265323337646430636363653966306234396330636661626566623936343361
|
||||||
35653430306538363963316562383132303537633437336464393062653730303664633164616264
|
34646332313130393439386534663536303932383936623938633835363236303863363032393331
|
||||||
31353663663162383964383134326334643833636238306661373766326137386265643837613533
|
39346335653836366634323736666234653239383730313964373265623036613666363136306433
|
||||||
34343164323463313333343666343932356131663734366564363362623562353964666663333464
|
64653265623731376239616634353262383033663134323861343566306336386263303063303162
|
||||||
32306366643530343734366566343165616537393366663038633865303464323961373064643663
|
65613631643666643134363738346235323632326639333465313239396163386438613136346435
|
||||||
37666363653735313434373137653261626439323961636632643635383336376233316266646364
|
64393636386637306165336235346531313333393631323239393165306535353964646637343464
|
||||||
38623631336432646435643336653963323434353832326566363934376464383563336332633439
|
63326530666365336633393736623863623061346436613362386262343039626438356538333432
|
||||||
65353234303835306163333264393566346130353834303364316136333362343262633431376665
|
63306136383236346166616339643530383331373233663536626535373532643464616235333935
|
||||||
61623539666437623336653363363037613339306533306366356561643465343166653434383564
|
39616562343063613437366238336366376636663137343830653330386635353838343338643735
|
||||||
32636534663663353466333439356132653830643532623433313030663031303963323434386265
|
62613236363337613365633334613732326130343764636663313432636665363936616162316663
|
||||||
38666234663334326664353862666161393439323438376463353638323736643332633861366466
|
62656331316233643437373762396265353537373937623036663661643036333331613363613764
|
||||||
66343563396639353333393034353563396638303730653837306133306263633965663761633334
|
34663963323630613337303061393266643565346464316136356132383864636463313035363565
|
||||||
37306665353635656239386130363435663765376134303336393232313137396365343730353939
|
64306562363338326430366561646132643539353636333563353664656637393664303534613262
|
||||||
30373435666630656666323162636161303037386531303964633934666665343965666261613735
|
33303561343035636136333766303637656232663530646630336236633165373163366533366166
|
||||||
31363835636131633563633131356632383333346138313464656232396664393230653434343838
|
37306165306437373931366530373161646165333336396132656264383638616164396164313362
|
||||||
64363233306663613239373563666366643332623062616136386136616132636266303333643731
|
39356230623737373135643131313264623230353366396266623538623535646566353665343163
|
||||||
33656538383366356535323230656132313733333631353462633537613665623537353831313266
|
65336530636661326234623934663861313131366635366431623266633130393061333466333637
|
||||||
38353032333135393664353232626331666631623135643466636434663137303435376533353235
|
36336330646566346530303961356230383430373438643336376439363036306638626633326266
|
||||||
31336336323864393932366536326262343062313138373234623061303138393134666136633132
|
30323932326537646363353533343865356135366636353037323463303738383739373736353431
|
||||||
38353064303937666335663164323734633735313361313163373431346136343932333165653634
|
34333337313065383561383730383461626238633561353231336639323131326239623566363734
|
||||||
32613239636264383261613033376665666136336664333964373736396366376331323937363737
|
66663836616536646162353836346266616366383664323365373730646537363938643834613239
|
||||||
38613261386564326336613337366630376533363736346634383139653462323332393033663366
|
62333135616264663435626535363534313138613731656466316366313032623433393336666138
|
||||||
63613566313434643036353038303538383761616637323731333563383832636432373431363565
|
32326163613232633433616232666635343964316466306266666665646261373637353464613564
|
||||||
36643633323664363934396331306539353934343936336630626434663566383938353665393766
|
36646162626131346537636531333339666339396666663934656334326432396231633331333465
|
||||||
33656231383331656331323438373136633735346135373437333432323938353163373963393335
|
30333163633464396130333061663865333165633531656662613666336438616639633566383538
|
||||||
38663262633934383261316463633464346639636130653139613035363731633735643537393261
|
63386263346161383430326662353433316664663764643438353434303666343938636237353637
|
||||||
66316336306164396262303136626366363131383165613464393631326431303734303432353764
|
32383335326632666232396332376531643438396332626334306333636662653263636262336362
|
||||||
65653431313261613335636466393036623338633366333330373966613039633936353634313039
|
39313130363235323334323237623631333031626266643137623132623163633039356132316266
|
||||||
36323665333433336436313837643031306265643636656534656238303337623830346332343539
|
38393136363235393833333962663834313138373239656366383265393238343062376531643734
|
||||||
63313336356266666331326366646332313530323539316330336463376666643361656363303634
|
62363833633261333634656364383635346431383564386639323033393265383261653665333238
|
||||||
35393636376531643734313964303634343561636666393131363463303331306332363437663335
|
62336465383265653538393332636336336464643732303234656438393838613537326234616335
|
||||||
36623833633632373831386332626164346137626133386533366263663062393066613462383466
|
62663336316231326639653961353736336331303831316338306439386461636563623363363564
|
||||||
64313031613462343133616334616363636433616135636630313536623666386665386461366632
|
30303937663064353738303762653636336134633262303939346535333531636530386561623738
|
||||||
66663238396539363762666232336639613031353464663930346135373561643532353138363664
|
31313262323663333262613832326538383430653836313438343864626336643538313839666331
|
||||||
30313239316363333366333236653238353336323837653965373761666361353438326439656366
|
66313137303331666434376662646266623963633533613939393565393834353139613032336633
|
||||||
64663839326264363931643235323065393830646566663365663233326632633731623464373430
|
34366333326137306432313838313463643832363462336164353838663231616634626133323962
|
||||||
63373438373638646465613232616237303865393436383436656662333435353130316331353330
|
39663864353166373236356334633039643531383631633431383532386530396161663638326266
|
||||||
32666365623561343234306662653138303761623632383066666439646637646263666132303266
|
36303462336531313964383563346462376164333263643664653639353539376561353037326364
|
||||||
64663861646430613930636135313939646231333464383862346362363739393663663030326562
|
65656431613035386461333731633165346134396436656638656635313761646161343061653134
|
||||||
64313236366636346665653831636234643131343836333862653034613835333537386266393432
|
39663339323566363636656434613735663235323164363638353565613231343464373439313535
|
||||||
31663164663062623337636437643062393832373035373138663862646439643330326462353535
|
61633736623232356166316237363435303036666461313138623632633962326265383262656466
|
||||||
36313233323565356231353934333363663566666563663532396461393033383432373534653063
|
64346637636135643837393637343465303761643063663730303366313937303833613435613662
|
||||||
64616431616462363637333836663861643865333938373639373066356538343635366266346130
|
64306662343464333435646261643239616636666134346161346365326361313966666134653366
|
||||||
38353535383637346131633636633936393466313434363636633138383037636238656266626133
|
34343362653837396264643033383562616235656362323836336362346162333631643437366432
|
||||||
34306134306138653037373434373839393034323166653735613332663765333964386137356166
|
61393731323561306263613764633061643131333564326666613833386561646131656233633135
|
||||||
63626632333465386236656265383865346463656430303835326631306461323064616532636237
|
39356232313565336437396637643432363466313930623661383430623236333364303835653532
|
||||||
35666231386132363533396231363133316239333362363836656663396535333138653665353036
|
65646632623362303437373230656330306531333963393232326337623865323262383938313739
|
||||||
39656235636134626234313835313364306264346433366433633565333239656566623735383239
|
65383364383135366464666536313365643563393633623261623764346238313339663638343735
|
||||||
64653637373737633164656466613666376165373330636439363038373563303635363934663831
|
37393331626230333761376133633335353035386438616566656334306235643436643030303737
|
||||||
64326131303334316334313866313461363733653666343865373835613034653331386166383937
|
32303764636663663662396534396438356639633537356434656335396462336231366530643934
|
||||||
38393763653161346437313134366366323232633339623934653064643065313461343635656532
|
30633831373731623065623631316164613166393134633738663432333936333832653462636565
|
||||||
37663739373163386230306132313163363735363066343933383331386666323364323230653165
|
61366164626666643366626432343335616166623437306262363264623334636539643163383736
|
||||||
35323234643935643762353830393334343562333736383634373638396465643133313336636332
|
34346636343432323534313631373666316666633638316530386638393166343166666236353433
|
||||||
64313533313232366466633730326137353065323535323638663135376231373131306432663531
|
34636331393433393939656265616161316535396536633330366533643135346238386237663337
|
||||||
64653163643630623861393966356533323432393738323863303332346234663736626639316563
|
35393333343338613435393266306665356432376564653439353563376363393561393035353234
|
||||||
39346337333531316666333362366666333361613532396130333537383364376539613362666637
|
37613535343339623334356165383532313331386430333330666132376563326532643339386432
|
||||||
30343434666538626263336462636634353632346234336164613037633661666664396135343833
|
34346633653362626239653133363765303965623233353630313936336333336634316464653565
|
||||||
39653337383161643938656464626238663162323564653636383035646562613132393665373065
|
33346539656538326565323966393566396636326362623839396330336364363366396132636462
|
||||||
38383461383764663864643930313534386235303961346462376630343731316332353532613365
|
32623138626337383533313739663066366562323237666666363836396639666430363232363461
|
||||||
37616431356166393732323435623364323638386136383336393534396565303039393466663132
|
35383963643836633432613036643064666337336166333130393730313661623035616636653166
|
||||||
32346239386365346663633831393463343262376637306533356232646234643266623465376335
|
39393936666436306234633863323562343337386336303337333235316438383430386562346437
|
||||||
64613163653561373462653239356162326336636166323039356561363666333132613161366438
|
30613039376633393065353031313832643339386461373433656136306339306537323434383332
|
||||||
63613834373461636161373836626237376538636230376138633337313664366663666266356665
|
30373935623537633432373637623536653838333239336634376265313437383632653030393761
|
||||||
39353336306265633038646630613664306564306531353866333532346438363238666466323235
|
39323033653632386264343335626330333331653635343061353633643864623062663763643236
|
||||||
61303433313364343661313066316266613831326130663538316366613765383233333431363533
|
32373564366165653538663263323139613533353566386162303336343662663430303030376234
|
||||||
61366565356539663264333534653036316165343735326339333631396266653738623632333136
|
62376532343134643931373436356331383431386435613839633137656566623766653131626132
|
||||||
38326235663463646264353432393839396637336437343764623636666139323137656436633463
|
61346538393335393461346538333866323033303431613965326532343761353133663930333835
|
||||||
61643134643834613235326630656462393162316639326438306534326431396539376133303862
|
63393537343035393339636663383961353838646234626162656563353466393335343764626166
|
||||||
32376132326265633064356135383062366431396562653662323731643263343436363139663466
|
34303731376165353737643131636334353562353735623764666130623263376363393330333733
|
||||||
65303766623932653238396464613330353634663930383433323836633538383636633739636335
|
37323539313263643838613863336464653536396662393730333833633030353834306439616661
|
||||||
31366536633238663331643637356132643333613037353862353161666538396563623966376538
|
61386165333964633765326163306437313161653730636261623463666530396634326461323232
|
||||||
38663366343233323533306665303866653038353233323037636137363037643063626435383362
|
35633635323461636361333065663466626139306464383966303435653731333732343431356463
|
||||||
31333338383061323863303434636161346338343031633937633037663732636264336361643733
|
65653534653762646666333934323564353332333135613066323262393162623463663530353265
|
||||||
33363131616266653837383732626236646438633664663061613833363761363462373730653335
|
61366164616261386430363337623464353933646332626439323435346230393563633330633361
|
||||||
33323563623531643739643937623864633564383661363036643765626365646533346366643038
|
33376632663963633237386136623333623762343233613161633832663536616564363536363363
|
||||||
35376532326439353638343231373765323264303265326664656366353230623065383263626563
|
31353035346236336131643538326663646237646539326563363161313864656332623035363663
|
||||||
65383663643361383663653237393834363662613966356431623735323964373835326638393235
|
33386336613662373266336537663038626666646337313532616464323737343661663338656235
|
||||||
65386238346539326635643164306431636662366565353566633561386330663761626361396537
|
65366465633932396665353965646234653431396630386535366263363263663837643465393564
|
||||||
33623537373063303733623438656130303734313761633063303561393665346362626433653765
|
61653638643662363036353033373963303131613536663837323934313131343438386163626461
|
||||||
36613536376562383532646635323334383032373539326662383030313139356435393235613035
|
61383065313637396361333738663130316137656237306237636637326432646437663232396632
|
||||||
36613434636638333161383135623238333836353535323764313633653664336264396538656561
|
66626664663231343135333964623234343037393366396465353865393532666130643437653334
|
||||||
31366664353233363164323064303866633630373034353730343637373633383764373933346630
|
33613135356637383239303931396638393163643633653662323333363066333735336466613834
|
||||||
32383065616235386336616132336466613437643230333038643635653032366639303865343435
|
63626136333865666130336361333465633361353032336430386263323461633634306461316136
|
||||||
30333234323461326131383866323565373364303361363364363033636336303061633761313637
|
62386263383936316534313436646266663731666265643235643538336564313632663466323037
|
||||||
37323464663566643537653962383533366537323362653230666636316637316362613036656630
|
32333262326539376139653166633362633765333830613134393032383161343236613639356161
|
||||||
33396634653934313638656663323131663764623135306663643862353364393165323462306630
|
34653336363739313661386331313030323331623162333837326237656137636138303439326537
|
||||||
34626635393436636334383265363539653835383065363664613030336163333434656363333861
|
61366266316339306237373732636564616135376361373964373962656365393532366133663333
|
||||||
31366165383234666235336637336365666438363864643535666631316231366430323265336436
|
64376565613563386134373035643266346664626537363932636532613631313861353433663537
|
||||||
39363162393464643562396464663937353230633938666333333563313335306638346564393532
|
35363764363361303564643330383063303637393265623138343961373261636131356231303630
|
||||||
34336566383961366663353431353963373163613338306663376363393565623965636336383264
|
33643338376562343738663136643533663530343339383834633864393234613739633730306164
|
||||||
38636430376265306162333464346437333639343131616366343938633765663962326461626433
|
65636535346562643939316339616537363238376266643331303564316235663866343539336638
|
||||||
66623961346235383134303739653064366363393635316564373033333031653439346230393733
|
64636564626665326635656132353531633864343964633936396465313032663262373139643735
|
||||||
33346564363132323165653331303436633533666566633439343738323062666166646639626361
|
39653232326130393461346331323336323163646661623333663830346535646164396364383463
|
||||||
37316335376266623437616331663630323630306532343264646262646539353766633235666163
|
35333563383536306635666232653438373961626563663332363238666433303033376365396337
|
||||||
31336434623536316366313831343466396233386139376465333861303630373933343564653838
|
30326639356265363630646134376335636136633536366539666430343834653031303139343164
|
||||||
39323063653161373038363664323462333561633361653362323335303033393961626161396164
|
31666130663363373537613964393338633131383266346131623662346134353033323135313632
|
||||||
64613633643131366233353131663730643765643037613931316564663133336265393537313932
|
37336630643534393663353535386134663666383762313230356537653834333463353661616134
|
||||||
30343938383961326132326361383738323831323763376237323631303138623838333365383134
|
37613637636364316263663464363530373463363661333037653465383139303736376166333430
|
||||||
61396563366537366135643061376233323363323064636566396130616663333130633365663466
|
32653533313262366165353163666161336564633435333765366536356662313661333866643962
|
||||||
63623635316664373864346464303765616230343462333265353766303538656530383535386266
|
66396538386237636631363633643634326665306539663835393465646532646535386332313761
|
||||||
39393663333834333639343332376666373130393130643339366262633366353136356266663637
|
30323232353535393936306162626665333161353836313031383533656632346163343636616235
|
||||||
35613630373236613534383733636233626164383033616530313133333039333764366265633166
|
62663233666361623563643638663730346165323065356335306335343565626161663164613637
|
||||||
32653137393132376531333237646431346262616361353965633361386162356338346537613531
|
37653430323937323535646236336464663832663334383361376634396236666662376661613132
|
||||||
33313831336636306239313838646265303630636635343861646334386237373237663165643135
|
65316638636330643131313962373766353236306136393335393435303234303863356136353666
|
||||||
33343634393164386130386239393566316130623435656364393430393132353664376434376536
|
39613266383465363766313230663038333135663632303033616462636235383561376166643433
|
||||||
66393037636232303839383032633939326235663638356136656563666531343665623935383963
|
38633934613436343034663432313236396333336237326536346434313662643830383734643435
|
||||||
38333838336466663234346134373330303166303233323534656638326635663031303638353564
|
62383764643964353831663839363032333961613535626136333834613661306635663262323835
|
||||||
32333464393264373135333438373732663238326539633334313562323164303134393466633631
|
30623232373037313666323534346330306265383561646666616432623930353432363936393564
|
||||||
33663431373631346337353838363365633166656337366634343563386532623739353862363538
|
30643435376531666234626439373561646561316265363466363632666338353536666361313936
|
||||||
34306637663130373835323137326436653462353035373430333730363666663665623431353361
|
62613630316630343537623437333832623563376463646662636562333336623539653031636565
|
||||||
31323032376136373531316130623632303137353734393333626663323537633131653835653333
|
64393535643562323362343534353563383030343439666539323038663837613065303762626366
|
||||||
64623439663461383132616432323861313666336336323466396436623732353136623531373339
|
37376433376438656531396364353532353530663333343332633437656465353864313366646231
|
||||||
33323735613865663164643039356136643165313332323165626262626437323832626565353133
|
62323033313834313264663662326363376136336237656332313230373537663836643333623262
|
||||||
31343936616265323533306239626431333337656439613062646234313939653438396461643063
|
63653063656639663963643737643037363231626361616530323763623739366164393863373630
|
||||||
33373565333264643339626237383039346532306665303263626533356163343561636135383137
|
31643230316162356431336435376138303631623065626261366330396363633265383839633931
|
||||||
38663533363265663661613338646639373861663934303762653933616464376635306539636361
|
39313538663237353730346462343438643234376165333634663232636464643561346139356539
|
||||||
30323662376439633363643537333535326462316661306266333435613437313330623938373539
|
63376466643833353032333230356439336234343866323639356533626465353538633363633361
|
||||||
31376331616661336330643833663462643136336236343139373030663930316332343537653737
|
38383339366665366339653632373162363838366536343935316366303464623065376632646334
|
||||||
65663039373333623534363966306432626439643735366164646563646263323130
|
63646539643832363865383534326662626132643232353735396237373731303865353538396432
|
||||||
|
36376434323163346536353563386662356266306231323831353361383161633239643736313135
|
||||||
|
37383362636339643737326562393433323633356137656563643838313432386337343266386230
|
||||||
|
63636538633935323130663338653566326334613735393932303939316134326636346663613666
|
||||||
|
3338
|
||||||
|
Reference in New Issue
Block a user