From add189a203dd004694646f155551e1f8b8ee7376 Mon Sep 17 00:00:00 2001 From: Loren McIntyre Date: Thu, 26 Mar 2026 14:45:57 -0700 Subject: [PATCH 1/4] vault: use vault-ids, share re-encrypt script --- ansible.cfg | 2 +- vault_enc_strings.py | 110 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 vault_enc_strings.py diff --git a/ansible.cfg b/ansible.cfg index 27d4557d..a8dcdcd9 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -2,9 +2,9 @@ inventory = hosts.yml host_key_checking = True ansible_user = root -vault_password_file = .vault-password collections_path=collections roles_path=roles +vault_identity_list = prod@.vault-password, dev@/home/user/.vault-pass.dev [ssh_connection] pipelining=True diff --git a/vault_enc_strings.py b/vault_enc_strings.py new file mode 100644 index 00000000..7ba9e5c4 --- /dev/null +++ b/vault_enc_strings.py @@ -0,0 +1,110 @@ +import sys +import yaml +import argparse +from ansible.parsing.vault import VaultLib +from ansible.cli import CLI +from ansible import constants as C +from ansible.parsing.dataloader import DataLoader +from ansible.parsing.yaml.dumper import AnsibleDumper +from ansible.parsing.yaml.loader import AnsibleLoader +from ansible.parsing.yaml.objects import AnsibleVaultEncryptedUnicode + + +class VaultHelper(): + def __init__(self, vault_id): + loader = DataLoader() + vaults = [v for v in C.DEFAULT_VAULT_IDENTITY_LIST if v.startswith('{0}@'.format(vault_id))] + if len(vaults) != 1: + raise ValueError("'{0}' does not exist in ansible.cfg '{1}'".format(vault_id, C.DEFAULT_VAULT_IDENTITY_LIST)) + + self.vault_id = vault_id + vault_secret = CLI.setup_vault_secrets(loader=loader, vault_ids=vaults) + self.vault = VaultLib(vault_secret) + + def convert_vault_to_strings(self, vault_data): + if not is_vault_encrypted(vault_data): + # Already plaintext YAML — just parse and re-encrypt string values + d = yaml.load(vault_data, Loader=AnsibleLoader) + self._encrypt_dict(d) + return d + + decrypted = self.vault.decrypt(vault_data) + d = yaml.load(decrypted, Loader=AnsibleLoader) + self._encrypt_dict(d) + return d + + def _encrypt_dict(self, d): + for key in d: + value = d[key] + if isinstance(value, str): + d[key] = AnsibleVaultEncryptedUnicode( + self.vault.encrypt(plaintext=value, vault_id=self.vault_id)) + elif isinstance(value, list): + for item in value: + self._encrypt_dict(item) + elif isinstance(value, dict): + self._encrypt_dict(value) + +def is_vault_encrypted(raw: str) -> bool: + return raw.lstrip().startswith('$ANSIBLE_VAULT') + +def has_inline_vault_values(raw: str) -> bool: + return '!vault' in raw + +def main(): + parser = argparse.ArgumentParser( + description="Re-encrypts a vault file with per-string encryption.", + epilog=( + "ansible.cfg must have vault_identity_list configured:\n" + " [defaults]\n" + " vault_identity_list = prod@.vault_pass.prod, dev@/home/user/.vault_pass.dev\n\n" + "The --vault-id value must match one of those identity names (e.g. 'prod')." + ), + formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument('--input-file', '-i', help='File to read from', required=True) + parser.add_argument('--output-file', '-o', help='File to write to (default: stdout)') + parser.add_argument('-O', '--overwrite', action='store_true', + help='Overwrite input file in place') + parser.add_argument('--vault-id', help='Vault id used for the encryption', required=True) + parser.add_argument('-d', '--decrypt', action='store_true', + help='Print decrypted plaintext to stdout (does not write to file)') + args = parser.parse_args() + + if args.overwrite and args.output_file: + parser.error('-O/--overwrite and --output-file are mutually exclusive') + if args.decrypt and (args.overwrite or args.output_file): + parser.error('-d/--decrypt is view-only and cannot be combined with -O or --output-file') + + original_secrets = open(args.input_file).read() + vault = VaultHelper(args.vault_id) + converted_secrets = vault.convert_vault_to_strings(original_secrets) + + + if has_inline_vault_values(original_secrets): + parser.error( + f"{args.input_file} contains inline !vault encrypted values, which is not supported.\n" + "Convert to a whole-file vault first with: ansible-vault encrypt " + ) + + if args.decrypt: + if not is_vault_encrypted(original_secrets): + sys.stdout.write(original_secrets) # already plaintext, just echo it + return + decrypted = vault.vault.decrypt(original_secrets) + sys.stdout.write(decrypted.decode() if isinstance(decrypted, bytes) else decrypted) + return + + if args.overwrite: + output_path = args.input_file + else: + output_path = args.output_file # may be None + + if output_path: + with open(output_path, 'w+') as f: + yaml.dump(converted_secrets, Dumper=AnsibleDumper, stream=f, explicit_start=True) + else: + yaml.dump(converted_secrets, Dumper=AnsibleDumper, stream=sys.stdout, explicit_start=True) + +if __name__ == "__main__": + main() From 7d75169248cda8a9ffe0b2e646c8598a49780b9c Mon Sep 17 00:00:00 2001 From: Loren McIntyre Date: Thu, 26 Mar 2026 14:49:14 -0700 Subject: [PATCH 2/4] vault: re-encrypt file to strings --- .../m5_noisebridge_net/mysql-secrets.yml | 46 +++++--- .../m5_noisebridge_net/pydonate-secrets.yml | 86 ++++++++++----- .../library-org_secrets.yml | 67 ++++++++---- group_vars/noisebridge_net/secrets.yml | 103 +++++++++++++----- group_vars/space_noisebridge_net/secrets.yml | 54 ++++++--- 5 files changed, 247 insertions(+), 109 deletions(-) diff --git a/group_vars/m5_noisebridge_net/mysql-secrets.yml b/group_vars/m5_noisebridge_net/mysql-secrets.yml index 404fca2f..9e5ce8e8 100644 --- a/group_vars/m5_noisebridge_net/mysql-secrets.yml +++ b/group_vars/m5_noisebridge_net/mysql-secrets.yml @@ -1,14 +1,32 @@ -$ANSIBLE_VAULT;1.1;AES256 -39643637396530663734383836393034343165613265643866393832656235366336313037336664 -3435343234326139646134663037633431626461643961340a613233666530616561336632353739 -32353539346466613730643164383733363031363330313162326464663732666337373365303739 -3632656535306266300a303430336533306361633537383831616664663434383766343564666361 -31366139386162393466313265666135633232623030376435306532666461346465323766323337 -62393261383863623538356337343938356138373161363032396665656332396362383038646436 -38333465336232323235383466646330343231343362663434653533373031356166336534396539 -39393631643139383235373334343730366437303261663965636431343931393131636135393932 -38353462653134643435383832623536396331643838303336623662656339396361353936663338 -65633164333065656334336461643861306237383638663436633237373639633665656330336463 -31666366323031393434363964653430386637353939363761613230656135363965313738656331 -35363463373265303631646230383161626233336163356630386262396135613534383965343936 -6636 +--- +mysql_root_password: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 31623436366339363665333534646439323632356236666532666337323562373033353737316630 + 3866623031636633646130353532383836366162313262620a366566383737636563393639386532 + 64326334356231366131666538613230623931303262663136656232633865363336383164633930 + 3335366437346636390a393931316166343537343335373436613134663566316136616139393362 + 33376631333731306561313135393835363265356463613764393064643661613938316635356634 + 6632653362613064326433343030303761633565623164313632 +mysql_users: +- name: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 64663939316232333964626539633162313632363233663032616337363132663961626263626361 + 6238626331306237323363303964396633323862363338390a313462643764646636633362303635 + 63343632373837643136333762623839313939616665626436393333376231346564316466333766 + 6564393933343531300a323266383261343931393031646439393831386332366632393664623036 + 3834 + password: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 61393332613462396534326539383863643763353534306338316362666338333563366133313866 + 3765353837663438373438366661386339313537656339340a373630306462373134326566356531 + 66656532643664346264373432633030646630663662653431393432313031636536643735636631 + 3364616638613430340a633735383665623237616162613230363336653630646236663465313661 + 65333139353339326565373335323532396534363435363063383263316563303030323966336139 + 3965316361636339326131323631633136343230343064393935 + priv: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 34366564386264373864303135306665313138336632613538643130613863363038313634656232 + 6538646664616234626234646261313437363035656131330a313162616437646133316635636466 + 38306234353661633236393432346236333433626539386464633365356437333664656535646331 + 6636643765386562340a666339356463356463333738353866323738646535333065646132386637 + 35326663666131656564346666383563323965396333353832656335633839613138 diff --git a/group_vars/m5_noisebridge_net/pydonate-secrets.yml b/group_vars/m5_noisebridge_net/pydonate-secrets.yml index 4bf045ad..f88d504d 100644 --- a/group_vars/m5_noisebridge_net/pydonate-secrets.yml +++ b/group_vars/m5_noisebridge_net/pydonate-secrets.yml @@ -1,27 +1,59 @@ -$ANSIBLE_VAULT;1.1;AES256 -63636234373436346366616331663162346530623964386236663461353637323136333063333063 -3834393930613761336631373365333566373631373132320a306464393537653236613537393030 -32636139643732333365616666353166316264353432323861623439333432336331623838636239 -3632316362336366330a646431316133386135396562313930343131393766313735393236366332 -32616164346434323235303739313435623839643834666263666361303734663434343731613363 -37333961323735363737613836333663303037343266633036303930363761653561633362343464 -62376234323939346666623334336135623539313631363464613534383433623937623363646537 -62343566626464616530363531633838356235643064393934636334633061623261656139653333 -66616631313738636233633061306366326339663831363438353033646564613266633066643038 -31386665356335313434343334616236626337613530333339653766633761326434613939613466 -66393963656264356663653063626665353435656537666465653564333732356439333131393636 -66373332336465363731613764643638323432386438643530393633613963343264303633373662 -39643032346265363239396464666435663137393563653135303564333833396433393331373135 -33656232396132323231356264376238626161323763653134653362393531323261376630623532 -36646636646364386639373633376334623636616134356339316465616437303237356638313336 -34633435326235393037323561663436626432316239366436666663323931353966333365656434 -66363033386561316561333463653235333464616465353736313835393631313564383230653730 -30393366313566653930316230316264633932613566333165363066373538343133366162396238 -63656134313736646438643738326563373435323530383735643566623733633132396365666364 -66313038633636646333336633376139373139623764653838303537336163323231623265636632 -32613032386436613332613537346532356336613961386634373630323338646230653631373665 -66623533653164643765303830346434333061353831646263623161393535616231333065326366 -34376464653466366435633964646261353366616463353436333532353935633337663338653738 -65663437646333366130663136636232373363386230346136393465643936386337353031373336 -37383366376131656435353961333564613662323262616430633066663163363638316236313764 -3561643561363733396539643633313637633437393631663338 +--- +pydonate_config: + secrets: + db_pass: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 36656331343531373763393933336636313062396132326166646438626261623562323965643835 + 3866376530366266353530313430636534303834623739320a646162663562306430373035616132 + 30373162346661333462623434326131313638613231373636373065653763326566643434633439 + 3163666262613065350a393336623661333764383161386537373861313862306334343731313739 + 31326434633236626533333434366633653164356231343330623838386331633039336634333262 + 3237313162306462333137313339623663323432343562646431 + donate_product: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 64373137306235393430366261613430313962636530313562323439316231613063353534326535 + 6432636230343939326336656437626565333036363166340a343834346561313863343830303966 + 33313337323262393931613434386136656531313539313065613462303261336165306337396132 + 3538336132636335330a346135343138663631353962343861373366393133316564353333333332 + 63313631336661643136623461316163643337663339646435396464373034333034 + donate_secret: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 36363533303162323863363961633631343038303633663431663164646635366333623366663339 + 3338373635393431326466336535643738633762373932640a333261323662616362313162353463 + 39653138633331636137373732316362356238333064643936383162313265356438666636313565 + 3830633833653165390a643866623463356662336365646136656130386266366133613436636239 + 32353334636163316533323964623361373333336631376433323266643134363933353231643862 + 38333235333833396635623730326331646630653034353831303063616633613438343433333362 + 363333356335396238653039346637346430 + recaptcha_secret_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 38616461656136656465366263366331343339643132316631613761376235616431626539633437 + 6531393236376236343164666662393432313464643761620a373565326662383061653233323463 + 32303863343330383430373161336332353435623762353736613731396264363830313130343432 + 6635353538613335330a613838306636373137633431356630643634333131376531643436366634 + 34366534643736326333656539323863616436396531353861636161393866346138343932373231 + 3539386630633038383864373933306139376532343830326239 + recaptcha_site_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 63373839323462653439656339626565663866393936356437633530386165636233653739643931 + 3661373264313839653835653466666335626139356462340a336331386363373735616462343737 + 33326638333339653961663436363531636531393165353433663332616365323866623138383634 + 3065663262303839610a666634626135313164626534323535666263303730623536613566333730 + 66616266313533333630646561633837613734346538376332333436313330353030323965326432 + 6264636139346438646235616462343937373562326564306466 + stripe_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 34653736383032636137306636326636323630643338383137343262343333346365306562343332 + 3062396632386439386534666532626664613266356161630a373438333266356330353866393962 + 63373530646433323235653933643566363935656564613063313031356334366637376339333534 + 3038363361373033660a376436363764396536666339316330386531346439356237373861333065 + 65373537353539383830663566343964623932636236303461356432643965363839353232363661 + 6137663731363634343663396536346666326434373239383932 + stripe_secret: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 65663764383431666135663166643864306431326433353063623863326464393665666434333161 + 6531373361613363363232363539343436303030643639380a626239633761646335333265633461 + 32313661666237343139643238363635333865616161386231366238396239353039373065656636 + 3335636134633265610a346465303335643238646533303462316464333465376665626336653833 + 33626565623735616437653933633636363465353234646137353830336164316139643033373735 + 3237343333633066326366303365333831633233663338356162 diff --git a/group_vars/m6_noisebridge_net/library-org_secrets.yml b/group_vars/m6_noisebridge_net/library-org_secrets.yml index 4f8b989c..8341a062 100644 --- a/group_vars/m6_noisebridge_net/library-org_secrets.yml +++ b/group_vars/m6_noisebridge_net/library-org_secrets.yml @@ -1,21 +1,46 @@ -$ANSIBLE_VAULT;1.1;AES256 -31356238353439353630313865343832366431343931376434373430306365346435343638353133 -3437353031653961643563333261396564383932326239300a316164363761326531336137656633 -32363436613363333539386161663630353735323937656534656464313264366134643238373238 -3332623762383664620a343961643035396664336464313731636539643734643639366134313234 -61653837656434353062653861666166653639363435646363366661616262373763353564653665 -64323435346561653561353333376632373339383338343232396661326165623134633263316237 -65396365356161313335633930346332323638393331333064303732366432336264396366653634 -65636262316434323935316637353333316133663836393866353030326133336437646265343336 -62306235386532643732353862613432396564333338313338346431393433666135343736653861 -32353630356438333230643931656136623639383034383437623234613037646462643562623461 -32346166653164336138333936626263666131613862643233346134346335393762343437346138 -66356330393935333535393732663066616136383532313331633362333430313639653563646662 -32663662383435333936336236383130623031343630326433306538356461626536313164613535 -65643738373734393233336562646132376561626137306538613439306138376233653434323437 -32316230383062303465396632313639353730633935303462326330313864626364643364626235 -35613764346661386237656362323138633630313930303933383836306465353438306438666339 -66346161343732373930383839333532636366386165646266353832323435376364393666393863 -36343366336439343763643833633631376165343131303132343236333734653165623132643338 -32626434343439363030636438663631666637303938643235343865626662313732383230623232 -34353836663139646532 +--- +library_org_config: + secrets: + app_secret_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 61666464643864343430373637326136623630343532373031343236643432656663653661666235 + 6639623837313433666233313264663133343630663864640a373430663332356562356234643538 + 35343065633863373232646364643930356662323831396661653766663730613337306337653433 + 3266613836626330340a373362333261393362306665303037333932656233343537646231656236 + 35613864343165363533326534653064643239303963356533633065346230623064 + new_isbn_submit_seret: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 35306434333430376536386463376539643264623162333730373066376262656562633731613833 + 6634333765636433323266336661353139653365306630640a653134386164383439616130363338 + 62376165303031653363353831653736383236643238626132316463383230656230333339313034 + 6632633739386435630a623461333533633334393032363236666538383432313633613562643738 + 61653234386435363131646335326666323235303939613730623266313731643834 + new_location_submit_secret: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 66623933393438333935323837613766373733396664636335333665636365333936396230663430 + 6332346437313164373463633864303631303837356166340a313537643838633339386238316266 + 35643563633032626162363262313165303164376436366233313831306135343331303738613234 + 6534633138313761630a613866666333663164646263643837656139366465393235666532366365 + 66363632356137663161333163653337303463393433636466633636336632616437313463323666 + 6435373632386137663163616634613764356436633262363838 + recaptcha_private_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 39346465373662353136313534653539373737663963343839323739383235343132366238613737 + 3138333866633261323238326339356239643734393237350a316463303731313534366635616338 + 66313234363231643235326236303237626632306565313664373039396238353633366631653033 + 6239336161623562300a313539306461633861383832363863623332626262636235636665623063 + 3538 + recaptcha_public_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 38316562633761663233353635366337613638613237353833373436353735363330303831383538 + 3634653264323865626466633532393932623834313932360a336365386538366163353332356662 + 64376232626262306134393731623634663366386135623565306333613131373162633465326363 + 6535633530616636630a386663663632353435366236613062396137656433303131316234306361 + 3462 + wtf_csrf_secret_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 39363164323363626437326365393861353932643935306464623366323665633133323166396561 + 3962346230663131626236373364346630386139653536320a396139363464623538633765303432 + 37656631303637326362356335633436373361333764356361303663393837346333336336633238 + 3431626366636531340a313866323437306262376531323636356538346361623930653431356163 + 39613334303436633431303639356363376139653630373462323763613935643039 diff --git a/group_vars/noisebridge_net/secrets.yml b/group_vars/noisebridge_net/secrets.yml index ebb0167c..db0c638e 100644 --- a/group_vars/noisebridge_net/secrets.yml +++ b/group_vars/noisebridge_net/secrets.yml @@ -1,30 +1,73 @@ -$ANSIBLE_VAULT;1.1;AES256 -38643230356634323036323336323935336330616166323935663434383338613737316637376263 -3231653532306537666239346533373266323464343830300a646166643836363138316636613637 -36363730366233303130663733663231323462373633333935353536623238643137663137343631 -6162323561353165630a623132666534613639323631663834303765356336613433396432643130 -30613564323663333937393836616431323139313034653662643633313637626535376464326363 -32313765656531616638346532393230396565626334393863666431356435323436363261613032 -38363965646131376235623466363236636564646365383538313532653364383137623661333030 -30343339633936613966336366383333653864376135343431356163656636393036656530353335 -37343330336239386535366431316634303237333330336136373633366663646432353265353261 -36366537653231393735346166383533356435653333303065373935303665663861636331396231 -62366230346561343338366161383434396264306130353731643631353232343261616435313236 -63636535616131396433616463353730326666626638643666356536346363333764386166323432 -30363930653366666335363364363835643065306131376561356431663632366664363863376631 -65623632636434666465306563373837383036306533313864383637623461663933303835363531 -65366331396338616165333261353964393835306265306335353832656263626631303465643539 -38656434356461373337323933386234316161336134303563643462393633376365393830323935 -37356164656137303031336466343836353131393863336435613130623036346134303266396530 -36663266306531626635303834613430303137613737326466373639623464356136356634373136 -31363464386232633730663661633062323836323963643164383263616135666238393132343434 -61313134363530643931633765386235653832333861303166333434376337303937353533636134 -33646436356238616130333636366364326132613064363536666165643333333464336333376536 -63643934626263303130613762363838346538356362336135303066366134386566383264303935 -36396365633365623733373536663561333762396336643336643465646466613461633131363566 -63303138613962613535373831313731653163633266303261663534333964623932663166383134 -64396164656634396633626636633631343037363632343136376461613132663863336238643864 -63643264393863386238643436666431393930323666653431386639363839333730636633343432 -65353239643135393762396162336439656133643062383462353864616535366432626332613738 -62373666333366656638353638336562323733633936653239393933616537383937316630306330 -33633230653833333633383133663262616138376532633363653163363932643333 +--- +mediawiki_admin_password: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 38336635303265376230343834316565616238343831633031336631373564643962316330663064 + 3637373531663431646663376138383937613738656139360a393665316433346438303465626237 + 30323563616265636131643832323838316431313236373539396437326137663539316566353933 + 6661323131646235370a613362323234333838626437356132373863333635306133313634343435 + 64633230363462353732666131313732343534313031333266656264366438393462366231346632 + 6235633061343537646664346562376462306231316137316134 +mediawiki_recaptcha_secret_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 37346635316264646635653161633364633962613465303835646531383265316363396336326263 + 6134396638613565636633623163636633613336613831310a623036316238636566343435623566 + 38356539376464633533306132633037356438313261393061323237383462313265316536643039 + 3062343763656432330a336537633861393861663764306363653165353632363735643163656630 + 63323533663037333264343739353632393764393235303634356133373565346338306532333964 + 6337326538643764613762666164653162663230356138626239 +mediawiki_recaptcha_site_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 39303835633438316533383832333761306262353762373539653863396133386539383964663365 + 6134623961653334366231336335306234343430336366660a306233633033333532653565313663 + 33643839623334636131303833643863393532333562393065393238303333343964663835353930 + 6136373165333765390a376436353765636161346132623530653531613030383130333432633765 + 37336165323565363533633433386566306466383239356439306636663265306266356233663437 + 6635366230396634646435333365353766666333343538653034 +mediawiki_secret_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 66396130653236376238646165653738336632623431633839303165636563666264343336653730 + 3339633661613932373334373363306233353636643030360a616631313962626538623632363061 + 30356663643231366463656637353135323133383130353330386663306531666136323636396162 + 3831303439653337370a333632313562656363356335643039623864626165346539646231343536 + 66653039666666343661666162663366383739636237313139363132386463643764313030346533 + 30313563333539316239323537303539353534653536316330623162376663653233643065383965 + 33636637346637373134366139663637626661656135373636666462333437653864643637363362 + 34343034623165633339 +mediawiki_upgrade_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 36306335363338363737346339356634383364643437613030623165623234636630333065666339 + 3038373237336434386162306336353630353562393964320a393363323765353964623031383235 + 32653665316434613430393062366637363665623064363461353234663463366235346564636239 + 3833326566383438650a626637333862326538303361653765326638353531626563343166656662 + 62316161643632376133656361626663363237346537316637343831306632383930 +mysql_root_password: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 37373934363138333738623765353039663063306330306365353432613035623532636565356534 + 6230386438653238346662633761613564626332633362630a383966663463343762633063643031 + 37386633383465653636666366313839393661396436353763636637306235356537636238346165 + 6232343332363238320a616239363665643762623836643366366561613063396430633633626632 + 30386536343632326636636232326435646562646531633937353365343434656331363966356463 + 3839326632323933386239323131343965646530363930333465 +mysql_users: +- name: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 39613135346662316437353264613963613432313231303139396362666232343031303463636664 + 6333636533633839393062636138346435323739633930620a373230316137643535363332306564 + 38333038343265623030613535333033326337373263313836336563343866363965653863663462 + 3066653665646135640a653539663561336463653166343839623335623864396666393966336138 + 3861 + password: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 31356637643566346665613637366366316630303137616432323433613130386437363565633336 + 6466353838316261303561623566313539376430353236610a316465616337323739363762353265 + 62353164316138316538613563376132666263646438376330346462623034346264336565323562 + 3038636362626565660a383862643038396634373935326536626332303632326630343539366164 + 38323738346463633835356563363136363564626164643465643065393861373730316336363064 + 6536643065666339333734663635663436643737383164393032 + priv: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 62363237613639653963626437353331633833336365323732383835316466616539313035613835 + 3233656135653931343131663736306335643563303263640a366630326665326536633432356630 + 63393165386131363564666132373937353161316636383037623936386165613864346132396238 + 6163343736626430350a363565356138666165646162373937356361383232656335646461336661 + 39656137633236393738333263323361353738663736356132363034363763386231 diff --git a/group_vars/space_noisebridge_net/secrets.yml b/group_vars/space_noisebridge_net/secrets.yml index fb031b4f..b50d477e 100644 --- a/group_vars/space_noisebridge_net/secrets.yml +++ b/group_vars/space_noisebridge_net/secrets.yml @@ -1,17 +1,37 @@ -$ANSIBLE_VAULT;1.1;AES256 -32653661633339643530393162393830666261333830663435383135353131343139393530383131 -6163373039383832336530636561396337613139376664370a383764313464616137643531393435 -62376134386333313766656566643162396362643038376538663264323432373166626164336566 -3332373133643762620a616435383636376539313034666532646165336564383366636165663430 -37373430383531326666363364333566626235656663613632343937383462363161333034323139 -64396139613831323562396636643635313762343734663238653636393734313364656237323734 -37323962376638326130303438393362653237396538306331383365666634326662313264303564 -64623338363130663365356233393836373431663164353131643036613130303731636634316166 -36383238303031353530303165343365646363393836353930663032386635346561303562396337 -34373732383436396163326163373934626636383832656565663634303335623137336161393132 -37643061613131656431316631363563383964303631663536393836393237373935393733313666 -38656262656239383137613039313335663834613932313662393836636663313731633739396235 -39373665346239376636396534346636633531353531633032323865393838333765386134653739 -63386663303966303030623535306566653638633430373739376264383237373538323431623130 -61663333376666393138653530616437366133323662396433643639386132303931393961383838 -39313734663664356134 +--- +grafana_admin_password: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 64646462353237616232653936306637656130653231353732303137633139646331656333623233 + 6432386534383230356330646132363930376264306564380a316363383764343432356436666365 + 63316130373431323938303834313135616634306431663137663062376463643264333738346164 + 3430303338363031650a356139363439636138393362663631363239323430383263653835306535 + 3533 +noisebridge_cyberpower_password: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 33313761366665393462383561326362396530626234336538666666363561616439653061353231 + 6666613937353664386666333237316339386234323831380a303738643332346136323030643665 + 61646666613233613362343332333363386230353933613362626431313735613335386265373630 + 3762346133363436380a663533643033623761386464313862353231316430306134643239373732 + 62626637303638303639353233383561313462336131363466393530643431356237 +noisebridge_snmp_community: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 63303233386262306331376135623433643631376436343161623162373461616430393533616538 + 6637653839373130316161653164653034633362646330350a656133653730313532626233636436 + 31636136353536656663643066316131633465363666323130666334363131356431346530636134 + 3231663936323631390a323761656633366634636661336230376239653362663862666366393531 + 3535 +unifi_poller_pass: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 66346339633036663035636330653534346239366361343661366132333064373266623965376132 + 6530336534333831376237613263336266663834643936340a666466306531326463613562633862 + 34613331653161623362346532326338653431653965376337633861353039663462353035316133 + 3138333437656665390a366363333161383165313561656639373732383461376433616137306230 + 35333737343366353331653530616235623838323632306563336539396638303664336663656336 + 3663333861656333663932643666356161613034633962666463 +unifi_poller_url: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 32633464306238383733363736613031306439663665653033633766333738366434666433646436 + 3332303463323863333861306161383865383634333938370a653163393164653762373332353662 + 31633632313465386538623438643738643732346561656239663939316531383832313963626364 + 3234363337666230310a656234343564316330393964316666326165396131373735383161393730 + 33306238643962333762303963393133343263326135303632323335346262343839 From 3d06c47662ccacc7a1357434401902fd476c7cc1 Mon Sep 17 00:00:00 2001 From: Loren McIntyre Date: Sun, 29 Mar 2026 23:24:04 -0700 Subject: [PATCH 3/4] vault: add uv script shabang with deps --- vault_enc_strings.py | 9 +++++++++ 1 file changed, 9 insertions(+) mode change 100644 => 100755 vault_enc_strings.py diff --git a/vault_enc_strings.py b/vault_enc_strings.py old mode 100644 new mode 100755 index 7ba9e5c4..5500c35f --- a/vault_enc_strings.py +++ b/vault_enc_strings.py @@ -1,3 +1,12 @@ +#!/usr/bin/env -S uv run --script +# /// script +# requires-python = ">=3.12" +# dependencies = [ +# "ansible", +# "pyyaml", +# ] +# /// + import sys import yaml import argparse From 4391559c2f44ef84d4a75e65d4ccc3e157fe7f11 Mon Sep 17 00:00:00 2001 From: Loren McIntyre Date: Mon, 30 Mar 2026 14:10:38 -0700 Subject: [PATCH 4/4] vault: re-encrypt groups_vars/all/vault --- group_vars/all/vault | 75 +++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 32 deletions(-) diff --git a/group_vars/all/vault b/group_vars/all/vault index b1877e71..bc48f378 100644 --- a/group_vars/all/vault +++ b/group_vars/all/vault @@ -1,32 +1,43 @@ -$ANSIBLE_VAULT;1.1;AES256 -35653735346363333139383934396433393865613964396638363531313631663839346232626565 -6639396137353434653661623135616536333037376333350a666336316662323638636265386338 -36623566363235386461633464323633333766316431643230353432383063656631323733356561 -6531663337363963320a336638333030323164613132326137366165663663343363636436363931 -38626438623536626336656332303235386366376132303237356664316365356361386563396137 -33396331396231633961613536393238313730336238613534393838386336373137666161393235 -39316561666133373937303334386632663134653536376638643363663763356264643437643839 -39303135376364326339323834626432343138666463316532656432666261353461306338633161 -35663137303364363531643239613233383230643630366463303663353534303236373335636431 -39633332363937636461663437663535346331666332353038313839653064333861623739616665 -61643866326334383366373638376662373163623437323465623364373063666538376637373633 -38623339393735663435613464303331633265373835633564333664383165636230646438666137 -61363966623261353765363662646632633263353565386265376262653638353632383936373562 -33643463303766623638656338333164613536383333353838356238376237633632383565616335 -63343936633033343062636163663761376638623536363735643438306565636462613839383964 -34613565373062626139303361393564333764363836666537383234643637323336303232383938 -36623533363334353330643831303431313363343532333862616434306666383766303839393731 -37666361373332663737626464333931343365643134313837626535656139323464623064366365 -61626230326437666164323361306332643234653839626562333533326238376432346231313735 -61333238313262303463313137306363613330363664653635333430343265303662363332326265 -39643438303237643737353636386333316237316437346230633534326639303862373432656266 -39626337313862396463363239613632383865636433383732616532393765653763313532613030 -37313133373764643137653965303738303165636134313733383161633034336137356463326338 -33353865616565623037613230313962323262653637653266643339343032326661343965396134 -32343761323964376265623162396365313163653634366330376363346161653831346330396634 -63663138316136336365666661343336646637636334656164646331386162633836306632343535 -39653937363939643531653532636163323662343933666638633837393831346331316136346464 -65323436653737356531386262346239633235336533653161393165343566663133666663396638 -66343161663033616532323233396330613838333734616239616332333232626236333963303637 -39663465363736336437363062313465613863393935313364666131343761613265303234306266 -353961646465343062643065373137383738 +--- +vault_noisebridge_github_client_id: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 65656434313331343436373662663233636230373864613637626632316662336637326361343131 + 3239363538613264383639383437646231613362343062380a376366613836353636613936303031 + 35646635383330623737383361613138613733333465373463633233323236646334363838636236 + 6266383235303439360a616566353735616466313364366165383062346332623032386330386433 + 66376438376530636263616333396665343061663631616636613031386266666261 +vault_noisebridge_github_client_secret: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 63306239633366656637636632626138643965643633383938633864656632373962646633393535 + 6237353138646262313932373337663062633662383439340a363430363939643331663463343132 + 65303735343933373262616230366333646161663734343539346636396165666338633835653337 + 6463383261643537650a626337343963313563336236666431343439383030303638306264333463 + 33393631333363623430623337636434393265663133663035313232353064653430346535353365 + 6633336636653139613661616632613062653165393964343232 +vault_noisebridge_jwt_token_secret: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 36616534353134633762613663306531343837353961346331376164613663656564363535356234 + 3565323737383736626635623137373037306265313963610a623761613130633963303434326536 + 38366133623063363937663838326330626330366366613136626637626366306134646337666163 + 3530626636323134370a363731343965376164623837616136363163393664363666386238306332 + 63353633616439643863353538623863653661343730376361653938383461383534396134653032 + 32616466353835353635363561653433366438613734383536616334363031363863323836343239 + 38396337326239353232643962656633353733346534393637326437346339633633626432393061 + 64313061653538653365 +vault_noisebridge_prometheus_password: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 37346235633862303061383231333230616264303337323663393639353339636334303439376234 + 3430376366306538663764333265316134633331316261620a383736633462396265663365346561 + 61643563643930386164356461303661656237343166623030333931313762646365363635383230 + 3638616632613231340a323838616362376463613130333539363733366634633138373339623961 + 34353063323735356136633430356364373535386666666461373963386535386461366564303535 + 3935663566356137653831396633636564323032653531306361 +vault_noisebridge_prometheus_password_hash: !vault | + $ANSIBLE_VAULT;1.2;AES256;prod + 35393962396465616563623231333864656664653265306536663335653564353362353635383265 + 3137303835343830333030353335323635383939313264640a666164303765356464333338306430 + 65353839333064343066653532346566663835373231383339386132653661316164343466323037 + 3939646333313262300a666565643163623061656434353436356239316431643332646332303066 + 64396666613032666439333139646164313961393030313333376630333463383862313334653537 + 61343164636165316436363030323336653531303632613335353434343836326464386131303635 + 326463393565666431386637383963613865