zabbix: set releng_compose_stg zabbix_templates to empty list
add zabbix hostgroup create task Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
This commit is contained in:
parent
1c2b21cfb6
commit
bf5dcd8edb
5 changed files with 27 additions and 14 deletions
|
@ -54,4 +54,6 @@ num_cpus: 16
|
|||
primary_auth_source: ipa
|
||||
virt_install_command: "{{ virt_install_command_two_nic_unsafe }}"
|
||||
zabbix_templates:
|
||||
- zabbix_templates/releng_compose_cronjobs.json
|
||||
- "zabbix_templates/releng_compose_cronjobs.json"
|
||||
zabbix_hostgroups:
|
||||
- "fedora releng compose"
|
||||
|
|
|
@ -11,4 +11,5 @@ koji_weburl: "https://koji.stg.fedoraproject.org/koji"
|
|||
mem_size: 8192
|
||||
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,sec=sys,nfsvers=3"
|
||||
num_cpus: 4
|
||||
zabbix_templates: "{{ default([]) }}"
|
||||
zabbix_templates: "{{ [] }}"
|
||||
zabbix_hostgroups: "{{ [] }}"
|
||||
|
|
9
roles/zabbix/zabbix_templates/tasks/hostgroups.yml
Normal file
9
roles/zabbix/zabbix_templates/tasks/hostgroups.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
- name: Create host groups
|
||||
# set task level variables as we change ansible_connection plugin here
|
||||
community.zabbix.zabbix_group:
|
||||
state: present
|
||||
host_groups: "{{ item }}"
|
||||
with_items: "{{ zabbix_hostgroups }}" # Hostgroups specific to an ansible group can be overridden in inventory/group_vars/group_name
|
||||
tags:
|
||||
- zabbix_hostgroups
|
|
@ -1,4 +1,17 @@
|
|||
---
|
||||
- name: Set API token
|
||||
tags: always
|
||||
set_fact:
|
||||
ansible_zabbix_auth_key: "{{ (env == 'staging')|ternary(zabbix_stg_apikey, zabbix_apikey) }}"
|
||||
ansible_network_os: community.zabbix.zabbix
|
||||
ansible_connection: httpapi
|
||||
ansible_httpapi_port: 443
|
||||
ansible_httpapi_use_ssl: true
|
||||
ansible_httpapi_validate_certs: false
|
||||
ansible_host: "{{ (env == 'staging')|ternary(zabbix_stg_hostname, zabbix_hostname) }}"
|
||||
ansible_zabbix_url_path: "" # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu
|
||||
|
||||
|
||||
- include_tasks: templates.yml
|
||||
tags:
|
||||
- zabbix_templates
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
---
|
||||
- name: Set API token
|
||||
tags: always
|
||||
set_fact:
|
||||
ansible_zabbix_auth_key: "{{ (env == 'staging')|ternary(zabbix_stg_apikey, zabbix_apikey) }}"
|
||||
ansible_network_os: community.zabbix.zabbix
|
||||
ansible_connection: httpapi
|
||||
ansible_httpapi_port: 443
|
||||
ansible_httpapi_use_ssl: true
|
||||
ansible_httpapi_validate_certs: false
|
||||
ansible_host: "{{ (env == 'staging')|ternary(zabbix_stg_hostname, zabbix_hostname) }}"
|
||||
ansible_zabbix_url_path: "" # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu
|
||||
|
||||
#- name: Get Zabbix template as JSON
|
||||
# community.zabbix.zabbix_template_info:
|
||||
# template_name: fedora releng compose cronjobs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue