Closed mrlesmithjr closed 7 years ago
update tasks\config_consul.yml
with the following:
- name: config_consul | configuring consul init service (Ubuntu)
template:
src: "etc/init/consul.conf.j2"
dest: "/etc/init/consul.conf"
owner: root
group: root
mode: 0644
notify: restart consul
when: >
(ansible_distribution == "Ubuntu" and
ansible_distribution_version <= '14.04') and
(inventory_hostname in groups[consul_clients_group] or
inventory_hostname in groups[consul_servers_group])
- name: config_consul | configuring consul systemd service
template:
src: "etc/systemd/system/consul.service.j2"
dest: "/etc/systemd/system/consul.service"
owner: root
group: root
mode: 0644
notify: restart consul
when: >
(ansible_distribution == "Debian" or
(ansible_distribution == "Ubuntu" and
ansible_distribution_version >= '16.04') or
ansible_os_family == "RedHat") and
(inventory_hostname in groups[consul_clients_group] or
inventory_hostname in groups[consul_servers_group])
Need to fix systemd service creation for Ubuntu 16.04. The current task sets up the service without systemd.