solutionDrive.zammad
ansible-role-zammad
This role helps you install and set up Zammad, which you can learn more about at zammad.org.
Requirements
Before running Zammad, check the software requirements at Zammad Prerequisites.
It is highly recommended not to run the database server on the same machine as Zammad.
You need to install Ruby, Bundler, Rake, and Rails first. A good option is to use geerlingguy.ruby
, but make sure to build Ruby from the source, as the version from the package manager might be outdated.
Role Variables
Install prerequisites via apt (disable if you want to use a different package manager):
zammad_install_prerequisites: true
Install Zammad itself (from source):
zammad_install: true
Configure an existing Zammad installation (set
zammad_install
to true for setup):zammad_configure: false
Install Nginx as a reverse proxy in front of Zammad:
zammad_install_nginx: true
Configure existing Nginx for Zammad:
zammad_configure_nginx: false
Remove Nginx's default virtual host to use only Zammad:
zammad_remove_nginx_default_vhost: false
Set to true to create the database:
zammad_db_create: false
Set to true to run database migrations (must be true if
zammad_db_create
is true):zammad_db_migrate: false
Set to true to add initial values to the database (DON'T DO THIS ON AN EXISTING DATABASE!):
zammad_db_seed: false
Set to true to install with MySQL as the database driver:
zammad_db_mysql: true
Set to true to install with PostgreSQL as the database driver:
zammad_db_postgresql: false
Don't set both zammad_db_mysql
and zammad_db_postgresql
to true!
Database parameters:
zammad_db_host: 127.0.0.1
zammad_db_port: 3306
zammad_db_username: zammad
zammad_db_password: ~
zammad_db_name: zammad
User and group for Zammad:
zammad_user: zammad
zammad_group: zammad
Set to true to create user and group if they don't exist:
zammad_user_group_create: true
Enable or disable installation of systemd services:
zammad_install_systemd_service: true
Set to true to precompile static assets (the database must be set up first):
zammad_precompile_assets: false
Cloud Usage Suggestion
If you want to set up an Amazon Machine Image (AMI) that just runs Zammad, use the following:
zammad_install_prerequisites: true
zammad_install: true
zammad_configure: false
zammad_install_nginx: true
zammad_configure_nginx: false
zammad_remove_nginx_default_vhost: false
zammad_db_create: false
zammad_db_migrate: false
zammad_db_seed: false
zammad_db_mysql: true or false
zammad_db_postgresql: false or true
zammad_user: zammad
zammad_group: zammad
zammad_user_group_create: true
zammad_install_systemd_service: true
zammad_precompile_assets: false
In your launch configuration, set it up as follows:
zammad_install_prerequisites: false
zammad_install: false
zammad_configure: true
zammad_install_nginx: false
zammad_configure_nginx: true
zammad_remove_nginx_default_vhost: true
zammad_db_create: false
zammad_db_migrate: true
zammad_db_seed: false
zammad_db_host: 127.0.0.1
zammad_db_port: 3306
zammad_db_username: zammad
zammad_db_password: ~
zammad_db_name: zammad
zammad_user: zammad
zammad_group: zammad
zammad_user_group_create: false
zammad_install_systemd_service: false
zammad_precompile_assets: true
First Run Without a Database
If you are running for the first time and do not have a database yet, you have two options:
- Create the database manually and run Ansible once with
zammad_db_seed
set to true. - Run Ansible once with
zammad_db_create
andzammad_db_seed
both set to true. (You will need to provide a user who can create databases.)
Dependencies
None at the moment.
Example Playbook
- hosts: servers
roles:
- { role: solutiondrive.ansible-role-zammad }
License
MIT
Author Information
Created by solutionDrive GmbH.
Visit solutionDrive.de for more information.
Install and configure zammad (see https://zammad.org )
ansible-galaxy install solutionDrive.zammad