Merge pull request #133 from singuliere/agent-cleanup
cleanup: move redundant tags to the outer block
This commit is contained in:
commit
492c25eeaf
@ -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
|
||||
|
||||
@ -61,29 +55,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:
|
||||
@ -105,9 +93,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:
|
||||
@ -124,9 +109,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
|
||||
@ -142,12 +124,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 }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user