Skip to content

Suspected bug: "Enable Ingest Pipelines" task not working due to impossible redirect #198

Closed
@Donien

Description

@Donien

Within roles/beats/tasks/filebeat.yml there is the following task:

    - name: Enable Ingest Pipelines
      command: >
        /usr/bin/filebeat setup --pipelines &&
        /usr/bin/filebeat version > /etc/filebeat/{{ item }}_pipeline_created
      args:
        creates: "/etc/filebeat/{{ item }}_pipeline_created"
      with_items: "{{ beats_filebeat_modules }}"
      notify:
        - Restart Filebeat
      changed_when: false

It uses the command module. Within its shell command a redirect is used (>).
This leads to a problem: The redirect into the file does not work using the command module since no actual shell is used.
It does however work using the shell module. We can even keep the creates argument, making this a pretty simple fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions