{"id":30170029,"url":"https://github.com/devops-works/ansible-auditship","last_synced_at":"2026-02-10T02:01:34.254Z","repository":{"id":307558531,"uuid":"1029838440","full_name":"devops-works/ansible-auditship","owner":"devops-works","description":"Ansible role to deploy auditship","archived":false,"fork":false,"pushed_at":"2025-11-05T10:51:55.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-05T12:20:34.736Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/devops-works.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-31T16:49:09.000Z","updated_at":"2025-11-05T10:51:57.000Z","dependencies_parsed_at":"2025-07-31T23:24:08.671Z","dependency_job_id":"78af720c-d552-4354-823c-5f4ecc841cb4","html_url":"https://github.com/devops-works/ansible-auditship","commit_stats":null,"previous_names":["devops-works/ansible-auditship"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/devops-works/ansible-auditship","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-works%2Fansible-auditship","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-works%2Fansible-auditship/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-works%2Fansible-auditship/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-works%2Fansible-auditship/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devops-works","download_url":"https://codeload.github.com/devops-works/ansible-auditship/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-works%2Fansible-auditship/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29288730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T21:57:15.303Z","status":"online","status_checked_at":"2026-02-10T02:00:07.935Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-11T20:26:55.570Z","updated_at":"2026-02-10T02:01:34.151Z","avatar_url":"https://github.com/devops-works.png","language":"Jinja","readme":"# Ansible Role: auditship\n\n[![CI](https://github.com/devops-works/ansible-auditship/workflows/CI/badge.svg)](https://github.com/devops-works/ansible-auditship/actions?query=workflow%3ACI)\n\nAn Ansible role for installing and configuring [auditship](https://gitlab.com/devopsworks/tools/auditship), a tool that\nships Linux audit logs to Fluentd endpoints in real-time.\n\n## Features\n\n- Automatically downloads the latest auditship binary from GitLab releases\n- Configures auditship as an auditd plugin for real-time log shipping\n- Sets up log rotation to prevent disk space issues\n- Supports multiple Linux distributions (Ubuntu, Debian)\n- Idempotent installation with force reinstall option\n\n## Requirements\n\n- Ansible \u003e= 2.4\n- Target systems must have `auditd` installed and running\n- Internet connectivity for downloading auditship binary and configuration files\n- Root privileges on target systems\n\n## Role Variables\n\n### Required Variables\n\nNone. All variables have sensible defaults.\n\n### Optional Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `auditship_force_install` | `false` | Forces reinstallation even if binary exists |\n| `auditship_tag` | `auditd` | Tag to apply to audit logs |\n| `auditship_outputs` | `[\"-\", \"/var/log/auditship.json\"]` | Array of output destinations (stdout and file) |\n| `auditship_log_file` | `/var/log/auditship.log` | Location of auditship log file |\n| `auditship_log_level` | `info` | Logging level (debug, info, warn, error) |\n| `auditship_buffer_size` | `10000` | Buffer size for batching audit events |\n| `auditship_retry_interval` | `30` | Retry interval in seconds for failed deliveries |\n| `auditship_max_retry_attempts` | `10` | Maximum number of retry attempts |\n| `auditship_metrics_enabled` | `false` | Enable metrics endpoint for monitoring |\n| `auditship_metrics_bind_address` | `127.0.0.1` | Bind address for metrics endpoint |\n| `auditship_metrics_port` | `9090` | Port for metrics endpoint |\n| `auditship_metrics_path` | `/metrics` | HTTP path for metrics endpoint |\n\n### Example Variable Configuration\n\n```yaml\nauditship_force_install: true\nauditship_tag: \"security-audit\"\nauditship_outputs:\n  - \"-\"                           # stdout\n  - \"/var/log/auditship.json\"     # local file\n  - \"fluent://log-server.company.com:24224\"  # fluentd endpoint\nauditship_log_file: \"/var/log/auditship.log\"\nauditship_log_level: \"debug\"\nauditship_buffer_size: 5000       # smaller buffer for high-frequency logs\nauditship_retry_interval: 60      # retry every minute\nauditship_max_retry_attempts: 5   # fail after 5 attempts\nauditship_metrics_enabled: true   # enable monitoring\nauditship_metrics_bind_address: \"0.0.0.0\"  # expose metrics externally\nauditship_metrics_port: 8080      # custom metrics port\nauditship_metrics_path: \"/stats\"  # custom metrics path\n```\n\n## Dependencies\n\nNone.\n\n## Example Playbook\n\n### Basic Usage\n\n```yaml\n- hosts: servers\n  become: true\n  roles:\n    - devopsworks.auditship\n```\n\n### With Custom Configuration\n\n```yaml\n- hosts: servers\n  become: true\n  vars:\n    auditship_tag: \"security-audit\"\n    auditship_outputs:\n      - \"-\"                           # stdout\n      - \"/var/log/auditship.json\"     # local file  \n      - \"fluent://log-server.company.com:24224\"  # fluentd endpoint\n    auditship_log_level: \"debug\"\n    auditship_buffer_size: 5000       # smaller buffer for high-frequency logs\n    auditship_retry_interval: 60      # retry every minute\n    auditship_max_retry_attempts: 5   # fail after 5 attempts\n    auditship_metrics_enabled: true   # enable monitoring\n    auditship_metrics_bind_address: \"0.0.0.0\"  # expose metrics externally\n    auditship_metrics_port: 8080      # custom metrics port\n    auditship_metrics_path: \"/stats\"  # custom metrics path\n  roles:\n    - devopsworks.auditship\n```\n\n### Force Reinstallation\n\n```yaml\n- hosts: servers\n  become: true\n  vars:\n    auditship_force_install: true\n  roles:\n    - devopsworks.auditship\n```\n\n## Installation\n\n### From Ansible Galaxy\n\n```bash\nansible-galaxy install devopsworks.auditship\n```\n\n### From Git Repository\n\n```bash\nansible-galaxy install git+https://github.com/devops-works/ansible-auditship.git\n```\n\n## What This Role Does\n\n1. **Version Detection**: Queries GitLab API to find the latest auditship release\n2. **Binary Download**: Downloads the compressed auditship binary for Linux AMD64\n3. **Installation**: Extracts and installs the binary to `/usr/local/bin/auditship`\n4. **Plugin Configuration**: Creates auditd plugin configuration in `/etc/audit/plugins.d/auditship.conf`\n5. **Main Configuration**: Creates main auditship configuration file at `/etc/auditship.conf`\n6. **Log Rotation**: Downloads and installs logrotate configuration to `/etc/logrotate.d/auditship`\n\n## File Locations\n\n- **Binary**: `/usr/local/bin/auditship`\n- **Plugin Config**: `/etc/audit/plugins.d/auditship.conf`\n- **Main Config**: `/etc/auditship.conf`\n- **Log Rotation**: `/etc/logrotate.d/auditship`\n\n## Supported Platforms\n\n- Ubuntu (all versions)\n- Debian (all versions)\n\n## Testing\n\nThis role includes comprehensive testing using Molecule with Podman driver.\n\n### Prerequisites\n\n```bash\npip install -r requirements.txt\n```\n\n### Run Tests\n\n```bash\n# Run all tests\nmake test\n\n# Run linting only\nmake lint\n\n# Run syntax check\nmake syntax\n```\n\n### Test Platforms\n\n- Ubuntu 24.04\n- Debian 11\n- Debian 12\n\n## Development\n\n### Setup Development Environment\n\n1. Clone the repository\n2. Install dependencies: `make install`\n3. Run tests: `make test`\n\n### Available Make Targets\n\n- `make help` - Show available commands\n- `make install` - Install Python dependencies\n- `make lint` - Run all linting tools\n- `make test` - Run molecule tests\n- `make clean` - Clean up test artifacts\n- `make syntax` - Check Ansible syntax\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Internet Connectivity**: Ensure target systems can reach GitLab for downloading binaries\n2. **Auditd Service**: Verify auditd is installed and running before applying this role\n3. **Permissions**: Role requires root privileges for installation and configuration\n\n### Verification\n\nAfter running the role, verify installation:\n\n```bash\n# Check binary exists and is executable\nls -la /usr/local/bin/auditship\n\n# Test auditship version\n/usr/local/bin/auditship -version\n\n# Verify plugin configuration\ncat /etc/audit/plugins.d/auditship.conf\n\n# Verify main configuration\ncat /etc/auditship.conf\n\n# Check auditd is using the plugin\nsudo service auditd status\n```\n\n## License\n\nMIT\n\n## Author Information\n\nThis role was created by [DevopsWorks](https://devopsworks.io/).\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests for new functionality\n5. Run the test suite: `make test`\n6. Submit a pull request\n\n## Links\n\n- [auditship project](https://gitlab.com/devopsworks/tools/auditship)\n- [Issue tracker](https://github.com/devops-works/ansible-auditship/issues)\n- [DevopsWorks](https://devopsworks.io/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevops-works%2Fansible-auditship","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevops-works%2Fansible-auditship","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevops-works%2Fansible-auditship/lists"}