Git Product home page Git Product logo

ansible-role-consul-template's Introduction

GitHub Actions semantic-release

Ansible Role: consul-template

This role installs and configures consul-template on systemd-enabled Linux systems.

The overall aim of this role is to do one thing and do it well - which in this case is installing the consul-template binary and systemd service unit.

The following items are not what this role will do:

  • Distribute or create consul-template templates
  • Allow for heavy tweaking and customization of default options
  • Do insanely complicated things with loops within loops within loops...

What really makes this role unique compared to others (the ones I have seen anyway) is that it configures consul-template as a systemd "instantiated service" (see here or man 5 systemd.service for details).

Configuring the consul-template service like this means that you can effortlessly launch multiple consul-template systemd services that all use different configuration files.

If you wanted to use a consul-template configuration file located at /etc/consul-template.d/consul.hcl, you could easily launch it through the following command:

$ sudo systemctl start consul-template@consul

Thanks to this instantiated service unit, you can achieve deeds most unholy.

You can have multiple consul-template instances templating entirely separate consul-template templates for any number of services which, theoretically, could be other instantiated consul-templates that then use the templated consul-templates templates for templating other consul-template templates.

Not that I'd recommend that sort of thing... ๐Ÿ™‚

Requirements

For the Ansible controller:

  • The unzip system package

For the target hosts/environment:

  • Linux
  • systemd
  • A Consul cluster
  • (Optional) A Vault cluster with the PKI secrets engine enabled

Dependencies

If you do not already have a Consul cluster installed and configured, you can use my Ansible role for Consul to create one.

Example Playbook

- hosts: example-hosts
  become: yes
  roles:
    - role: snoord.consul_template

License

MIT / BSD

Author Information

Created by Samuel Noordhuis in 2020. Inspired heavily by the Ansible roles and writings of Jeff Geerling.

If you see any errors or think this role could be improved in some way, you are welcome to open an issue/feature request or create a pull request!

ansible-role-consul-template's People

Contributors

semantic-release-bot avatar snoord avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.