diff --git a/.drone.yml b/.drone.yml index 0192f10..ae208cd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,11 +3,17 @@ name: default type: docker steps: -- name: check syntax ansible +- name: deploy image: v4l3n71n/covas:latest pull: if-not-exists commands: + - eval $(ssh-agent -s) + - id -u ansible + - sshpass -p 50ford5080850 ssh-add ssh_keys/id_rsa_nas + - sshpass -p 23v4l3n71n02cz3ry841993 ssh-add ssh_keys/id_rsa_vps - ansible-playbook -i inventory --syntax-check playbook.yml + - ansible --ask-vault-password -i inventory -m ping playbook.yml + image_pull_secrets: - dockerconfig diff --git a/Dockerfile b/Dockerfile index c3a7672..de6051d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM debian:bookworm-slim -RUN apt-get update --yes && apt-get upgrade --yes && apt-get install --yes python3 python3-pip && rm -rf /var/lib/apt/lists/* +RUN apt-get update --yes && apt-get upgrade --yes && apt-get install --yes python3 python3-pip openssh-client sshpass && rm -rf /var/lib/apt/lists/* RUN groupadd -r ansible && useradd -m -r -g ansible ansible USER ansible RUN pip install ansible WORKDIR /home/ansible ENV PATH="${PATH}:/home/ansible/.local/bin" -COPY . /home/ansible -RUN ansible-galaxy install -vvvv -r requirements.yml +COPY --chown=ansible:ansible . /home/ansible +RUN ansible-galaxy install -vvvv -r requirements.yml diff --git a/inventory/group_vars/db_vault b/inventory/group_vars/db_vault index f116bdf..cdfd027 100644 --- a/inventory/group_vars/db_vault +++ b/inventory/group_vars/db_vault @@ -1,15 +1,15 @@ $ANSIBLE_VAULT;1.1;AES256 -39326362343932646638333238366563643865333035666231336238353131643433313237373031 -3732373733343264303039653534306461623661333266630a373363646661393764323139366266 -39326432626434343230613334386266613030313862623436623335343734343565393831376263 -3131346166303836310a663066643333613866303538653066336366353966656662333332646639 -33373134366662323632613465316465326530363662326437633630306164393438303137663730 -37333065633230663862306364356161323131653662633339353361383437346339346262383139 -64363634333364363666373636373037386265383063393938356466623237313966633538336138 -61346639313535323730323834373230373733396661386163643531356465343532323266306335 -38656232626432323737663030613130323536396266623332326130396463333434633363383139 -37636630623263383933353066333736346162376162336239376530316533663936363062616131 -30636437353963633138353838626532646238363935343764623530613139393564643464653538 -61373964373063633331653131363663333230663239633764636333363435646433643637323664 -66666336386464663231393836613862613935373465303331353563656361386363316438393662 -3530383833303736656536363238626465663330396430636332 +31393434663833363061653862663138393835663538346465383065323231616163343964303966 +3437316337383464323933306632393766386234366133360a313466356333343939396134333430 +38376636663234666534666637663638633766623034323164393234656365613437643738393833 +3466616536353935340a366165346464343863613133373739366534373835396436343138326532 +37376261383631366531333061353133643432623164633335373037393732366132346438326163 +32386639396661626431616463383165393035396139333336316263636236323130656534636237 +36636536613064393632343564343734626666323037303630623764316338346161373134656165 +64666133663364633064323763303964663964393139646663306334353435633839383164313734 +61373731356331336265663835346234323934656236646363663562396131336161663662393634 +65383761363763326366313063333337633039383830663066663261393464646437663366366565 +39366661653934626337656336306435363263373534323239353831343231303134613338623236 +63306464393031666666613530326138646535613534303365323965323466366131343236663030 +37323032656136383661333331363635643234333138626239383733336135333637353930316338 +6537303238333962313362376434383038666133376134383132 diff --git a/inventory/group_vars/drone_vault b/inventory/group_vars/drone_vault index 95a82d0..53788b3 100644 --- a/inventory/group_vars/drone_vault +++ b/inventory/group_vars/drone_vault @@ -1,18 +1,18 @@ $ANSIBLE_VAULT;1.1;AES256 -33363236363632653263383164663339323738366635613164353231396462303361333135623330 -3564623639306161626331643662366339663465313132370a636136316366353434353035346138 -32393263626430326234626235666137306262666134656232316465626563633535373732643838 -3861303734656165630a646433623162393563303862393661303434356234643638303030646432 -33386130626163653965353732313164373239303366626433393566343638343362633234313339 -63323532613733353538303038663632623932366238343132356536396165636137633036313533 -62396134303862623733323639633134323838366164363937626138386265643465356464366565 -34303438383838656632383462366162663538353430646165643339383261643063373431383364 -38646239613465356337306636306639336164623761666165616663626635343130653230656162 -65396561343638366532313062363066663838346337356463316331336133336234653334613830 -66326337633038623036613430316662316432613962303337663430643531653665633264343564 -39383564633432643039306236613633643236646163353831346632653764633436336237346433 -33306136346235386465356630386333646366663037386230306261346161303938633032373361 -63306431306439373037343663616263373037386235303665643635336430346139653165636634 -63323634306333663030383431363437383966633461333432393636613863306134386162326664 -36376361343738653531623137326266663635633633323239633263383761616538656535343039 -6435 +38303932316262306464333166316363643239366561323234643563623362336335613237376239 +3535393466323064333163363932663731663031663933350a323431653239396663343666373765 +31373066383234303139663135326462613539626363373930346366383831646536316465373563 +3537653761373233300a383637623932616663393763643066326238633932643730336339336330 +38366430336561613866373634313130616438313234666431396638366161613839303864353561 +35613234326539383765666637323236303161623061633164646430663834393764623931656638 +63336533383065343738373564393266653738656163643165383434623836666434646337336565 +32373261636363396363343236353336306331313761623531653834346536353039656564316138 +66643166653435666162383333366233353165393837303539646538353765653465363532346231 +65633365353131613437623663313934626461313437373730623164636364393362366537373162 +62363965323662356638633661363236326437353366356134346333313466323139336362363234 +62376262346338643339363566303339366165636566623565363238363736646637646635303531 +38343031666635323539353431316164353830363838313662613063616532623730346561333665 +33316137613666636439383364353735653535346537383831323333646238356534393935643435 +31643637323366616230633039336633313631316330323064306638663039393330376366633930 +65643861363231313033333662396339636432343133336561356438636233643762313539323166 +6261 diff --git a/inventory/group_vars/nas_vault b/inventory/group_vars/nas_vault index b244e8f..7c00dd6 100644 --- a/inventory/group_vars/nas_vault +++ b/inventory/group_vars/nas_vault @@ -1,6 +1,7 @@ $ANSIBLE_VAULT;1.1;AES256 -32373966623936633630666638373762306130326162383539633032616330323831643063613465 -6633346330663030353837306235353133356161633236660a666230326236316537363130353733 -61373037313536373364613731386137643931303365373737613433653835386533653638393037 -3134666533313136330a626331313231613163323162663436653261623762656632373434383566 -34353930626630643762303530363665636161316163313031366238373362376461 +61643965343735653231363764646132363434653530346532343765663036376434353334356330 +6133383634643439353338383039653234303666306661350a636366343465356639646535663234 +31356434363130663961653638363463333330346561333933643263643362343132376131313764 +3439663335386235610a396435303138666166383363303038663163393538323362313965613933 +65666338653533386234336365316664313266326130313064653864386235323461303938386333 +3239646561363831643530633466613035643630363761326666 diff --git a/ssh_keys/id_rsa_nas b/ssh_keys/id_rsa_nas new file mode 100644 index 0000000..45a76d7 --- /dev/null +++ b/ssh_keys/id_rsa_nas @@ -0,0 +1,39 @@ +-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABAz/c/bbL +5ipVhOVyLRLSqfAAAAEAAAAAEAAAGXAAAAB3NzaC1yc2EAAAADAQABAAABgQCs0lhIY1pR +wQ305Qp6Fju+/KMbK9p3bN1Fn0/Bomx+Tvhy47XPEIS0gRltTxJIvSqQYEfIJ8XJEl30gd +/y53/3URGjVsBFaJ/OxW39TuEFjLmSJfCVt3RSbkryPGynGPWIZgSI5Pkgbj70raFwdIP1 +fYdILuC5SZLBeHMGckxywzSqu2xZhC8HtlV0pd+EhQgGQBWC4/SovorvK1P67WHT6Ki2Fp +d6nxuIIuFXZoS0O13gKgLJYIugVSXKEdNtZweU4eW3dxIKnRgFW71hMCToAuoA7+A7hqo9 +PMn/Es6fbt5qeEZs+XWjLSifG3URtJ7pUf6f3L6aHBkHrBjxNZbhPEKC8IsR9thhx8UzaN +VNXwg/EQwQTUDtxyCwp0mdp6gSr8FqBhMfsSiMuRAD4+vgjS5kvkTlKYXmEIvVyf3vYnSg +KzRTq5ZDj69NZK7zfLBuNgb5mSPT72P3Q6f+TBmURiVkH38nD09K6uIQdSZyN5M37jXA+j +tHWuhIhCP5C9sAAAWg3ur7btsUL67GdyUZukS9eL4RAwXYbXASUGGekQUdenPC+f5ebHqy +BS+VTcU59i17r7WnbAwYJRxNbBcYBvl+w7hJRE6rX9vjmjP+dZZOJNYi3JrhjQxCvJGpG8 +XTwQynl7LswKGwqRJxFo5dI2jwCpAN8vSrfmV67lSvZtOop+BQwcmroUIcGhg+tal0HICb +OP9evvVr50OU3fvsByHgTAZpbGoPQFdYgvw9oHFSpNmfX6s4m+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dvXuoW4 +bKXvswHZIrNhzXZHH5FbB0lhwK8JUxA8uFk3gjcus9Z2AIotoK6tXSgRhddsdlLww0xcdG +HyjRUHsUI7v/TmZXAM8MOBg/f9S7jgom4eQsf9+s9KHBO+UPUA5K/DnctxIotto4Eo9Fex +yuQ/VVm9DeywNF3/Ht80zcplAzxenJrOd+YirABDbnaEYkaYB++qIiL4Rm/rjsek6bYaf9 +Pzok4IMej1l1f1U7GxkuHJQjnPWFMjFJw/IeZhjI5J5Xa+Wnmk+9FIp+uUDZJpF+txBmXv +7Iqvcle6myyh2uUt4mMNav2xaHpio8uZzv1s6PbaX09gCWgSqGYMcnr8S4NBZ94mw0xP6y +AxSWmMmCOiYy9jafNLm+DqHlg7YMpmMPPjJq7X5waLHNvHLIsmiZkAwih4L+5RxM80HQT0 +nhK9BTcBJx/M/4nAIZ5FJqxu8JonvWB6uQlPSWZCgIoLrjO5ptWAVTtMmWttX94CkxfImn +Fmff3jfLj+e6mOhw3Fgd6xCeNHUyrG2avxWvrBXM2Hq8ZBSXybc753b/diMbvqmNl7xL4j +rk2f+UgcUTCY8Q8a9IapYoSS6GXcoivBP360jh5kq+v0JmWr +-----END OPENSSH PRIVATE KEY----- diff --git a/ssh_keys/id_rsa_vps b/ssh_keys/id_rsa_vps new file mode 100644 index 0000000..fe9158b --- /dev/null +++ b/ssh_keys/id_rsa_vps @@ -0,0 +1,50 @@ +-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABDkl1zLiR +3XFK57SZoMY54eAAAAEAAAAAEAAAIXAAAAB3NzaC1yc2EAAAADAQABAAACAQDIEud5oeU0 +A7Iy3aFOd3p3jIgtK8Suif8P7hBEHQ9VFnr6GsZ/0+ws1QMY2H8JC1NXEfpXzreXNmWE2n +W/NjmRJsp4/wNiNDmvVJqo632IrB4hOMwU7O4f9IVBe9zfSqS8HwXWRsf+iYGKOCEBnPUB +61WN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