run pyinfra command with environment variables, without inventory.py

This commit is contained in:
missytake
2023-10-12 17:00:20 +02:00
parent 65494b207d
commit 4b0a9448d6
4 changed files with 32 additions and 10 deletions

View File

@@ -2,4 +2,13 @@ import os
from pyinfra import host, facts
from chatmail import deploy_chatmail
deploy_chatmail()
def main():
mail_domain = os.getenv("CHATMAIL_DOMAIN")
mail_server = os.getenv("CHATMAIL_SERVER", mail_domain)
dkim_selector = os.getenv("CHATMAIL_DKIM_SELECTOR", "2023")
deploy_chatmail(mail_domain, mail_server, dkim_selector)
main()