Comments (3)
Update: this solution worked for me incase anyone else runs into it (not the best but works!)
I added another variable called: zbx_server_host_group
zabbix_host_groups:
- Linux servers
- '{{ zbx_server_host_group }}'
I am passing an environment on the CLI as follows [note quotations is needed to parse over properly]:
ZBX_SERVER_HOST_GROUP="Test Servers"
then I simply pass -e on the ansible-playbook command.
-e "zbx_server_host_group='$ZBX_SERVER_HOST_GROUP'"
This creates the zabbix host group within the zabbix server and I can see the server added both into the Linux servers group and also the Test Servers
changed: [192.168.1.229 -> 127.0.0.1] => {"changed": true, "result": "Successfully created host group(s): ['Test Servers']"}
and when another server comes along that is part of the Test Servers group, it does not get recreated and adds both into the Linux servers and Test Servers groups.
ok: [192.168.1.43 -> 127.0.0.1] => {"changed": false}
from ansible-zabbix-agent.
@jimsmith if it's working for you could you please close this issue then?
from ansible-zabbix-agent.
I'll close this ticket. If this is still an problem, it can be reopened again.
from ansible-zabbix-agent.
Related Issues (20)
- CentOS 8 problem with netaddr python module HOT 2
- Hostname at zabbix web interface is set to IP HOT 1
- Error installing python-netaddr on CentOS7 controller HOT 2
- yum error - Repository zabbix-non-supported is listed more than once in the configuration HOT 2
- create host doesn't appaer to run HOT 1
- Adaptation of #233 for Debian
- Playbook failing.. getting KeyError inventory_mode HOT 15
- ansible warning: string field was converted to '10050' HOT 1
- [DEPRECATION WARNING]: evaluating None as a bare variable
- update an existing host's info failed HOT 2
- Windows agent update issue HOT 1
- Create/update host fail since the addition of ipmi variable HOT 8
- Windows - does not create a directory with psk files
- "No package matching 'zabbix-sender' is available" when using Debian repo HOT 3
- RHEL 7 broken with proxy option in repo
- Zabbix-agetnt repository weight for apt
- Install gpg key fails on Ubuntu 19.10 Eoan - 'dict object' has no attribute 'eoan'
- Shutting down dockerproject.org
- Move to https://github.com/ansible-collections/community.zabbix/issues HOT 27
- Doesn't support installing to Ubuntu Focal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-zabbix-agent.