From d33b5c90c39ed3336d74558c4fe6d5a60375a703 Mon Sep 17 00:00:00 2001 From: singuliere Date: Thu, 10 Jan 2019 10:01:06 +0100 Subject: [PATCH] cleanup: move redundant tags to the outer block --- .../wazuh/ansible-wazuh-agent/tasks/Linux.yml | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml b/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml index 2d17fb16..e5bc394a 100644 --- a/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml +++ b/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml @@ -23,9 +23,6 @@ - name: Retrieving authd Credentials include_vars: authd_pass.yml - tags: - - config - - authd - name: Copy CA, SSL key and cert for authd copy: @@ -36,9 +33,6 @@ - "{{ wazuh_agent_authd.ssl_agent_ca }}" - "{{ wazuh_agent_authd.ssl_agent_cert }}" - "{{ wazuh_agent_authd.ssl_agent_key }}" - tags: - - config - - authd when: - wazuh_agent_authd.ssl_agent_ca is not none @@ -58,29 +52,23 @@ when: - check_keys.stat.exists == false or check_keys.stat.size == 0 - wazuh_managers.0.address is not none - tags: - - config - - authd - name: Linux | Verify agent registration shell: echo {{ agent_auth_output }} | grep "Valid key created" when: - check_keys.stat.exists == false or check_keys.stat.size == 0 - wazuh_managers.0.address is not none - tags: - - config - - authd when: wazuh_agent_authd.enable == true + tags: + - config + - authd - name: Linux | Agent registration via rest-API block: - name: Retrieving rest-API Credentials include_vars: api_pass.yml - tags: - - config - - api - name: Linux | Create the agent key via rest-API uri: @@ -100,9 +88,6 @@ - check_keys.stat.exists == false or check_keys.stat.size == 0 - wazuh_managers.0.address is not none become: no - tags: - - config - - api - name: Linux | Retieve new agent data via rest-API uri: @@ -119,9 +104,6 @@ register: newagentdata_api delegate_to: localhost become: no - tags: - - config - - api - name: Linux | Register agent (via rest-API) command: /var/ossec/bin/manage_agents @@ -137,12 +119,12 @@ - check_keys.stat.exists == false or check_keys.stat.size == 0 - wazuh_managers.0.address is not none - newagent_api.changed - tags: - - config - - api notify: restart wazuh-agent when: wazuh_agent_authd.enable == false + tags: + - config + - api - name: Linux | Vuls integration deploy (runs in background, can take a while) command: /var/ossec/wodles/vuls/deploy_vuls.sh {{ ansible_distribution|lower }} {{ ansible_distribution_major_version|int }}