Skip to content

An Ansible playbook (and Terraform code) to spin up a Zabbix server and agent.

Notifications You must be signed in to change notification settings

robertdebock/ansible-playbook-zabbix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible playbook for Zabbix

Overview

+--- floating ip ---+
|                   |
+-------------------+
          |
          V
+--- zabbix_web ---+    +--- zabbix_server ---+
| - :80/tcp        | -> | - :10050/tcp        |
| - :443/tcp       |    | - :10051/tcp        |
| - :10051/tcp     |    |                     |
+------------------+    +---------------------+
             |                |
             V                V
           +--- mysql_server ---+
           | - :3306/tcp        |
           | - :10051/tcp       |
           +--------------------+

Setup

The state of the used roles:

Role name GitHub Action GitLab CI Version
aide github gitlab version
auto_update github gitlab version
bootstrap github gitlab version
buildtools github gitlab version
certbot github gitlab version
common github gitlab version
core_dependencies github gitlab version
digitalocean-agent github gitlab version
epel github gitlab version
fail2ban github gitlab version
firewall github gitlab version
httpd github gitlab version
logwatch github gitlab version
maintenance github gitlab version
mysql github gitlab version
openssl github gitlab version
php github gitlab version
postfix github gitlab version
python_pip github gitlab version
rsyslog github gitlab version
software github gitlab version
unowned_files github gitlab version
update github gitlab version
zabbix_agent github gitlab version
zabbix_repository github gitlab version
zabbix_server github gitlab version
zabbix_web github gitlab version
  1. Download the Ansible roles:
ansible-galaxy install -r roles/requirements.yml
  1. Download the terraform providers and modules:
cd terraform
terraform init
  1. Set the DigitalOcean and CloudFlare credentials:
export TF_VAR_do_token="REPLACE_ME_WITH_THE_DO_TOKEN"
export TF_VAR_cloudflare_api_token="REPLACE_ME_WITH_THE_CF_TOKEN"

Installation

Apply the playbook:

./playbook.yml

This will:

  1. Create the infrastructure using Terraform.
  2. Install Docker. (Including all requirements.)
  3. Create the rancher/rancher container.

Finally, login. (URL displayed at the end of the play.)

Files

.
├── ansible.cfg - To tell Ansible how to work.
├── playbook.yml - The playbook to run.
├── group_vars - Variables used by Ansible.
├── roles - Where roles will be stored.
│   └── requirements.yml - What roles to download.
└── terraform - A description of the infrastrucure.

About

An Ansible playbook (and Terraform code) to spin up a Zabbix server and agent.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages