Skip to content

Ansible role for installing Zoneminder on Debian and Ubuntu

License

Notifications You must be signed in to change notification settings

trfore/ansible-role-zoneminder

Repository files navigation

Ansible Role - trfore.zoneminder

CI CD

This role will install the following on the target node:

  • Zoneminder Open-source video surveillance software system.
  • MySQL or MariaDB database backend for Zoneminder (ZM).
  • PyMySQL for configuring and securing MySQL / MariaDB.

New to Ansible? See the wiki (link) for detailed instructions on setting up Ansible and running this role.

Install the Role

You can install this role with the Ansible Galaxy CLI:

ansible-galaxy role install trfore.zoneminder

Tested Platforms

  • ansible-core 2.14, 2.15 & 2.16
  • Debian 10, 11 & 12
  • Ubuntu 20.04 & 22.04

Role Variables

  • The Zoneminder package automatically creates a default database user, zmuser, and password, zmpass, with permissions to the zm database. Setting zoneminder_db_user and zoneminder_db_pass will remove the default user and configure Zoneminder to use the new username and password.

  • Warning: The database username and password are limited to 32 characters - alphanumeric, underscore (_), and dollar-sign ($) characters are permitted. However, the first character cannot be $. This role does not validate these inputs, incorrect values will break the install.

  • MySQL is not available on Debian, MariaDB is automatically installed.

    Variable Default Description Required
    zoneminder_db mysql String, database backend - MariaDB or MySQL No
    zoneminder_db_user zmuser String, database username for ZM. No
    zoneminder_db_pass zmpass String, database password for ZM. No
    zoneminder_secure_db true Boolean, secure the database - drop 'test' db and remove anonymous users No
    zoneminder_smtp false Boolean, install SMTP packages, msmtp and mailutils, for sending ZM notifications No

Dependencies

  • community.mysql

Example Playbook

- hosts: servers
  become: true
  pre-task:
    - name: Set Server Timezone
      community.general.timezone:
      name: America/New_York

  roles:
    - name: Install ZM
      role: trfore.zoneminder

License

See LICENSE File

Author Information

Taylor Fore (https://github.com/trfore)

References

Zoneminder:

About

Ansible role for installing Zoneminder on Debian and Ubuntu

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages