Skip to content

Commit

Permalink
Set default psk value
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrodie18 committed Jun 22, 2024
1 parent bba9410 commit 11868db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/ZABBIX_AGENT_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ The following table lists all variables that are exposed to modify the configura
| StartAgents | zabbix_agent_startagents | 3 | Agent Only |
| StatusPort | zabbix_agent_statusport | 9999 | Agent 2 Only |
| Timeout | zabbix_agent_timeout | 3 | |
| TLSAccept | zabbix_agent_tlsconnect | | |
| TLSAccept | zabbix_agent_tlsconnect | unencrypted | Is overridden with `zabbix_agent_tlspsk_auto` == True |
| TLSCAFile | zabbix_agent_tlscafile | /etc/zabbix/tls_psk_auto.secret | |
| TLSCertFile | zabbix_agent_tlscertfile | | |
| TLSCipherAll | zabbix_agent_tlscipherall | | Agent on Linux Only |
Expand All @@ -339,7 +339,7 @@ The following table lists all variables that are exposed to modify the configura
| TLSCipherCert13 | zabbix_agent_tlsciphercert13 | | Agent on Linux Only |
| TLSCipherPSK | zabbix_agent_tlscipherpsk | | Agent on Linux Only |
| TLSCipherPSK13 | zabbix_agent_tlscipherpsk13 | | Agent on Linux Only |
| TLSConnect | zabbix_agent_tlsconnect | | |
| TLSConnect | zabbix_agent_tlsconnect | unencrypted | Is overridden with `zabbix_agent_tlspsk_auto` == True |
| TLSCRLFile | zabbix_agent_tlscrlfile | | |
| TLSKeyFile | zabbix_agent_tlskeyfile | | |
| TLSPSKFile | zabbix_agent_tlspskfile | | |
Expand Down
4 changes: 3 additions & 1 deletion roles/zabbix_agent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
zabbix_agent_pidfile: "{{ zabbix_agent_pidfile is defined | ternary(zabbix_agent_pidfile, _pidfile) }}"
zabbix_agent_service: "{{ zabbix_agent_service is defined | ternary(zabbix_agent_service, _agent_service) }}"
zabbix_agent_tls_subject: "{{ zabbix_agent_tls_subject is defined | ternary(zabbix_agent_tls_subject, _tls_subject) }}"
zabbix_agent_tlsaccept: "{{ zabbix_agent_tlsaccept is defined | ternary(zabbix_agent_tlsaccept, 'unencrypted')}}"
zabbix_agent_tlsconnect: "{{ zabbix_agent_tlsconnect is defined | ternary(zabbix_agent_tlsconnect, 'unencrypted')}}"

- name: Setting Zabbix API Server Port
ansible.builtin.set_fact:
Expand Down Expand Up @@ -61,7 +63,7 @@
- config

- name: Configure PSK
when: "zabbix_agent_tlsaccept == 'psk' or zabbix_agent_tlsconnect == 'psk'"
when: "( zabbix_agent_tlsaccept == 'psk' ) or (zabbix_agent_tlsconnect == 'psk')"
block:
- name: Gather PSK Secret Info
ansible.builtin.include_tasks: psk_secret.yml
Expand Down

0 comments on commit 11868db

Please sign in to comment.