From 26cb43e07c64ddfeb34aa92ad161542365f816d2 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Sun, 12 Feb 2023 15:58:26 +0100 Subject: [PATCH] reformat: Apply new formatting to all files --- main.yaml | 7 +-- ping.yaml | 1 + setup.yaml | 4 +- vars/databases.yml | 121 +++++++++++++++++++++---------------------- vars/environment.yml | 8 +-- vars/services.yml | 73 +++++++++++++------------- 6 files changed, 108 insertions(+), 106 deletions(-) diff --git a/main.yaml b/main.yaml index b39f90f..1bd00c4 100644 --- a/main.yaml +++ b/main.yaml @@ -1,9 +1,10 @@ --- - hosts: all become: yes - -- name: Setup server + name: Setup server import_playbook: setup.yaml -- name: Deploy services +- hosts: all + become: yes + name: Deploy services import_playbook: deploy.yaml diff --git a/ping.yaml b/ping.yaml index 510e388..549fca9 100644 --- a/ping.yaml +++ b/ping.yaml @@ -1,3 +1,4 @@ +--- - hosts: - all tasks: diff --git a/setup.yaml b/setup.yaml index 8367b28..1f5418b 100644 --- a/setup.yaml +++ b/setup.yaml @@ -18,9 +18,9 @@ user: user: "{{ ansible_user }}" groups: docker - append: yes + append: true - name: "Add acl package" - apt: + apt: name: acl state: present diff --git a/vars/databases.yml b/vars/databases.yml index fdc6fbd..27fe78f 100644 --- a/vars/databases.yml +++ b/vars/databases.yml @@ -1,11 +1,11 @@ mysql_root_password: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 63373634623230333965653830623535363363363930666331303933303061333135373163366434 - 6263633764613336356130343562333635623731346636650a613063323833363038356566306633 - 33376461626236663765323234613966613036616635646362316230313162333838326263393563 - 3134373663326635650a303837303133353830366236346536333238366664633131613437346363 - 30316362393664316261363834633464303632323461626463636263626236346566323165323738 - 3036323064333065663430316362363630313065613437343938 + $ANSIBLE_VAULT;1.1;AES256 + 63373634623230333965653830623535363363363930666331303933303061333135373163366434 + 6263633764613336356130343562333635623731346636650a613063323833363038356566306633 + 33376461626236663765323234613966613036616635646362316230313162333838326263393563 + 3134373663326635650a303837303133353830366236346536333238366664633131613437346363 + 30316362393664316261363834633464303632323461626463636263626236346566323165323738 + 3036323064333065663430316362363630313065613437343938 mysql_databases: - name: gitea @@ -19,77 +19,76 @@ mysql_databases: mysql_users: - name: gitea priv: gitea.*:ALL - host: '172.%' + host: "172.%" password: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 30636438636462653666616466313837303063666463656462383737326662636231393933353735 - 3262636431363230323834313637626136396362656564350a643732306466643536323937353531 - 62643935653066373330633732623162376431356535663766393435636336343561373861653534 - 6565323737646632610a383561386133303963613333656532623636363039336265356334373230 - 35356139353564373630363838393166316339616434306461396238626361653638 + $ANSIBLE_VAULT;1.1;AES256 + 30636438636462653666616466313837303063666463656462383737326662636231393933353735 + 3262636431363230323834313637626136396362656564350a643732306466643536323937353531 + 62643935653066373330633732623162376431356535663766393435636336343561373861653534 + 6565323737646632610a383561386133303963613333656532623636363039336265356334373230 + 35356139353564373630363838393166316339616434306461396238626361653638 - name: keylighter priv: keylighter.*:ALL - host: '172.%' - password: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 63656537653463313639373130666537373365393866623031616265643762353739643965326132 - 3764653563333266616132393335613335363361633531660a373730363362666230363836393266 - 62346536356636653664306131643636303164356531656139616463363337343866386135616135 - 3765393631656264660a346264613933663136636464666430633062623438386561363137383538 - 36613162336666323933333833643838373465333764643134663631333631383231 + host: "172.%" + password: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 63656537653463313639373130666537373365393866623031616265643762353739643965326132 + 3764653563333266616132393335613335363361633531660a373730363362666230363836393266 + 62346536356636653664306131643636303164356531656139616463363337343866386135616135 + 3765393631656264660a346264613933663136636464666430633062623438386561363137383538 + 36613162336666323933333833643838373465333764643134663631333631383231 - name: shitcode priv: shitcode.*:ALL - host: '172.%' + host: "172.%" password: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 39306237636162363632396565633635373166333732333139343036666434303938613038646665 - 3839373166306433643232323535636239333730613566310a326239393635326635623830343732 - 61613137616236303230626639666334326466333931613430613166333161646536313661343738 - 3732386638376330350a353334383464313866613738646566636665396566623062373564323933 - 65396634613136306630643964386637653936346236386333323262363430303261 + $ANSIBLE_VAULT;1.1;AES256 + 39306237636162363632396565633635373166333732333139343036666434303938613038646665 + 3839373166306433643232323535636239333730613566310a326239393635326635623830343732 + 61613137616236303230626639666334326466333931613430613166333161646536313661343738 + 3732386638376330350a353334383464313866613738646566636665396566623062373564323933 + 65396634613136306630643964386637653936346236386333323262363430303261 - name: wipe-stg priv: wipe-stg.*:ALL - host: '172.%' + host: "172.%" password: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 32316135383561636662333363393635373537616138306538616335393032303962333031346137 - 3861633263343130663037636130346535653330313039310a353634346538383561363338626334 - 65376538643837303330343437626335636134363761393063313561633539616531613065656436 - 3435386439313732320a333932626435613733306239346131646564613037373265316234346563 - 35343734393636633030633233323465613634623733376135656232393235333762646239613361 - 3863336164663865636633396361353133353238313262313934 + $ANSIBLE_VAULT;1.1;AES256 + 32316135383561636662333363393635373537616138306538616335393032303962333031346137 + 3861633263343130663037636130346535653330313039310a353634346538383561363338626334 + 65376538643837303330343437626335636134363761393063313561633539616531613065656436 + 3435386439313732320a333932626435613733306239346131646564613037373265316234346563 + 35343734393636633030633233323465613634623733376135656232393235333762646239613361 + 3863336164663865636633396361353133353238313262313934 - name: wipe priv: wipe.*:ALL - host: '172.%' + host: "172.%" password: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 63313762333536383933373232616461356632373963666438333339626434303661313131383061 - 6461316637326634393862626632316139656133353833360a383466303763663135383536376539 - 65373333353830613433663533633265303965356234396136326631626239646533383761326135 - 3365633834336464340a616133656265663039353236666565316431383631656435303166393538 - 63323630626239396263626536306632356635373535366335666265396630353430 + $ANSIBLE_VAULT;1.1;AES256 + 63313762333536383933373232616461356632373963666438333339626434303661313131383061 + 6461316637326634393862626632316139656133353833360a383466303763663135383536376539 + 65373333353830613433663533633265303965356234396136326631626239646533383761326135 + 3365633834336464340a616133656265663039353236666565316431383631656435303166393538 + 63323630626239396263626536306632356635373535366335666265396630353430 - name: cojedzie-next priv: cojedzie-next.*:ALL - host: '172.%' + host: "172.%" password: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 35346533366533313962656662613965626139646164656536616361353137386137353962616137 - 3639333138656330326431643362363737656536376661350a343430386361653732333932393265 - 65363865616465623965643564376330316437653665646332353663613038343765316663313837 - 3662646135666461310a353561383261313130623132636366363264393639613963386162613330 - 31303239636231636633366530333530643063303434623763363731616635663639636135316666 - 3737323335303065376633356238303961323331396666366636 + $ANSIBLE_VAULT;1.1;AES256 + 35346533366533313962656662613965626139646164656536616361353137386137353962616137 + 3639333138656330326431643362363737656536376661350a343430386361653732333932393265 + 65363865616465623965643564376330316437653665646332353663613038343765316663313837 + 3662646135666461310a353561383261313130623132636366363264393639613963386162613330 + 31303239636231636633366530333530643063303434623763363731616635663639636135316666 + 3737323335303065376633356238303961323331396666366636 - name: cojedzie priv: cojedzie.*:ALL - host: '172.%' + host: "172.%" password: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 35346533366533313962656662613965626139646164656536616361353137386137353962616137 - 3639333138656330326431643362363737656536376661350a343430386361653732333932393265 - 65363865616465623965643564376330316437653665646332353663613038343765316663313837 - 3662646135666461310a353561383261313130623132636366363264393639613963386162613330 - 31303239636231636633366530333530643063303434623763363731616635663639636135316666 - 3737323335303065376633356238303961323331396666366636 - + $ANSIBLE_VAULT;1.1;AES256 + 35346533366533313962656662613965626139646164656536616361353137386137353962616137 + 3639333138656330326431643362363737656536376661350a343430386361653732333932393265 + 65363865616465623965643564376330316437653665646332353663613038343765316663313837 + 3662646135666461310a353561383261313130623132636366363264393639613963386162613330 + 31303239636231636633366530333530643063303434623763363731616635663639636135316666 + 3737323335303065376633356238303961323331396666366636 mysql_user_passwords: "{{ mysql_users|items2dict(key_name='name', value_name='password') }}" diff --git a/vars/environment.yml b/vars/environment.yml index bebd328..22548a0 100644 --- a/vars/environment.yml +++ b/vars/environment.yml @@ -6,12 +6,12 @@ pip_install_packages: - pyyaml - passlib - bcrypt -ansible_python_interpreter: /usr/bin/python3 +ansible_python_interpreter: /usr/bin/python3 pip_package: python3-pip pip_executable: pip3 swarm_global_networks: - - name: traefik + - name: traefik swarm_host_address: "{{ ansible_docker0.ipv4.address }}" swarm_registry_user: name: docker-swarm @@ -24,5 +24,5 @@ swarm_registry_user: 65353438613864373962636463613836313034633963613834393233376136313861303538346265 6139666332373137303962646530353364333732353339313262 swarm_global_secrets: - - name: dockerregistryauth - data: "{{ lookup('ansible.builtin.template', 'templates/dockerregistryauth.json.j2', convert_data=False)|string }}" + - name: dockerregistryauth + data: "{{ lookup('ansible.builtin.template', 'templates/dockerregistryauth.json.j2', convert_data=False)|string }}" diff --git a/vars/services.yml b/vars/services.yml index 3079792..c6fd079 100644 --- a/vars/services.yml +++ b/vars/services.yml @@ -19,37 +19,37 @@ service_config: traefik: ovh_endpoint: ovh-eu ovh_application_key: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 36316437333734643766303734613564306539363531323832623032343233303739303135633563 - 3263613130636262386463323836353238656164306462660a616533366165313437636331303766 - 33383963393464313032303336343761306436316163346630306262363762613831373838663837 - 6363373339316534640a333766373162343864613730376563303361656138323262306339613530 - 34653466333161353433326632323731306565643930383962653233346162343362 + $ANSIBLE_VAULT;1.1;AES256 + 36316437333734643766303734613564306539363531323832623032343233303739303135633563 + 3263613130636262386463323836353238656164306462660a616533366165313437636331303766 + 33383963393464313032303336343761306436316163346630306262363762613831373838663837 + 6363373339316534640a333766373162343864613730376563303361656138323262306339613530 + 34653466333161353433326632323731306565643930383962653233346162343362 ovh_application_secret: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 37363635656333343863393435343031306630373038663561303038383136616138363538333636 - 6438353634323266356233633034613263653435386262300a393962656564366432643932373264 - 36656161353730376636646233363662376636383461656434306339646339643865626162646435 - 3835623031326137320a653962383531663532663436316264313035356237623466663262643735 - 66646465646531643638653165316531336430356266393631353439633236323733656463643935 - 6436623435613135313862643962663362656539363165303037 + $ANSIBLE_VAULT;1.1;AES256 + 37363635656333343863393435343031306630373038663561303038383136616138363538333636 + 6438353634323266356233633034613263653435386262300a393962656564366432643932373264 + 36656161353730376636646233363662376636383461656434306339646339643865626162646435 + 3835623031326137320a653962383531663532663436316264313035356237623466663262643735 + 66646465646531643638653165316531336430356266393631353439633236323733656463643935 + 6436623435613135313862643962663362656539363165303037 ovh_consumer_key: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 64356531386663353164303762396664393031323864363362346336346166353933336334303563 - 6135386139616638396136336534656562643061653630650a366365653234643439323537663766 - 31643864353032303237633933326334626161646336346532386566333465333230383639313664 - 3531383466316437390a393130303136356262363231643063373763303265393563326565633965 - 39303464363636366638373065363535353161613334373530623062376333373234666161323731 - 3764613331316433653335376337356464313137336563643834 + $ANSIBLE_VAULT;1.1;AES256 + 64356531386663353164303762396664393031323864363362346336346166353933336334303563 + 6135386139616638396136336534656562643061653630650a366365653234643439323537663766 + 31643864353032303237633933326334626161646336346532386566333465333230383639313664 + 3531383466316437390a393130303136356262363231643063373763303265393563326565633965 + 39303464363636366638373065363535353161613334373530623062376333373234666161323731 + 3764613331316433653335376337356464313137336563643834 traefik_token: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 66623665393638313039616464613563316437386566396238623937363238626535633937633536 - 6236653135363566333636633961343766323138633737610a346666636430303031373333376565 - 62643038666134386631306139613835623830346139356163376438643261646366386437343064 - 3365363639663862660a616239366130326538396431393537623964396530393531363665353361 - 65343938646438366264353837316263643634373639346334303939663732383832353439313330 - 3466323034336339626239633763393832383435623632386632 + $ANSIBLE_VAULT;1.1;AES256 + 66623665393638313039616464613563316437386566396238623937363238626535633937633536 + 6236653135363566333636633961343766323138633737610a346666636430303031373333376565 + 62643038666134386631306139613835623830346139356163376438643261646366386437343064 + 3365363639663862660a616239366130326538396431393537623964396530393531363665353361 + 65343938646438366264353837316263643634373639346334303939663732383832353439313330 + 3466323034336339626239633763393832383435623632386632 dashboard_users: - name: kadet password: !vault | @@ -67,6 +67,7 @@ service_config: password: "{{ mysql_user_passwords['gitea'] }}" legacy: www_data_users: ["{{ ansible_user }}"] + wipe-stg: template: wipe @@ -148,13 +149,13 @@ service_config: 62643132313336356365313465353263626565616434633963343764653330316566613633633638 623838613832393239343036396439383561 cojedzie: - cojedzie_version: '2022.3.1' + cojedzie_version: "2022.3.1" cojedzie_gtm: GTM-TQNX386 cojedzie_database: name: cojedzie user: cojedzie password: "{{ mysql_user_passwords['cojedzie'] }}" - cojedzie-next: + cojedzie-next: cojedzie_database: name: cojedzie-next user: cojedzie-next @@ -222,13 +223,13 @@ service_config: echo: {} management: api_server_vault_password: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 38376138373336636630386339653761646333313238386365653365623335383035643231643162 - 3936353164363934633939306462346262666438346262310a313366353766303833373734383032 - 38643039376636633762653838623565376236653061633734626262616530313734366231326632 - 6530373935323033360a613236366135656436306330306162636661313963613466656163316139 - 32333032613461633834396261623166656365666364393761326438366536306237373661303834 - 3339396235393636346666346365306463643430373639613762 + $ANSIBLE_VAULT;1.1;AES256 + 38376138373336636630386339653761646333313238386365653365623335383035643231643162 + 3936353164363934633939306462346262666438346262310a313366353766303833373734383032 + 38643039376636633762653838623565376236653061633734626262616530313734366231326632 + 6530373935323033360a613236366135656436306330306162636661313963613466656163316139 + 32333032613461633834396261623166656365666364393761326438366536306237373661303834 + 3339396235393636346666346365306463643430373639613762 api_server_users: - token: !vault | $ANSIBLE_VAULT;1.1;AES256