{"id":13651437,"url":"https://github.com/adamkrone/chef-consul-template","last_synced_at":"2025-12-14T21:14:28.524Z","repository":{"id":22449183,"uuid":"25787585","full_name":"adamkrone/chef-consul-template","owner":"adamkrone","description":"A Chef cookbook that installs and configures consul-template","archived":false,"fork":false,"pushed_at":"2024-02-22T21:21:02.000Z","size":259,"stargazers_count":29,"open_issues_count":9,"forks_count":77,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-10T02:34:09.959Z","etag":null,"topics":["chef","consul-template","cookbook","devops","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamkrone.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-10-26T19:29:10.000Z","updated_at":"2024-09-26T13:33:22.000Z","dependencies_parsed_at":"2024-11-10T02:31:03.135Z","dependency_job_id":"d5795eac-3537-4a0b-b190-c07cbadd8af5","html_url":"https://github.com/adamkrone/chef-consul-template","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamkrone%2Fchef-consul-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamkrone%2Fchef-consul-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamkrone%2Fchef-consul-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamkrone%2Fchef-consul-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamkrone","download_url":"https://codeload.github.com/adamkrone/chef-consul-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250333927,"owners_count":21413479,"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":["chef","consul-template","cookbook","devops","ruby"],"created_at":"2024-08-02T02:00:49.449Z","updated_at":"2025-12-14T21:14:28.371Z","avatar_url":"https://github.com/adamkrone.png","language":"Ruby","funding_links":[],"categories":["Cookbooks","Projects"],"sub_categories":["Service Discovery","Provisioning"],"readme":"# consul-template\n\n[![Latest Version](http://img.shields.io/github/release/adamkrone/chef-consul-template.svg?style=flat-square)][release]\n[![Build Status](http://img.shields.io/travis-ci/adamkrone/chef-consul-template.svg?style=flat-square)][build]\n[![Coverage Status](https://img.shields.io/coveralls/adamkrone/chef-consul-template.svg?style=flat-square)][coverage]\n\n[release]: https://github.com/adamkrone/chef-consul-template/releases\n[build]: https://travis-ci.org/adamkrone/chef-consul-template\n[coverage]: https://coveralls.io/r/adamkrone/chef-consul-template\n\nInstalls and configures [consul-template](https://github.com/hashicorp/consul-template).\n\n## Supported Platforms\n\n- Ubuntu 14.04, 12.04\n- Debian 8.2, 7.9, 6.0.10\n- Centos 7.2, 6.7\n- Arch Linux\n\n## Attributes\n\n- `node['consul_template']['base_url']` - Base URL for consul-template binary files\n- `node['consul_template']['version']` - Version of consul-template to install.\n  Used to determine which binary to grab from the base_url.\n- `node['consul_template']['install_method']` - How consul-template should be\n  installed. Supports 'binary' or 'source'.\n- `'node['consul_template']['install_dir']` - Directory where consul-template\n  should be installed.\n- `node['consul_template']['checksums']` - Contains a hash of checksums where\n  the key is the file for a given OS/architecture, and the value is the\n  associated checksum. For example, `consul-template_0.3.1_linux_amd64`.\n- `node['consul_template']['source_revision']` - When installing from source,\n  this determines the revision it should use.\n- `node['consul_template']['config_dir']` - The directory that contains the\n  configuration files for consul-template.\n- `node['consul_template']['init_style']` - Defines the init system that the\n  consul-template service should use. Supports 'init', 'runit', or 'systemd'.\n- `node['consul_template']['service_user']` - Defines the user that should be\n  used for the consul-template service.\n- `node['consul_template']['service_group']` - Defines the group that should be\n  used for the consul-template service.\n- `node['consul_template']['template_mode']` - File permissions mode for all\n  consul-template configuration files.\n- `node['consul_template']['consul_addr']` - Name:port to access consul (default: `127.0.0.1:8500`)\n- `node['consul_template']['vault_addr']` - URL to access Vault (default: `https://127.0.0.1:8200`)\n\nAdditionally, the contents of the `node['consul_template']['config']` hash will be reflected into the default configuration file -- `/etc/consul-template.d/default.json`.\n## Recipes\n\n### default\n\nInstalls and configures consul-template using the install method specified in\n`node['consul_template']['install_method']`.\n\n### install_binary\n\nInstalls consul-template using one of the binaries provided by Hashicorp. It\nwill also verify the checksum. The default attributes includes the latest\nversion's binaries for all supported OS/architectures, including their\nchecksum.\n\n### install_source\n\nInstalls consul-template from source.\n\n### service\n\nInstalls and configures the consul-template service.\n\n## LWRP\n\n### consul_template_config\n\nCreates configuration files in `node['consul_template']['config_dir']`, and\nreloads the configuration.\n\nFor example, if you want to generate HAProxy's config using consul-template,\nyou may include something like this in your recipe:\n\n```ruby\nconsul_template_config 'haproxy' do\n  templates [{\n    source: '/etc/haproxy/haproxy.cfg.ctmpl',\n    destination: '/etc/haproxy/haproxy.cfg',\n    command: 'service haproxy restart'\n  }]\n  notifies :reload, 'service[consul-template]', :delayed\nend\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Added some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create new Pull Request\n\n### Adding checksums for new versions\n\nThe `attributes/checksums.rb` file contains checksums for the current and past\nconsul-template versions. A quick and easy contribution you can make is to\nupdate it when a new version of consul-template is released, as I'm not always\npaying attention to when new versions come out.\n\nIn order to make this as easy and straightforward as possible, there is a helper\nscript (`scripts/generate-checksums`) that takes a version number, and returns\na pre-formatted list of the checkums (e.g. using version 0.10.0):\n\n```bash\n$ scripts/generate-checksums 0.10.0\nGenerating checksums for v0.10.0\n'consul-template_0.10.0_darwin_386' =\u003e 'fb39f978f0e24175b7daee1f884e5299b11eb3a0689c37c7e96a26f9cadcbd77',\n'consul-template_0.10.0_darwin_amd64' =\u003e '178e8e59d2e380440ac5582fb7f49c946ff931c1589ac85258d7dba82aefaabe',\n'consul-template_0.10.0_freebsd_386' =\u003e '981b73d6547658d96bc5f2125dcc4161879c5c60c6eca3fa98b4a914f9f96581',\n'consul-template_0.10.0_freebsd_amd64' =\u003e '0738c0887bb7ac2a879735ab61ea213ee042b5f53b27c6d26d4aa11f2bc6874a',\n'consul-template_0.10.0_freebsd_arm' =\u003e '0488f76d3d0ca4b81ae807dfe7724b22380087adb5a4a49e73676095959e9f3c',\n'consul-template_0.10.0_linux_386' =\u003e 'f9926eac99eb60ee1379e6f15a1d8240e96aa9076372914387005c8475d1e561',\n'consul-template_0.10.0_linux_amd64' =\u003e 'ef298a2ae54cf51dbfc4108194299a9055b252ff9b917e7dd40c72fa30820096',\n'consul-template_0.10.0_linux_arm' =\u003e '753b10added292b8873694d0f7905c4ddd62dd6bd3115f866ea5eee902d98f7c',\n'consul-template_0.10.0_netbsd_386' =\u003e 'e1a6d759a91a2fa316af276c28643825727cd40ac214d12395ccfbbfad075f72',\n'consul-template_0.10.0_netbsd_amd64' =\u003e '99a7cf3b3bb62968d99d627dc4419f584330484826b3e87f0bfcbe5b5d208c4b',\n'consul-template_0.10.0_netbsd_arm' =\u003e 'da81d8bfbcb230e8492129dc0d2c5d50e1db651efdce355ec9697f20d8442b2a',\n'consul-template_0.10.0_openbsd_386' =\u003e '7672b647c9af37e04513ddd4103856644361d20a8ab2a57ea0178f421db01a31',\n'consul-template_0.10.0_openbsd_amd64' =\u003e 'af978a312dbae326e5aab2566d8a2549aae2910986580e4895fa276fffa98513',\n'consul-template_0.10.0_windows_386' =\u003e '6611d9aa5bd9ae39d93690cbedb2bc8b57427dfe5a79774346292903282b698f',\n'consul-template_0.10.0_windows_amd64' =\u003e 'cf88397f3abf6b1e6064672d0535db5d94ced04332e56a1f31f9a2456f30a041',\n```\n\nJust copy and paste it to the bottom of the hash in `attributes/checksums.rb` and that's it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamkrone%2Fchef-consul-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamkrone%2Fchef-consul-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamkrone%2Fchef-consul-template/lists"}