We installed the Zammad by writing an Ansible script, and we would like to automate all the Email configuration, admin account creation through the script instead of following GUI. Is it possible?
Are these configurations stored in the database? Can we restore the configuration from “20200212125219_zammad_db.psql.gz”? Ultimately, we are aiming to configure, change brand logo, create a list of user, groups, SLAs automatically instead of following zammad GUI manually. Thanks in advance.
i personally believer that the Console is a much more appropriate way to change settings. You can basically change anything you can do in the GUI from the commandline. Its much mure updateproof than restoring an sql dump.
For a start you can read here:
You can manually use the console as recommended by @aelsing, which works well enough.
But the more robust solution is to create a package which encapsulates your changes. See this thread for more info: Zammad Package Best Practices
To get you started, here is how you would change the branding:
- All settings are defined in db/seeds/settings.rb
- The brand name is called
- You can get the current value with
- You can set it with
Setting.set("product_name", "New product name")
For creating users and such, just use the appropriate model method, for example:
In my opinion the rails console is the way to go, as it will directly give feedback if something went wrong which allows you to have a look in your ansible scripts.