arknoll / ansible-role-selenium

Ansible Role Selenium
https://galaxy.ansible.com/list#/roles/4340
Other
20 stars 52 forks source link

Ansible 2.2 service module requires systemd unit file for Ubuntu 16.04 #20

Closed geerlingguy closed 7 years ago

geerlingguy commented 7 years ago

Ansible 2.2 introduced some changes to the way the service module works with older init scripts, so the following happens under Ubuntu 16.04 if using Ansible 2.2+:

TASK [arknoll.selenium : Ensure selenium is running] ***************************
fatal: [drupalvm]: FAILED! => {"changed": false, "failed": true, "msg": "Could not find the requested service \"'selenium'\": "}

For my roles that were encountering similar issues, I had to add a systemd unit file and this solved the issue because the service module can use that instead of the custom init script.

See:

MassiveHiggsField commented 7 years ago

I've added a pr that switches to unit files for debian >= 8

kporras07 commented 7 years ago

Hi there; any update on this? Would you accept a PR with this change?

geerlingguy commented 7 years ago

This PR did a lot of the work (but was a bit Debian-centric—any systemd-based distro should use the unit file): https://github.com/arknoll/ansible-role-selenium/pull/22

A new PR would be helpful—I should think we could get it to work with CentOS 7, Debian 8, Ubuntu 16.04, etc. (any systemd-default OS).