Skip to content

Install consul-template repository and packages with Ansible.

Notifications You must be signed in to change notification settings

remerge/ansible-role-consul-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-role-consul-template

Install consul-template repository and packages with Ansible.

---
- name: Setup Consul-template
  hosts: all
  become: yes
  gather_facts: yes

  roles:
    - role: remerge.consul-template
      consul_template_templates_config:
    - source: "/path/in/server/template"
      destination: "/template/output/path/in/server"
      template_file: "/path/to/consul-template-file-in-ansible-project"
      perms: 0600
      command: "/bin/systemctl reload service"
      splay: "10s"
      user: "username"
      group: "groupname"

The default values for the variables are set in defaults/main.yml:

---
consul_template_install_package: true
# should files in the same directory as the generated file be cleaned up?
consul_template_remove_unmanaged: false
# location of consul-template configuration file
consul_template_config_dir: /etc/consul-template
consul_address: "localhost:8500"