AnsibleShipyard / ansible-zookeeper

Ansible playbook for ZooKeeper
MIT License
95 stars 114 forks source link

Enable systemd service for Debian 8 #69

Closed dzeban closed 7 years ago

dzeban commented 7 years ago

Currently, when running ansible-zookeeper role on Debian 8 host, it fails:

TASK [AnsibleShipyard.ansible-zookeeper : Enable zookeeper service] 
***************************************************
fatal: [debian8-host]: FAILED! => {"changed": false, "failed": true, "msg": "Could not find the requested service zookeeper: host"}

This happens because zookeeper_debian_systemd_enabled variable is enabled only for Ubuntu >= 15.04 hosts.

This PR adds check for Debian >= 8.0, so Zookeeper successfully installs on Debian 8.0

dzeban commented 7 years ago

@ernestas-poskus Good catch! Sorry for my sloppiness - I've fixed version compare. It's now a bit more verbose but more robust - it checks versions for Ubuntu and Debian separately. If it seems complicated I can put the comparison inside zookeeper_debian_systemd_enabled template but it'll be huge. What do you think?

ernestas-poskus commented 7 years ago

It's now a bit more verbose but more robust - it checks versions for Ubuntu and Debian separately

Yes looks very good !

If it seems complicated I can put the comparison inside zookeeper_debian_systemd_enabled template but it'll be huge.

Reads better now, I like extra underscore in front :+1: