Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct re-register of filebeat_module_folder #1076

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MoteHue
Copy link

@MoteHue MoteHue commented Oct 12, 2023

The variable filebeat_module_folder was re-registered as its stat output, leading to an incorrect filepath being used later on.

[wazuh-host ~]$ ls
'{'\''changed'\'': False, '\''stat'\'': {'\''exists'\'': False}, '\''failed'\'': False}'

To illustrate, I added some debug outputs:

- name: Debug 1
  debug:
    msg: "{{ filebeat_module_folder }}"
- name: Checking if Filebeat Module folder file exists
  stat:
    path: "{{ filebeat_module_folder }}"
  register: filebeat_module_folder
- name: Debug 2
  debug:
    msg: "{{ filebeat_module_folder }}"
TASK [<ommitted>/ansible/roles/wazuh-ansible/wazuh-ansible/roles/wazuh/ansible-filebeat-oss : Debug 1] *****************************************************************************************
Thursday 12 October 2023  10:48:46 +0000 (0:00:00.067)       0:01:28.481 ******                                                                                                                                                                
ok: [ommitted] =>                                                                                                
  msg: /usr/share/filebeat/module/wazuh

TASK [<ommitted>/ansible/roles/wazuh-ansible/wazuh-ansible/roles/wazuh/ansible-filebeat-oss : Checking if Filebeat Module folder file exists] **************************************************
Thursday 12 October 2023  10:48:46 +0000 (0:00:00.073)       0:01:28.554 ****** 
ok: [ommitted]

TASK [<ommitted>/ansible/roles/wazuh-ansible/wazuh-ansible/roles/wazuh/ansible-filebeat-oss : Debug 2] *****************************************************************************************
Thursday 12 October 2023  10:48:47 +0000 (0:00:00.343)       0:01:28.898 ****** 
ok: [ommitted] => 
  msg:
    changed: false                                                                                                                                                                                                                             
    failed: false                                                                                                      
    stat:                 
      exists: false

The variable ``filebeat_module_folder`` was re-registered as its
stat output, leading to an incorrect filepath being used later on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant