{"id":15140784,"url":"https://github.com/dj-wasabi/ansible-ossec-server","last_synced_at":"2025-10-23T17:31:45.210Z","repository":{"id":24277553,"uuid":"27672095","full_name":"dj-wasabi/ansible-ossec-server","owner":"dj-wasabi","description":"Installing and maintaining the ossec-server for RedHat/Debian/Ubuntu.","archived":false,"fork":false,"pushed_at":"2022-12-22T18:17:25.000Z","size":109,"stargazers_count":32,"open_issues_count":1,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-30T20:04:35.337Z","etag":null,"topics":["ansible-role","molecule","ossec","ossec-server"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/dj-wasabi/ossec-server/","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dj-wasabi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"dj-wasabi","patreon":"wernerdijkerman"}},"created_at":"2014-12-07T14:06:54.000Z","updated_at":"2024-11-19T16:06:57.000Z","dependencies_parsed_at":"2023-01-14T00:42:03.311Z","dependency_job_id":null,"html_url":"https://github.com/dj-wasabi/ansible-ossec-server","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dj-wasabi%2Fansible-ossec-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dj-wasabi%2Fansible-ossec-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dj-wasabi%2Fansible-ossec-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dj-wasabi%2Fansible-ossec-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dj-wasabi","download_url":"https://codeload.github.com/dj-wasabi/ansible-ossec-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237869068,"owners_count":19379259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible-role","molecule","ossec","ossec-server"],"created_at":"2024-09-26T08:41:19.220Z","updated_at":"2025-10-23T17:31:39.749Z","avatar_url":"https://github.com/dj-wasabi.png","language":"Jinja","funding_links":["https://github.com/sponsors/dj-wasabi","https://patreon.com/wernerdijkerman"],"categories":[],"sub_categories":[],"readme":"ansible-ossec-server\n====================\n\nThis role will install the ossec server on a host.\n\nBuild Status:\n\n[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fdj-wasabi%2Fansible-ossec-server%2Fbadge%3Fref%3Dmaster\u0026style=flat)](https://actions-badge.atrox.dev/dj-wasabi/ansible-ossec-server/goto?ref=master)\n\n\nRequirements\n------------\n\nThis role will work on:\n * Red Hat\n * Debian\n * Ubuntu\n * Amazon Linux (2)\n\nSo, you'll need one of those operating systems.. :-)\n\nRole Variables\n--------------\n\nThis role has some variables which you can or need to override.\n```\nossec_server_atomic_release: 1.0-21\nossec_server_config: []\nossec_agent_configs: []\n```\n\nExample setup\n-------------\n\nEdit the vars file for the host which runs the ossec-server:\n\n### host_vars/ossec-server\n```\ninstall_postfix: true\npostfix_mydomain: email-smtp.us-west-1.amazonaws.com\npostfix_sasl_passwds:\n  - \"[email-smtp.us-west-1.amazonaws.com]:587 USERNAME:PASSWORD\npostfix_relayhost: false\npostfix_mynetworks: false\npostfix_myhostname: localhost\npostfix_domain: localhost\npostfix_additional_settings:\n  relayhost: \"[email-smtp.us-west-1.amazonaws.com]:587\"\n\nossec_server_config:\n  mail_to:\n    - me@example.com\n  mail_smtp_server: localhost\n  mail_from: ossec@example.com\n  frequency_check: 72000\n  ignore_files:\n    - /etc/mtab\n    - /etc/mnttab\n    - /etc/hosts.deny\n  directories:\n    - check_all: 'yes'\n      dirs: /etc,/usr/bin,/usr/sbin\n    - check_all: 'yes'\n      dirs: /bin,/sbin\n  localfiles:\n    - format: 'syslog'\n      location: '/var/log/messages'\n    - format: 'syslog'\n      location: '/var/log/secure'\n  globals:\n    - '127.0.0.1'\n    - '192.168.2.1'\n  connection: 'secure'\n  log_level: 1\n  email_level: 7\n  commands:\n    - name: 'host-deny'\n      executable: 'host-deny.sh'\n      expect: 'srcip'\n      timeout_allowed: 'yes'\n  active_responses:\n    - command: 'host-deny'\n      location: 'local'\n      level: 6\n      timeout: 600\n  localfiles:\n    - format: 'syslog'\n      location: '/var/log/messages'\n    - format: 'syslog'\n      location: '/var/log/secure'\n\nossec_agent_configs:\n  - type: os\n    type_value: linux\n    frequency_check: 79200\n    ignore_files:\n      - /etc/mtab\n      - /etc/mnttab\n      - /etc/hosts.deny\n      - /etc/mail/statistics\n      - /etc/svc/volatile\n    directories:\n      - check_all: 'yes'\n        dirs: /etc,/usr/bin,/usr/sbin\n      - check_all: 'yes'\n        dirs: /bin,/sbin\n    localfiles:\n      - format: 'syslog'\n        location: '/var/log/messages'\n      - format: 'syslog'\n        location: '/var/log/secure'\n      - format: 'syslog'\n        location: '/var/log/maillog'\n      - format: 'apache'\n        location: '/var/log/httpd/error_log'\n      - format: 'apache'\n        location: '/var/log/httpd/access_log'\n      - format: 'apache'\n        location: '/var/ossec/logs/active-responses.log'\n```\n\n#### ossec_server_config:\nAt first, there is the server configuration. Change it for your needs, as this default setup won't do any good for you. (You don't have access to use the mail.example.com mailhost. :-))\n\n\n#### ossec_agent_configs:\nhttp://ossec-docs.readthedocs.org/en/latest/manual/agent/agent-configuration.html\n\nThere are 3 \"types\":\n  * os\n  * name\n  * profile\n\nIn the above setup, the type is os. And this configuration is for the \"linux\" os. You can have several types configured in the host_vars file, so you can create all kind of different configs.\n\nYou can find here some more information about the ossec shared agent configuration: http://ossec-docs.readthedocs.org/en/latest/manual/syscheck/\n\n#### \u003c_role_\u003e/vars/main.yml\nnil\n\nDependencies\n------------\n\nNo dependencies.\n\nExample Playbook\n----------------\n\nIncluding an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:\n\n    - hosts: ossec-server.example.com\n      roles:\n         - { role: dj-wasabi.ossec-server }\n\nMolecule\n--------\n\nThis roles is configured to be tested with Molecule. You can find on this page some more information regarding Molecule: https://werner-dijkerman.nl/2016/07/10/testing-ansible-roles-with-molecule-testinfra-and-docker/\nMolecule will boot 2 docker containers, containing the following OS:\n\n* Debian 8\n* CentOS 7\n\n\nLicense\n-------\n\nGPLv3\n\nAuthor Information\n------------------\n\nPlease send suggestion or pull requests to make this role better.\n\nGithub: https://github.com/dj-wasabi/ansible-ossec-server\n\nmail: ikben [ at ] werner-dijkerman . nl\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdj-wasabi%2Fansible-ossec-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdj-wasabi%2Fansible-ossec-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdj-wasabi%2Fansible-ossec-server/lists"}