{"id":19402439,"url":"https://github.com/robertdebock/ansible-role-consul","last_synced_at":"2025-04-24T07:32:02.391Z","repository":{"id":43278919,"uuid":"366592810","full_name":"robertdebock/ansible-role-consul","owner":"robertdebock","description":"Install and configure consul on your system.","archived":false,"fork":false,"pushed_at":"2024-04-15T09:50:49.000Z","size":125,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T02:19:51.195Z","etag":null,"topics":["ansible","consul","molecule","playbook","tox"],"latest_commit_sha":null,"homepage":"https://robertdebock.nl/","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/robertdebock.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"robertdebock"}},"created_at":"2021-05-12T04:34:31.000Z","updated_at":"2024-05-23T07:45:19.889Z","dependencies_parsed_at":"2023-11-29T08:22:29.212Z","dependency_job_id":"4e533a3e-1451-4eea-b126-ea635f87197c","html_url":"https://github.com/robertdebock/ansible-role-consul","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-consul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-consul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-consul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-consul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertdebock","download_url":"https://codeload.github.com/robertdebock/ansible-role-consul/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223944977,"owners_count":17229551,"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","consul","molecule","playbook","tox"],"created_at":"2024-11-10T11:23:49.001Z","updated_at":"2025-04-24T07:32:02.368Z","avatar_url":"https://github.com/robertdebock.png","language":"Jinja","funding_links":["https://github.com/sponsors/robertdebock"],"categories":[],"sub_categories":[],"readme":"# [Ansible role consul](#consul)\n\nInstall and configure consul on your system.\n\n|GitHub|GitLab|Downloads|Version|\n|------|------|---------|-------|\n|[![github](https://github.com/robertdebock/ansible-role-consul/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-consul/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-consul/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-consul)|[![downloads](https://img.shields.io/ansible/role/d/robertdebock/consul)](https://galaxy.ansible.com/robertdebock/consul)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-consul.svg)](https://github.com/robertdebock/ansible-role-consul/releases/)|\n\n## [Example Playbook](#example-playbook)\n\nThis example is taken from [`molecule/default/converge.yml`](https://github.com/robertdebock/ansible-role-consul/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release.\n\n```yaml\n---\n- name: Converge\n  hosts: all\n  become: true\n  gather_facts: false\n\n  roles:\n    - role: robertdebock.consul\n      consul_bootstrap_expect: 1\n      consul_encrypt: \"6r73CP0icJrap1tsQ17yuqzVguho4/yz+aI/dkVg2Kk=\"\n      consul_bind_addr: \"0.0.0.0\"\n      consul_services:\n        - name: web\n          tags:\n            - rails\n          port: 80\n```\n\nThe machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/robertdebock/ansible-role-consul/blob/master/molecule/default/prepare.yml):\n\n```yaml\n---\n- name: Prepare\n  hosts: all\n  become: true\n  gather_facts: false\n\n  roles:\n    - role: robertdebock.bootstrap\n    - role: robertdebock.core_dependencies\n    - role: robertdebock.hashicorp\n```\n\nAlso see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles.\n\n## [Role Variables](#role-variables)\n\nThe default values for the variables are set in [`defaults/main.yml`](https://github.com/robertdebock/ansible-role-consul/blob/master/defaults/main.yml):\n\n```yaml\n---\n# defaults file for consul\n\n# You can install consul using a package in this role. If you have installed\n# consul manually, set this to `false`.\nconsul_install_package: true\n\n# Consul requires a license. Without setting a license (or an empty license), some steps are skipped.\nconsul_license: \"\"\n\n# This flag controls the datacenter in which the agent is running.\nconsul_datacenter: my-dc-1\n\n# This flag provides a data directory for the agent to store state.\nconsul_data_dir: /opt/consul\n\n# The address to which Consul will bind client interfaces, including the HTTP and DNS servers\nconsul_client_addr: \"0.0.0.0\"\n\n# Enables the built-in web UI server and the required HTTP routes.\nconsul_ui: true\n\n# This flag is used to control if an agent is in server or client mode.\nconsul_server: true\n\n# This flag provides the number of expected servers in the datacenter.\n# consul_bootstrap_expect: 3\n\n# Specifies the secret key to use for encryption of Consul network traffic.\n# consul_encrypt: \"6r73CP0icJrap1tsQ17yuqzVguho4/yz+aI/dkVg2Kk=\"\n\n# Similar to -join but allows retrying a join until it is successful.\n# consul_retry_join:\n#   - consul.domain.internal\n\n# The address that should be bound to for internal cluster communications.\n# consul_bind_addr: \"{{ ansible_default_ipv4.address }}\"\n\n# The advertise address is used to change the address that we advertise to other nodes in the cluster.\n# consul_advertise_addr: \"{{ ansible_default_ipv4.address }}\"\n\n# You can define service that Consul should manage.\n# consul_services:\n#   - name: web\n#     tags:\n#       - rails\n#     port: 80\n\n# In same cases you may not want to start Consul as a service, because you are \"bootstrapping\" for example.\nconsule_service_started_and_enabled: true\n```\n\n## [Requirements](#requirements)\n\n- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-consul/blob/master/requirements.txt).\n\n## [State of used roles](#state-of-used-roles)\n\nThe following roles are used to prepare a system. You can prepare your system in another way.\n\n| Requirement | GitHub | GitLab |\n|-------------|--------|--------|\n|[robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap)|\n|[robertdebock.core_dependencies](https://galaxy.ansible.com/robertdebock/core_dependencies)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-core_dependencies/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-core_dependencies/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-core_dependencies/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-core_dependencies)|\n|[robertdebock.hashicorp](https://galaxy.ansible.com/robertdebock/hashicorp)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-hashicorp/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-hashicorp/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-hashicorp/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-hashicorp)|\n\n## [Context](#context)\n\nThis role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information.\n\nHere is an overview of related roles:\n![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-consul/png/requirements.png \"Dependencies\")\n\n## [Compatibility](#compatibility)\n\nThis role has been tested on these [container images](https://hub.docker.com/u/robertdebock):\n\n|container|tags|\n|---------|----|\n|[Amazon](https://hub.docker.com/r/robertdebock/amazonlinux)|Candidate|\n|[Debian](https://hub.docker.com/r/robertdebock/debian)|bullseye|\n|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|9|\n|[Fedora](https://hub.docker.com/r/robertdebock/fedora)|40|\n|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|all|\n\nThe minimum version of Ansible required is 2.12, tests have been done to:\n\n- The previous version.\n- The current version.\n- The development version.\n\nIf you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-consul/issues).\n\n## [License](#license)\n\n[Apache-2.0](https://github.com/robertdebock/ansible-role-consul/blob/master/LICENSE).\n\n## [Author Information](#author-information)\n\n[robertdebock](https://robertdebock.nl/)\n\nPlease consider [sponsoring me](https://github.com/sponsors/robertdebock).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fansible-role-consul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertdebock%2Fansible-role-consul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fansible-role-consul/lists"}