Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix https://github.com/ansible-collections/community.zabbix/issues/1410 #1425

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions roles/zabbix_agent/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ zabbix_api_use_ssl: false
zabbix_api_login_pass: !unsafe zabbix
zabbix_api_validate_certs: false
ansible_httpapi_pass: "{{ zabbix_api_login_pass }}"
ansible_httpapi_port: "{{ zabbix_api_server_port }}"
ansible_httpapi_validate_certs: "{{ zabbix_api_validate_certs }}"
ansible_httpapi_port: "{{ hostvars[inventory_hostname]['zabbix_api_server_port'] }}"
ansible_httpapi_validate_certs: "{{ hostvars[inventory_hostname]['zabbix_api_validate_certs'] }}"

# API Related Variables
zabbix_api_create_hostgroup: false
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_agent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
vars:
gather_facts: false
ansible_user: "{{ zabbix_api_login_user }}"
ansible_httpapi_use_ssl: "{{ zabbix_api_use_ssl }}"
ansible_httpapi_use_ssl: "{{ hostvars[inventory_hostname]['zabbix_api_use_ssl'] }}"
ansible_network_os: community.zabbix.zabbix
ansible_connection: httpapi
# Can't think of a way to make http_login_* vars be undefined -(
Expand Down
4 changes: 2 additions & 2 deletions roles/zabbix_proxy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ zabbix_api_login_user: Admin
zabbix_api_login_pass: !unsafe zabbix
zabbix_api_validate_certs: false
ansible_httpapi_pass: "{{ zabbix_api_login_pass }}"
ansible_httpapi_port: "{{ zabbix_api_server_port }}"
ansible_httpapi_validate_certs: "{{ zabbix_api_validate_certs }}"
ansible_httpapi_port: "{{ hostvars[inventory_hostname]['zabbix_api_server_port'] }}"
ansible_httpapi_validate_certs: "{{ hostvars[inventory_hostname]['zabbix_api_validate_certs'] }}"
zabbix_api_timeout: 30
zabbix_api_create_proxy: false
zabbix_proxy_state: present
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_proxy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
ansible_user: "{{ zabbix_api_login_user }}"
ansible_network_os: community.zabbix.zabbix
ansible_connection: httpapi
ansible_httpapi_use_ssl: "{{ zabbix_api_use_ssl }}"
ansible_httpapi_use_ssl: "{{ hostvars[inventory_hostname]['zabbix_api_use_ssl'] }}"
http_login_user: "{{ zabbix_api_http_user | default(-42) }}"
http_login_password: "{{ zabbix_api_http_password | default(-42) }}"
community.zabbix.zabbix_proxy:
Expand Down