{"id":15873735,"url":"https://github.com/blake/ansible-collection-consul","last_synced_at":"2025-07-07T07:34:45.407Z","repository":{"id":74601243,"uuid":"380856824","full_name":"blake/ansible-collection-consul","owner":"blake","description":"A variety of Ansible roles to help manage the installation and configuration of a Consul datacenter.","archived":false,"fork":false,"pushed_at":"2022-03-25T10:59:55.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T14:46:39.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/blake.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":"2021-06-27T23:26:49.000Z","updated_at":"2022-03-25T23:29:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"85886a53-47ae-4ca2-a062-122e25204a97","html_url":"https://github.com/blake/ansible-collection-consul","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"0c86abeec9694d0ea2c61b6603ec18237056d39e"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blake%2Fansible-collection-consul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blake%2Fansible-collection-consul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blake%2Fansible-collection-consul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blake%2Fansible-collection-consul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blake","download_url":"https://codeload.github.com/blake/ansible-collection-consul/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246724798,"owners_count":20823543,"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":[],"created_at":"2024-10-06T01:05:44.506Z","updated_at":"2025-04-01T22:43:17.045Z","avatar_url":"https://github.com/blake.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Collection - blake.consul\n\nThe Ansible Consul collection includes a variety of Ansible roles to help manage\nthe installation and configuration of a Consul datacenter.\n\n**Note:** This collection is still in active development. There may be unidentified issues as development continues.\n\n## Included Content\n\nThe current stable release (`0.1.1`) of the Ansible Consul collection includes\nthe following roles:\n\n|Name|Description|\n|----|-----------|\n|[transparent_proxy](https://github.com/blake/ansible-collection-consul/blob/main/roles/transparent_proxy)|Configure a VM in Consul service mesh with transparent proxying|\n\n## Requirements\n\nThis collection has been developed and tested with\n[maintained](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html)\nversions of Ansible, specifically `2.11.2`. Backwards compatibility is not guaranteed.\n\nInstructions on how to install Ansible can be found in the [Ansible website](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html).\n\n## Installation\n\n### Ansible Galaxy\n\nUse `ansible-galaxy collection install git+https://github.com/blake/ansible-collection-consul.git,v0.1.1`\nto install the latest stable release of the collection on your system.\n\nYou can also include the collection in a `requirements.yml` file and install it\nvia `ansible-galaxy collection install --requirements-file requirements.yml`,\nusing the format:\n\n```yaml\n---\ncollections:\n  - name: https://github.com/blake/ansible-collection-consul.git\n    type: git\n    version: v0.1.1\n```\n\n### Git\n\nUse `git clone https://github.com/blake/ansible-collection-consul.git` to pull\nthe latest edge commit of the collection from GitHub.\n\n## Usage\n\nSample playbooks for each use case covered by this collection can be found in\nthe [`playbooks/`](https://github.com/blake/ansible-collection-consul/blob/main/playbooks/) folder in the following files:\n\n|Name|Description|\n|----|-----------|\n|**[`install-consul-envoy.yaml`](https://github.com/blake/ansible-collection-consul/blob/main/playbooks/install-consul-envoy.yaml)**|Install Consul and Envoy with transparent proxy config|\n\n### OS startup procedure with `transparent_proxy`\n\nThe transparent proxy role installs a number of packages onto the operating\nsystem image that facilitate starting a VM with transparent proxy enabled for\nthe installed application. These applications include [cloud-init], [Consul],\n[Envoy], and several supporting scripts.\n\nCloud-init is configured to run on system startup. The expectation is that the\noperator will use cloud-init to inject a service configuration file at\n`/srv/consul/service-config.json` that signifies the VM should be configured to\nrun Consul and Envoy for a local application. The service configuration file\ncontains a JSON dict with various annotations that specify details of the service\nto add to the mesh, such as the service name, port for the local application,\nproxy mode (`direct` or `transparent` (default)), or other supported parameters.\n\nThe `consul-sidecar-init` systemd oneshot service is configured to run after\ncloud-init successfully exits. If the `consul-sidecar-init` service detects that\n`/srv/consul/service-config.json` is present, that systemd service will execute\n`/srv/consul/generate-sidecar-configs.py`.\n\n`generate-sidecar-configs` will generate a Consul service registration based on\nthe parameters defined in the service config, and place the resultant file into\n`/etc/consul.d/service-registration.json`. Lastly, it will enable and start the\nEnvoy proxy for the service using the `envoy@.service` unit template file.\n\n```mermaid\nsequenceDiagram\n  autonumber\n  participant systemdSidecarInit\n  participant generateSidecarConfig\n  participant systemd\n  systemdSidecarInit --\u003e systemdSidecarInit: Check if service config is present\n\n  alt config is present\n    systemdSidecarInit --\u003e generateSidecarConfig: Run generate sidecar config\n    generateSidecarConfig --\u003e generateSidecarConfig: Generate service registration\n    generateSidecarConfig --\u003e systemd: Enable and start Envoy proxy for service\n  else is not present\n    systemdSidecarInit --\u003e systemdSidecarInit: Exit\n  end\n\n```\n\n## License\n\n[Apache License, Version 2.0](https://github.com/blake/ansible-collection-consul/blob/main/LICENSE)\n\n## Author Information\n\n[Blake Covarrubias](https://github.com/blake)\n\n\u003c!-- Reference style markdown links --\u003e\n[cloud-init]: https://cloudinit.readthedocs.io\n[Consul]: https://www.consul.io/\n[Envoy]: https://www.envoyproxy.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblake%2Fansible-collection-consul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblake%2Fansible-collection-consul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblake%2Fansible-collection-consul/lists"}