a Ö>ïhúã@s&ddlmZmZGdd„deeƒZdS)é)ÚPluginÚ UbuntuPluginc@s4eZdZdZdZdZdZdZdZdd„Z dd „Z d S) ÚVaultz£The Vault plugin collects the current status of the vault snap on a Ubuntu machine. It will collect logs from journal, vault status and configuration z3Manage access to secrets and protect sensitive dataÚvault)ZsysmgmtZsecurity)rc CsÒd}| |¡z„t|dddb}| ¡ ¡D]D}|s6q,| d¡}|d ¡dkr,|d d ¡}|jd d |id q,Wdƒn1s†0YWn:tyÌ}z"| d |›d|›¡WYd}~n d}~00dS)Nú /var/snap/vault/common/vault.hclÚrzUTF-8)Úencodingú=rÚapi_addréz" z vault statusZ VAULT_ADDR)ÚenvzCould not open conf file z: ) Z add_copy_specÚopenÚreadÚ splitlinesÚsplitÚstripZadd_cmd_outputÚIOErrorZ _log_error)ÚselfZ vault_cfgÚcfileÚlineÚwordsr Úerror©rú s