cleanup: move redundant tags to the outer block

This commit is contained in:
singuliere 2019-01-10 10:01:06 +01:00
parent 9327f052de
commit d33b5c90c3
No known key found for this signature in database
GPG Key ID: 900857755EF189C2

View File

@ -23,9 +23,6 @@
- name: Retrieving authd Credentials - name: Retrieving authd Credentials
include_vars: authd_pass.yml include_vars: authd_pass.yml
tags:
- config
- authd
- name: Copy CA, SSL key and cert for authd - name: Copy CA, SSL key and cert for authd
copy: copy:
@ -36,9 +33,6 @@
- "{{ wazuh_agent_authd.ssl_agent_ca }}" - "{{ wazuh_agent_authd.ssl_agent_ca }}"
- "{{ wazuh_agent_authd.ssl_agent_cert }}" - "{{ wazuh_agent_authd.ssl_agent_cert }}"
- "{{ wazuh_agent_authd.ssl_agent_key }}" - "{{ wazuh_agent_authd.ssl_agent_key }}"
tags:
- config
- authd
when: when:
- wazuh_agent_authd.ssl_agent_ca is not none - wazuh_agent_authd.ssl_agent_ca is not none
@ -58,29 +52,23 @@
when: when:
- check_keys.stat.exists == false or check_keys.stat.size == 0 - check_keys.stat.exists == false or check_keys.stat.size == 0
- wazuh_managers.0.address is not none - wazuh_managers.0.address is not none
tags:
- config
- authd
- name: Linux | Verify agent registration - name: Linux | Verify agent registration
shell: echo {{ agent_auth_output }} | grep "Valid key created" shell: echo {{ agent_auth_output }} | grep "Valid key created"
when: when:
- check_keys.stat.exists == false or check_keys.stat.size == 0 - check_keys.stat.exists == false or check_keys.stat.size == 0
- wazuh_managers.0.address is not none - wazuh_managers.0.address is not none
tags:
- config
- authd
when: wazuh_agent_authd.enable == true when: wazuh_agent_authd.enable == true
tags:
- config
- authd
- name: Linux | Agent registration via rest-API - name: Linux | Agent registration via rest-API
block: block:
- name: Retrieving rest-API Credentials - name: Retrieving rest-API Credentials
include_vars: api_pass.yml include_vars: api_pass.yml
tags:
- config
- api
- name: Linux | Create the agent key via rest-API - name: Linux | Create the agent key via rest-API
uri: uri:
@ -100,9 +88,6 @@
- check_keys.stat.exists == false or check_keys.stat.size == 0 - check_keys.stat.exists == false or check_keys.stat.size == 0
- wazuh_managers.0.address is not none - wazuh_managers.0.address is not none
become: no become: no
tags:
- config
- api
- name: Linux | Retieve new agent data via rest-API - name: Linux | Retieve new agent data via rest-API
uri: uri:
@ -119,9 +104,6 @@
register: newagentdata_api register: newagentdata_api
delegate_to: localhost delegate_to: localhost
become: no become: no
tags:
- config
- api
- name: Linux | Register agent (via rest-API) - name: Linux | Register agent (via rest-API)
command: /var/ossec/bin/manage_agents command: /var/ossec/bin/manage_agents
@ -137,12 +119,12 @@
- check_keys.stat.exists == false or check_keys.stat.size == 0 - check_keys.stat.exists == false or check_keys.stat.size == 0
- wazuh_managers.0.address is not none - wazuh_managers.0.address is not none
- newagent_api.changed - newagent_api.changed
tags:
- config
- api
notify: restart wazuh-agent notify: restart wazuh-agent
when: wazuh_agent_authd.enable == false when: wazuh_agent_authd.enable == false
tags:
- config
- api
- name: Linux | Vuls integration deploy (runs in background, can take a while) - 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 }} command: /var/ossec/wodles/vuls/deploy_vuls.sh {{ ansible_distribution|lower }} {{ ansible_distribution_major_version|int }}