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

/var/ossec/etc/ossec.conf and Ansible community.general.xml #2102

Open
fcorneli opened this issue Nov 20, 2023 · 0 comments
Open

/var/ossec/etc/ossec.conf and Ansible community.general.xml #2102

fcorneli opened this issue Nov 20, 2023 · 0 comments

Comments

@fcorneli
Copy link

When provisioning OSSEC via Ansible using the community.general.xml module, this module adds

<?xml version="1.0" encoding="utf-8"?>

on top of the -what should be- XML configuration file.
However, the OSSEC XML parser fails on this.

Right now I have to apply the following rather painful work-around (CentOS 7):

- name: Install required tools
  ansible.builtin.package:
    name: "{{ item }}"
    state: present
  with_items:
    - libxml2
    - epel-release
    - moreutils
- name: Sanitize ossec.conf
  ansible.builtin.shell: set -o pipefail && /usr/bin/xmllint -c14n /var/ossec/etc/ossec-server.conf | /usr/bin/sponge /var/ossec/etc/ossec-server.conf

Could the OSSEC XML config parser be fixed to simply ignore such XML declarations?

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

No branches or pull requests

1 participant