Skip to content

Commit

Permalink
Fixed PSK Logic
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrodie18 committed Jun 19, 2024
1 parent 45ed88b commit 4061a06
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/1297.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- Agent Role - Fixed logic problem that would break if anything other than PSK was used.
22 changes: 16 additions & 6 deletions roles/zabbix_agent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@
when:
- not (zabbix_agent_docker | bool)

- name: Gather PSK Secret Info
ansible.builtin.include_tasks: psk_secret.yml

- name: Gather PSK Identity Info
ansible.builtin.include_tasks: psk_identity.yml

- name: AutoPSK | Default tlsaccept and tlsconnect to enforce PSK
ansible.builtin.set_fact:
zabbix_agent_tlsaccept: psk
Expand All @@ -66,6 +60,22 @@
tags:
- config

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

- name: Gather PSK Identity Info
ansible.builtin.include_tasks: psk_identity.yml

- name: "Configure Agent"
ansible.builtin.include_tasks: Windows_conf.yml
when:
- ansible_os_family == "Windows"
tags:
- config

- name: "Configure Agent"
ansible.builtin.include_tasks: Windows_conf.yml
when:
Expand Down

0 comments on commit 4061a06

Please sign in to comment.