community.zabbix
community.zabbix copied to clipboard
Can`t change ServerName zabbix.example.com
SUMMARY
ServerName zabbix.example.com in /etc/apache2/sites-available/zabbix.conf
ISSUE TYPE
- Bug Report
COMPONENT NAME
Zabbix web
ANSIBLE VERSION
ansible [core 2.12.2]
python version = 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]
CONFIGURATION
CALLBACKS_ENABLED(/home/user/github/infrastructure-as-a-code-example/zabbix-community/ansible.cfg) = ['profile_tasks']
DEFAULT_GATHERING(/home/user/github/infrastructure-as-a-code-example/zabbix-community/ansible.cfg) = smart
DEFAULT_STDOUT_CALLBACK(/home/user/github/infrastructure-as-a-code-example/zabbix-community/ansible.cfg) = yaml
OS / ENVIRONMENT / Zabbix Version
Server where ansible
cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
Remote server
cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
STEPS TO REPRODUCE
---
- name: Installing Zabbix
hosts: zabbix_server
become: true
collections:
- community.zabbix
roles:
- role: geerlingguy.apache
- role: geerlingguy.php
- role: geerlingguy.apache-php-fpm
- role: zabbix_web
Inventory
all:
children:
zabbix:
hosts:
zabbix_server:
ansible_host: xxxx
vars:
zabbix_url: "http://zabbix.xxxxx.sslip.io"
zabbix_apache_servername : "http://zabbix.xxxx.sslip.io"
vars:
ansible_user: ubuntu
ansible_ssh_private_key_file: ~/.ssh/id_rsa
ACTUAL RESULTS
cat /etc/apache2/sites-available/zabbix.conf
<VirtualHost *:80>
ServerName zabbix.example.com
Same issue with inventory
all:
children:
zabbix:
hosts:
zabbix_server:
ansible_host: xxxx
vars:
zabbix_api_server_url: "zabbix.xxx.sslip.io"
vars:
ansible_user: ubuntu
ansible_ssh_private_key_file: ~/.ssh/id_rsa
I realize this ticket is beyond old but the correct variable should be zabbix_api_server_url.