{"id":13753553,"url":"https://github.com/Graylog2/graylog-ansible-role","last_synced_at":"2025-05-09T21:35:08.172Z","repository":{"id":20127576,"uuid":"23397594","full_name":"Graylog2/graylog-ansible-role","owner":"Graylog2","description":"Ansible role which installs and configures Graylog","archived":false,"fork":false,"pushed_at":"2023-11-23T16:56:39.000Z","size":380,"stargazers_count":212,"open_issues_count":8,"forks_count":126,"subscribers_count":35,"default_branch":"master","last_synced_at":"2024-11-14T00:02:57.236Z","etag":null,"topics":["ansible","ansible-galaxy","ansible-playbook","ansible-role","graylog","log-analysis","log-management","logging","playbook"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Graylog2.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}},"created_at":"2014-08-27T16:46:48.000Z","updated_at":"2024-09-19T21:27:51.000Z","dependencies_parsed_at":"2024-09-25T00:30:22.062Z","dependency_job_id":null,"html_url":"https://github.com/Graylog2/graylog-ansible-role","commit_stats":{"total_commits":341,"total_committers":51,"mean_commits":6.686274509803922,"dds":0.530791788856305,"last_synced_commit":"81b4c34f535260e0183863f4e24e120badf7062f"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graylog2%2Fgraylog-ansible-role","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graylog2%2Fgraylog-ansible-role/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graylog2%2Fgraylog-ansible-role/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graylog2%2Fgraylog-ansible-role/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Graylog2","download_url":"https://codeload.github.com/Graylog2/graylog-ansible-role/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224884615,"owners_count":17386121,"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","ansible-galaxy","ansible-playbook","ansible-role","graylog","log-analysis","log-management","logging","playbook"],"created_at":"2024-08-03T09:01:24.441Z","updated_at":"2025-05-09T21:35:08.158Z","avatar_url":"https://github.com/Graylog2.png","language":"Jinja","funding_links":[],"categories":["playbook"],"sub_categories":[],"readme":"[![Galaxy](https://img.shields.io/badge/galaxy-graylog--ansible--role-blue)](https://galaxy.ansible.com/Graylog2/graylog) [![CI](https://github.com/Graylog2/graylog-ansible-role/actions/workflows/ci.yml/badge.svg)](https://github.com/Graylog2/graylog-ansible-role/actions/workflows/ci.yml) ![Ansible](https://img.shields.io/ansible/role/d/56392.svg) ![Ansible](https://img.shields.io/badge/dynamic/json.svg?label=min_ansible_version\u0026url=https%3A%2F%2Fgalaxy.ansible.com%2Fapi%2Fv1%2Froles%2F56392%2F\u0026query=$.min_ansible_version) ![Ansible](https://img.shields.io/ansible/quality/56392)\n\n\n# Graylog Ansible Role\n\n## Requirements\n\n- Ansible 11.2.0\n- Python 3.12\n- At least 4gb of memory on the target instance.\n  - Linux\n    - Currently tested against:\n        - Ubuntu 18.04\n        - Ubuntu 20.04\n        - Ubuntu 22.04\n        - Ubuntu 24.04\n        - Centos 7\n        - Centos 8\n        - Centos 9\n\nTo install the role, run:\n\n    ansible-galaxy install graylog2.graylog\n\n\n\n## Dependencies\n\nGraylog has the following dependencies:\n  - Java\n  - OpenSearch\n  - MongoDB\n\nSee the official [Graylog documentation](https://docs.graylog.org/docs/installing) for more details on these requirements.\n\nBe certain you are running a supported version of OpenSearch.\n\n**Compatibility Matrix**\n\n| Graylog version   | 3.x |    4.x     | 5.x | 6.x |\n|:--------------|:-------------:|:----------:|:-------------:|:-------------:|\n| Elasticsearch | 5-6 | 6.8 - 7.10 | 6.8 - 7.10 | n/a |\n | OpenSearch | |    1.x*    | 1.x - 2.x | 1.x - 2.x |\n*Graylog 4.3.x introduces support for OpenSearch.\n\nRefer to the [Software Interoperability Chart](https://go2docs.graylog.org/5-0/planning_your_deployment/planning_your_upgrade_to_opensearch.htm)\n\nYou will need to these Ansible role dependencies:\n  - [Java](https://github.com/lean-delivery/ansible-role-java)\n\nTo install it, run:\n\n    ansible-galaxy install -r \u003cGRAYLOG ROLE_DIRECTORY\u003e/requirements.yml\n\n\n\n\n\n## Example Playbook\n\nHere is an example playbook that uses this role. This is a single-instance configuration. It installs Java, MongoDB, Elasticsearch, and Graylog onto the same server.\n\n```yaml\n    # Graylog vars\n    graylog_version: 6.1\n    graylog_install_java: True\n    graylog_password_secret: \"\" # Insert your own here. Generate with: pwgen -s 96 1\n    graylog_root_password_sha2: \"\" # Insert your own root_password_sha2 here.\n    graylog_http_bind_address: \"{{ ansible_default_ipv4.address }}:9000\"\n    graylog_http_publish_uri: \"http://{{ ansible_default_ipv4.address }}:9000/\"\n    graylog_http_external_uri: \"http://{{ ansible_default_ipv4.address }}:9000/\"\n    graylog_install_open_package: True\n    graylog_install_enterprise_package: False\n\n  roles:\n    - role: \"graylog2.graylog\"\n      tags:\n        - \"graylog\"\n```\n\nRemember to generate a unique `password_secret` and `root_password_sha2` for your instance.\n\nTo generate `password_secret`:\n\n    pwgen -s 96 1\n\nTo generate `root_password_sha2`:\n\n      echo -n \"Enter Password: \" \u0026\u0026 head -1 \u003c/dev/stdin | tr -d '\\n' | sha256sum | cut -d\" \" -f1\n\n\n## Example Playbook - Cluster\n\nHere is an example that deploys a Graylog cluster, like the one mentioned on the [architecture page](https://docs.graylog.org/docs) of our documentation.\n\nIn our Ansible hosts file, we have 3 instances for a Graylog cluster:\n\n```\n[graylog]\ngraylog01\ngraylog02\ngraylog03\n```\n\nFirst, deploy an [OpenSearch](https://opensearch.org/) cluster.\n\nNext, deploy three MongoDB instances and configure them as a Replica Set. This can be done with the [MongoDB community collection](https://github.com/ansible-collections/community.mongodb).\n\nThese MongoDB instances can live on the Graylog servers, as they are not expected to consume much resources.\n\nAgain, this doesn't configure authentication in MongoDB. You may want that for a production cluster.\n\n```yaml\n- hosts: \"graylog\"\n  vars:\n    mongodb_version: \"4.4\"\n    bind_ip: \"0.0.0.0\"\n    repl_set_name: \"rs0\"\n    authorization: \"disabled\"\n  roles:\n    - community.mongodb.mongodb_repository\n    - community.mongodb.mongodb_mongod\n  tasks:\n    - name: \"Start MongoDB\"\n      service:\n        name: \"mongod\"\n        state: \"started\"\n        enabled: \"yes\"\n\n- hosts: \"graylog01\"\n  tasks:\n    - name: \"Install PyMongo\"\n      apt:\n        update_cache: yes\n        name: \"python3-pymongo\"\n        state: \"latest\"\n    - name: Configure replicaset\n      community.mongodb.mongodb_replicaset:\n        login_host: \"localhost\"\n        replica_set: \"rs0\"\n        members:\n        - graylog01\n        - graylog02\n        - graylog03\n```\n\nFinally, install Graylog.\n\n```yaml\n- hosts: \"graylog\"\n  vars:\n    graylog_is_master: \"{{ True if ansible_hostname == 'graylog01' else False }}\"\n    graylog_version: 6.1\n    graylog_install_java: False\n    graylog_password_secret: \"\" # Insert your own here. Generate with: pwgen -s 96 1\n    graylog_root_password_sha2: \"\" # Insert your own root_password_sha2 here.\n    graylog_http_bind_address: \"{{ ansible_default_ipv4.address }}:9000\"\n    graylog_http_publish_uri: \"http://{{ ansible_default_ipv4.address }}:9000/\"\n    graylog_http_external_uri: \"http://{{ ansible_default_ipv4.address }}:9000/\"\n    graylog_elasticsearch_hosts: \"http://elasticsearch01:9200,http://elasticsearch02:9200,http://elasticsearch03:9200\"\n    graylog_mongodb_uri: \"mongodb://graylog01:27017,graylog02:27017,graylog03:27017/graylog\"\n\n  roles:\n    - role: \"graylog2.graylog\"\n```\n\nThe full example can be seen [here](molecule/example2/converge.yml). Our [documentation](https://docs.graylog.org/v1/docs/multinode-setup) has more in-depth advice on configuring a multi-node Graylog setup.\n\n\n## Role Variables\n\nA list of all available role variables is documented [here](docs/Variables.md).\n\n## Testing\n\nWe run smoke tests for Graylog using this role. Documentation on that can be found [here](docs/Testing.md)\n\n## Author Information\n\nAuthor: Graylog and [contributors](https://github.com/Graylog2/graylog2-ansible-role/graphs/contributors)\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGraylog2%2Fgraylog-ansible-role","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGraylog2%2Fgraylog-ansible-role","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGraylog2%2Fgraylog-ansible-role/lists"}