diff --git a/roles/agent/README.md b/roles/agent/README.md index cec1288..8a0d71a 100644 --- a/roles/agent/README.md +++ b/roles/agent/README.md @@ -14,6 +14,7 @@ Opinionated Zabbix agent installation | `radiorabe_zabbix_agent_server` | `monitoring.service.int.rabe.ch` | | `radiorabe_zabbix_agent_serveractive` | `monitoring.service.int.rabe.ch` | | `radiorabe_zabbix_agent_extra_allow_key` | `[]`, the role add some defaults that are sane for our case | +| `radiorabe_zabbix_agent_generate_cert` | `true` | ### Other Variables diff --git a/roles/agent/defaults/main.yml b/roles/agent/defaults/main.yml index 274a064..df37b9a 100644 --- a/roles/agent/defaults/main.yml +++ b/roles/agent/defaults/main.yml @@ -1,6 +1,7 @@ radiorabe_zabbix_agent_server: monitoring.service.int.rabe.ch radiorabe_zabbix_agent_serveractive: monitoring.service.int.rabe.ch radiorabe_zabbix_agent_extra_allow_key: [] +radiorabe_zabbix_agent_generate_cert: true _radiorabe_zabbix_agent_package_name: zabbix-agent2 _radiorabe_zabbix_agent_package_state: present diff --git a/roles/agent/tasks/main.yaml b/roles/agent/tasks/main.yaml index eb99603..8f7df99 100644 --- a/roles/agent/tasks/main.yaml +++ b/roles/agent/tasks/main.yaml @@ -24,6 +24,7 @@ principal: "zabbix/{{ foreman.foreman_fqdn }}@{{ radiorabe_core_int_hostname | upper }}" ansible.builtin.include_role: name: "{{ _radiorabe_zabbix_agent_certificate_rolename }}" + when: radiorabe_zabbix_agent_generate_cert tags: - role::rabe_zabbix.agent - role::rabe_zabbix.agent.certificates