diff --git a/playbooks/groups/releng-compose.yml b/playbooks/groups/releng-compose.yml index 0e6408e32b..83354bd8b9 100644 --- a/playbooks/groups/releng-compose.yml +++ b/playbooks/groups/releng-compose.yml @@ -29,7 +29,7 @@ - rkhunter - nagios_client - zabbix/zabbix_agent -# - zabbix/zabbix_templates + - zabbix/zabbix_templates - collectd/base - sudo - role: keytab/service diff --git a/roles/releng/tasks/main.yml b/roles/releng/tasks/main.yml index 4b3cfc279e..1982430f10 100644 --- a/roles/releng/tasks/main.yml +++ b/roles/releng/tasks/main.yml @@ -91,7 +91,6 @@ name: "rawhide" gid: 265 state: present - local: true # rawhide user 265 - name: add rawhide user @@ -103,7 +102,6 @@ create_home: false comment: "rawhide compose account" state: present - local: true - name: make a bunch of dirs file: state=directory path={{ item }} diff --git a/roles/zabbix/zabbix_templates/tasks/add_hosts_to_hostgroups.yml b/roles/zabbix/zabbix_templates/tasks/add_hosts_to_hostgroups.yml index 0336e864e9..cd4684e6f6 100644 --- a/roles/zabbix/zabbix_templates/tasks/add_hosts_to_hostgroups.yml +++ b/roles/zabbix/zabbix_templates/tasks/add_hosts_to_hostgroups.yml @@ -8,3 +8,12 @@ with_items: "{{ zabbix_templates }}" tags: - zabbix_add_hosts_to_hostgroups + vars: + 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:///zabbixeu diff --git a/roles/zabbix/zabbix_templates/tasks/add_templates_to_hosts.yml b/roles/zabbix/zabbix_templates/tasks/add_templates_to_hosts.yml index 19b5826858..60a4f2a736 100644 --- a/roles/zabbix/zabbix_templates/tasks/add_templates_to_hosts.yml +++ b/roles/zabbix/zabbix_templates/tasks/add_templates_to_hosts.yml @@ -8,3 +8,12 @@ with_items: "{{ zabbix_templates }}" tags: - zabbix_add_templates_to_hosts + vars: + 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:///zabbixeu diff --git a/roles/zabbix/zabbix_templates/tasks/hostgroups.yml b/roles/zabbix/zabbix_templates/tasks/hostgroups.yml index 78d6cf4148..f550e080cd 100644 --- a/roles/zabbix/zabbix_templates/tasks/hostgroups.yml +++ b/roles/zabbix/zabbix_templates/tasks/hostgroups.yml @@ -8,3 +8,12 @@ run_once: True tags: - zabbix_hostgroups + vars: + 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:///zabbixeu diff --git a/roles/zabbix/zabbix_templates/tasks/main.yml b/roles/zabbix/zabbix_templates/tasks/main.yml index c73f3624de..82603d1dcd 100644 --- a/roles/zabbix/zabbix_templates/tasks/main.yml +++ b/roles/zabbix/zabbix_templates/tasks/main.yml @@ -1,17 +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:///zabbixeu - - - include_tasks: hostgroups.yml tags: - zabbix_hostgroups diff --git a/roles/zabbix/zabbix_templates/tasks/templates.yml b/roles/zabbix/zabbix_templates/tasks/templates.yml index e094bb319f..1a36597a1d 100644 --- a/roles/zabbix/zabbix_templates/tasks/templates.yml +++ b/roles/zabbix/zabbix_templates/tasks/templates.yml @@ -19,3 +19,12 @@ with_items: "{{ zabbix_templates }}" # Templates specific to an ansible group, can be overwridden in inventory/group_vars/group_name tags: - zabbix_templates + vars: + 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:///zabbixeu