Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Dmitriev committed Nov 23, 2024
1 parent 0ce31b0 commit 36221f3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
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

0 comments on commit 36221f3

Please sign in to comment.