diff --git a/roles/docenti/files/epoptes.conf b/roles/docenti/files/epoptes.conf new file mode 100644 index 0000000..1564868 --- /dev/null +++ b/roles/docenti/files/epoptes.conf @@ -0,0 +1,11 @@ +# vim:sts=2:sw=2 +author "BgLUG - Bergamo Linux Users Group " +description "Sanely starts epoptes server daemon on ubuntu." + +start on net-device-up and started winbind +stop on stopped winbind + +exec /usr/bin/twistd -n \ + --logfile "/var/log/epoptes.log" --pidfile "/var/run/epoptes.pid" \ + epoptes +respawn diff --git a/roles/docenti/tasks/epoptes.yml b/roles/docenti/tasks/epoptes.yml index 7f508a2..658e8b4 100644 --- a/roles/docenti/tasks/epoptes.yml +++ b/roles/docenti/tasks/epoptes.yml @@ -6,3 +6,21 @@ dest: /etc/default/epoptes line: 'SOCKET_GROUP="{{ ansible_local.domain.domainshort }}\docenti"' state: present + +- name: Disabling sysv start + shell: update-rc.d -f epoptes remove + sudo: yes + +- name: Installing upstart service + copy: + src: epoptes.conf + dest: /etc/init/epoptes.conf + owner: root + group: root + mode: 0644 + +- name: Ensure to start the service + service: + name: epoptes + state: started + sudo: yes