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

Ansible Collection Creation #855

Closed
wants to merge 88 commits into from
Closed

Ansible Collection Creation #855

wants to merge 88 commits into from

Conversation

darkdecoy
Copy link

  • Reorganize into an ansible collection
  • Fixes errors and warnings from ansible-lint and ansible-test
  • Add bash script for generating certificates into the collection rather than downloading it at run time
  • Fix issue with script when the working directory path has a space in it
  • Added missing dependency for Almalinux 9
  • Updated/Created documentation for roles, playbooks and collections
  • Fixed issue with having to set query for windows log format eventchannel

atcommander added 30 commits October 17, 2022 21:49
WARNING  Listing 41 violation(s) that are fatal
../roles/indexer/tasks/Debian.yml:1: yaml too many blank lines (1 > 0) (empty-lines)
../roles/indexer/tasks/Debian.yml:6: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/Debian.yml:31: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/Debian.yml:38: yaml no new line character at the end of file (new-line-at-end-of-file)
../roles/indexer/tasks/RedHat.yml:15: yaml too many blank lines (3 > 2) (empty-lines)
../roles/indexer/tasks/RedHat.yml:23: risky-file-permissions File permissions unset or incorrect
../roles/indexer/tasks/RedHat.yml:29: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/RedHat.yml:33: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/RedHat.yml:43: yaml wrong indentation: expected 8 but found 6 (indentation)
../roles/indexer/tasks/RedHat.yml:54: yaml wrong indentation: expected 4 but found 2 (indentation)
../roles/indexer/tasks/local_actions.yml:7: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/local_actions.yml:14: yaml wrong indentation: expected 4 but found 2 (indentation)
../roles/indexer/tasks/local_actions.yml:44: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/main.yml:6: unnamed-task All tasks should be named
../roles/indexer/tasks/main.yml:9: unnamed-task All tasks should be named
../roles/indexer/tasks/main.yml:48: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/main.yml:63: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/main.yml:72: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/main.yml:98: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/main.yml:100: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/main.yml:117: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/main.yml:119: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/main.yml:137: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/security_actions.yml:49: yaml wrong indentation: expected 4 but found 2 (indentation)
../roles/indexer/tasks/security_actions.yml:55: yaml trailing spaces (trailing-spaces)
../roles/indexer/tasks/security_actions.yml:63: yaml trailing spaces (trailing-spaces)
../roles/indexer/tasks/security_actions.yml:71: yaml trailing spaces (trailing-spaces)
../roles/indexer/tasks/security_actions.yml:79: yaml trailing spaces (trailing-spaces)
../roles/indexer/tasks/security_actions.yml:111: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/security_actions.yml:113: yaml truthy value should be one of  (truthy)
../roles/indexer/tasks/security_actions.yml:118: yaml too many blank lines (2 > 0) (empty-lines)
install-indexer.yml:5: yaml too many blank lines (1 > 0) (empty-lines)
WARNING  Listing 9 violation(s) that are fatal
../roles/filebeat/defaults/main.yml:29: yaml no new line character at the end of file (new-line-at-end-of-file)
../roles/filebeat/tasks/config.yml:22: yaml wrong indentation: expected 4 but found 2 (indentation)
../roles/filebeat/tasks/main.yml:14: yaml wrong indentation: expected 4 but found 2 (indentation)
../roles/filebeat/tasks/main.yml:24: yaml wrong indentation: expected 4 but found 2 (indentation)
../roles/filebeat/tasks/main.yml:43: yaml truthy value should be one of  (truthy)
../roles/filebeat/tasks/security_actions.yml:11: risky-octal Octal file permissions must contain leading zero or be a string
../roles/filebeat/tasks/security_actions.yml:24: yaml wrong indentation: expected 4 but found 2 (indentation)
../roles/filebeat/tasks/security_actions.yml:26: yaml wrong indentation: expected 4 but found 2 (indentation)
../roles/manager/defaults/main.yml:277: yaml line too long (255 > 160 characters) (line-length)
WARNING  Listing 23 violation(s) that are fatal
../roles/manager/defaults/main.yml:277: yaml line too long (255 > 160 characters) (line-length)
../roles/manager/defaults/main.yml:378: yaml truthy value should be one of  (truthy)
../roles/manager/defaults/main.yml:379: yaml truthy value should be one of  (truthy)
../roles/manager/defaults/main.yml:382: yaml truthy value should be one of  (truthy)
../roles/manager/defaults/main.yml:386: yaml truthy value should be one of  (truthy)
../roles/manager/defaults/main.yml:390: yaml truthy value should be one of  (truthy)
../roles/manager/defaults/main.yml:391: yaml truthy value should be one of  (truthy)
../roles/manager/defaults/main.yml:396: yaml truthy value should be one of  (truthy)
../roles/manager/defaults/main.yml:397: yaml truthy value should be one of  (truthy)
../roles/manager/defaults/main.yml:398: yaml truthy value should be one of  (truthy)
../roles/manager/defaults/main.yml:400: yaml truthy value should be one of  (truthy)
../roles/manager/tasks/install_cmake.yml:7: yaml trailing spaces (trailing-spaces)
../roles/manager/tasks/install_cmake.yml:7: yaml wrong indentation: expected 0 but found 2 (indentation)
../roles/manager/tasks/install_cmake.yml:18: yaml truthy value should be one of  (truthy)
../roles/manager/tasks/install_cmake.yml:40: yaml no new line character at the end of file (new-line-at-end-of-file)
../roles/manager/tasks/installation_from_custom_packages.yml:2: yaml wrong indentation: expected 0 but found 2 (indentation)
../roles/manager/tasks/installation_from_custom_packages.yml:13: yaml wrong indentation: expected 6 but found 4 (indentation)
../roles/manager/tasks/installation_from_custom_packages.yml:31: yaml no new line character at the end of file (new-line-at-end-of-file)
../roles/manager/tasks/installation_from_sources.yml:3: yaml wrong indentation: expected 0 but found 2 (indentation)
../roles/manager/tasks/installation_from_sources.yml:21: yaml trailing spaces (trailing-spaces)
../roles/manager/tasks/main.yml:16: unnamed-task All tasks should be named
../roles/manager/tasks/main.yml:19: unnamed-task All tasks should be named
../roles/manager/vars/install_cmake.yml:4: yaml no new line character at the end of file (new-line-at-end-of-file)
@teddytpc1
Copy link
Member

Hi @atcommander.
First of all, thanks for your contribution.
Unfortunately, the PR is too big to review and includes major changes that would be better to analyze separately. So, I will ask you to:

  • Update your 4.3 branch with the latest changes.
  • Create a PR for each item so we can review them one by one.

@nlamirault
Copy link

hi, any news on this feature ?

@zollo
Copy link

zollo commented Feb 6, 2024

Bumping this, we cannot consume the Wazuh content without a proper collection structure.

@goetzk
Copy link

goetzk commented Feb 19, 2024

Bumping this, we cannot consume the Wazuh content without a proper collection structure.

As best I can tell Wazuh don't care about Ansible users or improving their situation. Small changes #929 , #930, #931 have been ignored since September last year and - based on my looking at the commit history - there has been virtually no community supplied changes being merged. No changes of substance are happening in the repository.

I assume there are lots of people bodging their way by importing playbooks, forking the repository, and wrapping it up in other ways.

I'm thinking about changing platform, because management is an important part of tooling like this.

@noonedeadpunk
Copy link

I wanna +1 to this effort, as in 2024 having just playbooks and roles without them being installable as a collection is quite useless and against best practices.

@darkdecoy darkdecoy deleted the branch wazuh:4.3 September 6, 2024 19:40
@darkdecoy darkdecoy closed this Sep 6, 2024
@darkdecoy darkdecoy deleted the 4.3 branch September 6, 2024 19:40
@darkdecoy darkdecoy restored the 4.3 branch September 6, 2024 19:42
@ct-jby
Copy link

ct-jby commented Dec 16, 2024

Any news?

I don't understand why this PR was never merged.

it's unacceptable in 2024 to have to tinker to deploy and maintain a tool like Wazuh.

Several people have tried to improve and provide everything needed for an ansible collection, but have hit a brick wall.

I think that's a real shame.

@spatterIight
Copy link

With Collection:

  1. Install collection
  2. Use the role in a playbook

Without collection:

  1. Clone this repo
  2. Create a new private repo called "ansible-role-wazuh"
  3. Copy the contents of roles/wazuh into the new repo "ansible-role-wazuh"
  4. Install the new private role
  5. Use the role in a playbook
  6. Periodically manually update the contents of your private role repo with upstream

I hope this helps explain how important the functionality of being installable as a collection is.

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.

8 participants