Merge pull request #361 from wazuh/feature-359-agent-auth-groups
Add the option to create agent groups and add an agent to 1 or more group
This commit is contained in:
commit
5037ea8695
@ -47,6 +47,7 @@ wazuh_agent_authd:
|
|||||||
enable: false
|
enable: false
|
||||||
port: 1515
|
port: 1515
|
||||||
agent_name: null
|
agent_name: null
|
||||||
|
groups: []
|
||||||
ssl_agent_ca: null
|
ssl_agent_ca: null
|
||||||
ssl_agent_cert: null
|
ssl_agent_cert: null
|
||||||
ssl_agent_key: null
|
ssl_agent_key: null
|
||||||
|
|||||||
@ -82,6 +82,9 @@
|
|||||||
-k "/var/ossec/etc/{{ wazuh_agent_authd.ssl_agent_key | basename }}"
|
-k "/var/ossec/etc/{{ wazuh_agent_authd.ssl_agent_key | basename }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if wazuh_agent_authd.ssl_auto_negotiate == 'yes' %} -a {% endif %}
|
{% if wazuh_agent_authd.ssl_auto_negotiate == 'yes' %} -a {% endif %}
|
||||||
|
{% if wazuh_agent_authd.groups is defined and wazuh_agent_authd.groups | length > 0 %}
|
||||||
|
-G "{{ wazuh_agent_authd.groups | join(',') }}"
|
||||||
|
{% endif %}
|
||||||
register: agent_auth_output
|
register: agent_auth_output
|
||||||
notify: restart wazuh-agent
|
notify: restart wazuh-agent
|
||||||
vars:
|
vars:
|
||||||
|
|||||||
@ -409,3 +409,5 @@ nodejs:
|
|||||||
debian: "deb"
|
debian: "deb"
|
||||||
redhat: "rpm"
|
redhat: "rpm"
|
||||||
repo_url_ext: "nodesource.com/setup_10.x"
|
repo_url_ext: "nodesource.com/setup_10.x"
|
||||||
|
|
||||||
|
agent_groups: [] # groups to create
|
||||||
|
|||||||
@ -351,6 +351,14 @@
|
|||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
|
||||||
|
- name: Create agent groups
|
||||||
|
command: "/var/ossec/bin/agent_groups -a -g {{ item }} -q"
|
||||||
|
with_items:
|
||||||
|
- "{{ agent_groups }}"
|
||||||
|
when:
|
||||||
|
- ( agent_groups is defined) and ( agent_groups|length > 0)
|
||||||
|
tags: molecule-idempotence-notest
|
||||||
|
|
||||||
- include_tasks: "RMRedHat.yml"
|
- include_tasks: "RMRedHat.yml"
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == "RedHat" or ansible_os_family == "Amazon"
|
- ansible_os_family == "RedHat" or ansible_os_family == "Amazon"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user