#jinja2: lstrip_blocks: True {% for manager in wazuh_managers %}
{{ manager.address }}
{% if manager.port is defined %} {{ manager.port }} {% endif %} {% if manager.protocol is defined %} {{ manager.protocol }} {% endif %} {% if manager.max_retries is defined and manager.retry_interval is defined %} {{ manager.max_retries }} {{ manager.retry_interval }} {% endif %}
{% endfor %} {% if wazuh_profile_centos is not none or wazuh_profile_ubuntu is not none %} {% if ansible_distribution == 'CentOS' %} {{ wazuh_profile_centos }} {% elif ansible_distribution == "Ubuntu" %} {{ wazuh_profile_ubuntu }} {% endif %} {% endif %} {% if ansible_system == "Darwin" %} {{ wazuh_profile_macos }} {% endif %} {% if wazuh_notify_time is not none and wazuh_time_reconnect is not none %} {{ wazuh_notify_time }} {{ wazuh_time_reconnect }} {% endif %} {{ wazuh_auto_restart }} {{ wazuh_crypto_method }} {% if wazuh_agent_config.enrollment.enabled == 'yes' %} {{ wazuh_agent_config.enrollment.enabled }} {% if wazuh_agent_config.enrollment.manager_address | length > 0 %} {{ wazuh_agent_config.enrollment.manager_address }} {% endif %} {% if wazuh_agent_config.enrollment.agent_name | length > 0 %} {{ wazuh_agent_config.enrollment.agent_name }} {% endif %} {% if wazuh_agent_config.enrollment.port is defined > 0 %} {{ wazuh_agent_config.enrollment.port }} {% endif %} {% if wazuh_agent_config.enrollment.groups | length > 0 %} {{ wazuh_agent_config.enrollment.groups }} {% endif %} {% if wazuh_agent_config.enrollment.agent_address | length > 0 %} {{ wazuh_agent_config.enrollment.agent_address }} {% endif %} {% if wazuh_agent_config.enrollment.server_ca_path | length > 0 %} {{ wazuh_agent_config.enrollment.server_ca_path }} {% endif %} {% if wazuh_agent_config.enrollment.agent_certificate_path | length > 0 %} {{ wazuh_agent_config.enrollment.agent_certificate_path }} {% endif %} {% if wazuh_agent_config.enrollment.agent_key_path | length > 0 %} {{ wazuh_agent_config.enrollment.agent_key_path }} {% endif %} {% if wazuh_agent_config.enrollment.authorization_pass_path | length > 0 and ansible_system != "Darwin" %} {{ wazuh_agent_config.enrollment.authorization_pass_path }} {% else %} {{ wazuh_agent_config.enrollment.authorization_pass_path_macos }} {% endif %} {% if wazuh_agent_config.enrollment.auto_method | length > 0 %} {{ wazuh_agent_config.enrollment.auto_method }} {% endif %} {% if wazuh_agent_config.enrollment.delay_after_enrollment is defined > 0 %} {{ wazuh_agent_config.enrollment.delay_after_enrollment }} {% endif %} {% if wazuh_agent_config.enrollment.use_source_ip | length > 0 %} {{ wazuh_agent_config.enrollment.use_source_ip }} {% endif %} {% endif %}
{{ wazuh_agent_config.client_buffer.disable }} {{ wazuh_agent_config.client_buffer.queue_size }} {{ wazuh_agent_config.client_buffer.events_per_sec }} {% if wazuh_agent_config.rootcheck is defined %} no {% if ansible_system == "Linux" or ansible_system == "Darwin" %} yes yes yes yes yes yes yes {{ wazuh_agent_config.rootcheck.frequency }} {% if ansible_system == "Darwin" %} etc/shared/rootkit_files.txt etc/shared/rootkit_trojans.txt {% else %} {{ wazuh_dir }}/etc/shared/rootkit_files.txt {{ wazuh_dir }}/etc/shared/rootkit_trojans.txt {% endif %} yes {% endif %} {% if ansible_os_family == "Windows" %} ./shared/win_applications_rcl.txt ./shared/win_malware_rcl.txt {% endif %} {% endif %} {% if ansible_system == "Linux" and wazuh_agent_config.openscap.disable == 'no' %} {{ wazuh_agent_config.openscap.disable }} {{ wazuh_agent_config.openscap.timeout }} {{ wazuh_agent_config.openscap.interval }} {{ wazuh_agent_config.openscap.scan_on_start }} {% if ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'xenial' %} xccdf_org.ssgproject.content_profile_common {% elif ansible_distribution == 'Debian' %} {% if ansible_distribution_release == 'jessie' %} {% if openscap_version_valid.stdout == "0" %} xccdf_org.ssgproject.content_profile_common {% endif %} {% elif ansible_distribution_release == 'stretch' %} {% endif %} {% elif ansible_distribution == 'CentOS' %} {% if ansible_distribution_major_version == '8' %} {# Policy not available #} {% elif ansible_distribution_major_version == '7' %} xccdf_org.ssgproject.content_profile_pci-dss xccdf_org.ssgproject.content_profile_common {% elif ansible_distribution_major_version == '6' %} xccdf_org.ssgproject.content_profile_pci-dss xccdf_org.ssgproject.content_profile_common {% endif %} {% elif ansible_distribution == 'RedHat' %} {% if ansible_distribution_major_version == '8' %} {# Policy not available #} {% elif ansible_distribution_major_version == '7' %} xccdf_org.ssgproject.content_profile_pci-dss xccdf_org.ssgproject.content_profile_common {% elif ansible_distribution_major_version == '6' %} xccdf_org.ssgproject.content_profile_pci-dss xccdf_org.ssgproject.content_profile_common {% endif %} {% if ansible_distribution_major_version == '7' %} {% elif ansible_distribution_major_version == '6' %} {% endif %} {% elif ansible_distribution == 'Fedora' %} xccdf_org.ssgproject.content_profile_pci-dss xccdf_org.ssgproject.content_profile_common {% endif %} {% endif %} {% if ansible_system != "Darwin" %} {{ wazuh_agent_config.cis_cat.disable }} {{ wazuh_agent_config.cis_cat.timeout }} {{ wazuh_agent_config.cis_cat.interval }} {{ wazuh_agent_config.cis_cat.scan_on_start }} {% if wazuh_agent_config.cis_cat.install_java == 'yes' and ansible_system == "Linux" %} /usr/bin {% elif ansible_os_family == "Windows" %} {{ wazuh_agent_config.cis_cat.java_path_win }} {% else %} {{ wazuh_agent_config.cis_cat.java_path }} {% endif %} {% if ansible_os_family == "Windows" %}{{ wazuh_agent_config.cis_cat.ciscat_path_win }}{% else %}{{ wazuh_agent_config.cis_cat.ciscat_path }}{% endif %} {% endif %} {{ wazuh_agent_config.osquery.disable }} {{ wazuh_agent_config.osquery.run_daemon }} {% if ansible_os_family == "Windows" %} {{ wazuh_agent_config.osquery.bin_path_win }} {% endif %} {% if ansible_os_family == "Windows" %}{{ wazuh_agent_config.osquery.log_path_win }}{% else %}{{ wazuh_agent_config.osquery.log_path }}{% endif %} {% if ansible_os_family == "Windows" %}{{ wazuh_agent_config.osquery.config_path_win }}{% else %}{{ wazuh_agent_config.osquery.config_path }}{% endif %} {{ wazuh_agent_config.osquery.add_labels }} {{ wazuh_agent_config.syscollector.disable }} {{ wazuh_agent_config.syscollector.interval }} {{ wazuh_agent_config.syscollector.scan_on_start }} {{ wazuh_agent_config.syscollector.hardware }} {{ wazuh_agent_config.syscollector.os }} {{ wazuh_agent_config.syscollector.network }} {{ wazuh_agent_config.syscollector.packages }} {{ wazuh_agent_config.syscollector.ports_no }} {{ wazuh_agent_config.syscollector.processes }} {% if wazuh_agent_config.sca.enabled | length > 0 %} {{ wazuh_agent_config.sca.enabled }} {% endif %} {% if wazuh_agent_config.sca.scan_on_start | length > 0 %} {{ wazuh_agent_config.sca.scan_on_start }} {% endif %} {% if wazuh_agent_config.sca.interval | length > 0 %} {{ wazuh_agent_config.sca.interval }} {% endif %} {% if wazuh_agent_config.sca.skip_nfs | length > 0 %} yes {% endif %} {% if wazuh_agent_config.sca.day | length > 0 %} {{ wazuh_agent_config.sca.day }} {% endif %} {% if wazuh_agent_config.sca.wday | length > 0 %} {{ wazuh_agent_config.sca.wday }} {% endif %} {% if wazuh_agent_config.sca.time | length > 0 %} {% endif %} {% if wazuh_agent_config.syscheck is defined %} no {{ wazuh_agent_config.syscheck.frequency }} {% if ansible_system == "Linux" or ansible_system == "Darwin" %} {{ wazuh_agent_config.syscheck.scan_on_start }} {% if wazuh_agent_config.syscheck.directories is defined and ansible_system == "Linux" %} {% for directory in wazuh_agent_config.syscheck.directories %} {{ directory.dirs }} {% endfor %} {% elif ansible_system == "Darwin" %} {% for directory in wazuh_agent_config.syscheck.macos_directories %} {{ directory.dirs }} {% endfor %} {% endif %} {% endif %} {% endif %} {% if wazuh_agent_config.syscheck.win_directories is defined and ansible_os_family == "Windows" %} {% for directory in wazuh_agent_config.syscheck.win_directories %} {{ directory.dirs }} {% endfor %} {% endif %} {% if wazuh_agent_config.syscheck.ignore is defined and (ansible_system == "Linux" or ansible_system == "Darwin") %} {% for ignore in wazuh_agent_config.syscheck.ignore %} {{ ignore }} {% endfor %} {% endif %} {% if wazuh_agent_config.syscheck.ignore_linux_type is defined %} {% for ignore in wazuh_agent_config.syscheck.ignore_linux_type %} {{ ignore }} {% endfor %} {% endif %} {% if wazuh_agent_config.syscheck.ignore is defined and ansible_os_family == "Windows" %} {% for ignore in wazuh_agent_config.syscheck.ignore_win %} {{ ignore }} {% endfor %} {% endif %} {% if ansible_system == "Linux" or ansible_system == "Darwin" %} {% for no_diff in wazuh_agent_config.syscheck.no_diff %} {{ no_diff }} {% endfor %} {{ wazuh_agent_config.syscheck.skip_nfs }} {{ wazuh_agent_config.syscheck.skip_dev }} {{ wazuh_agent_config.syscheck.skip_proc }} {{ wazuh_agent_config.syscheck.skip_sys }} {% endif %} {% if ansible_os_family == "Windows" %} {% for registry_key in wazuh_agent_config.syscheck.windows_registry %} {% if registry_key.arch is defined %} {{ registry_key.key }} {% else %} {{ registry_key.key }} {% endif %} {% endfor %} {% endif %} {% if ansible_os_family == "Windows" %} {% for registry_key in wazuh_agent_config.syscheck.windows_registry_ignore %} {% if registry_key.type is defined %} {{ registry_key.key }} {% else %} {{ registry_key.key }} {% endif %} {% endfor %} {% endif %} {% if ansible_os_family == "Windows" %} {{ wazuh_agent_config.syscheck.win_audit_interval }} {% endif %} {{ wazuh_agent_config.syscheck.process_priority }} {{ wazuh_agent_config.syscheck.max_eps }} {{ wazuh_agent_config.syscheck.sync_enabled }} {{ wazuh_agent_config.syscheck.sync_interval }} {{ wazuh_agent_config.syscheck.sync_max_interval }} {{ wazuh_agent_config.syscheck.sync_max_eps }} {% endif %} {% if ansible_system == "Linux" %} {% for localfile in wazuh_agent_config.localfiles.linux %} {{ localfile.format }} {% if localfile.format == 'command' or localfile.format == 'full_command' %} {{ localfile.command }} {{ localfile.frequency }} {% if localfile.alias is defined %} {{ localfile.alias }} {% endif %} {% else %} {{ localfile.location }} {% if localfile.format == 'json' %} {% for label in localfile.label %} {% endfor %} {% endif %} {% endif %} {% endfor %} {% endif %} {% if ansible_system == "Darwin" %} {% for localfile in wazuh_agent_config.localfiles.macos %} {{ localfile.format }} {% if localfile.format == 'command' or localfile.format == 'full_command' %} {{ localfile.command }} {{ localfile.frequency }} {% if localfile.alias is defined %} {{ localfile.alias }} {% endif %} {% else %} {{ localfile.location }} {% if localfile.format == 'macos' %} {{ localfile.query.value }} {% endif %} {% endif %} {% endfor %} {% endif %} {% if ansible_os_family == "Debian" %} {% for localfile in wazuh_agent_config.localfiles.debian %} {{ localfile.format }} {% if localfile.format == 'command' or localfile.format == 'full_command' %} {{ localfile.command }} {{ localfile.frequency }} {% if localfile.alias is defined %} {{ localfile.alias }} {% endif %} {% else %} {{ localfile.location }} {% if localfile.format == 'json' %} {% for label in localfile.label %} {% endfor %} {% endif %} {% endif %} {% endfor %} {% endif %} {% if ansible_os_family == "RedHat" %} {% for localfile in wazuh_agent_config.localfiles.centos %} {{ localfile.format }} {% if localfile.format == 'command' or localfile.format == 'full_command' %} {{ localfile.command }} {{ localfile.frequency }} {% if localfile.alias is defined %} {{ localfile.alias }} {% endif %} {% else %} {{ localfile.location }} {% if localfile.format == 'json' %} {% for label in localfile.label %} {% endfor %} {% endif %} {% endif %} {% endfor %} {% endif %} {% if ansible_os_family == "Windows" %} {% for localfile in wazuh_agent_config.localfiles.windows %} {{ localfile.format }} {% if localfile.format == 'eventchannel' %} {{ localfile.location }} {{ localfile.query}} {% else %} {{ localfile.location }} {% if localfile.format == 'json' %} {% for label in localfile.label %} {% endfor %} {% endif %} {% endif %} {% endfor %} {% endif %} {% if wazuh_agent_config.labels.enable == true %} {% for label in wazuh_agent_config.labels.list %} {% endfor %} {% endif %} {{ wazuh_agent_config.active_response.ar_disabled|default('no') }} {% if ansible_os_family == "Windows" %}{{ wazuh_agent_config.active_response.ca_store_win }} {% else %} {% if ansible_system == "Darwin" %}{{ wazuh_agent_config.active_response.ca_store_macos }} {% else %} {{ wazuh_agent_config.active_response.ca_store }} {% endif %} {% endif %} {{ wazuh_agent_config.active_response.ca_verification }} {{ wazuh_agent_config.log_format }}