This Ansible role has been created and this .travis.yml has been used as an example in order to test the role. All services were able to start, except the sensu-client.
Attempts to solve the issue
In order to solve the issue a debug step was added to travis. When the build completed the following error was thrown:
The command "sudo docker exec "$(cat ${container_id})" ansible-playbook /etc/ansible/roles/role_under_test/tests/test-${SITE}.yml | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1)
" exited with 1.
0.07s$ sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm sudo systemctl status sensu-client.service -l
● sensu-client.service - LSB: Sensu monitoring framework client
Loaded: loaded (/etc/rc.d/init.d/sensu-client)
Active: failed (Result: exit-code) since Mon 2016-08-08 00:18:20 UTC; 131ms ago
Docs: man:systemd-sysv-generator(8)
Process: 1534 ExecStart=/etc/rc.d/init.d/sensu-client start (code=exited, status=1/FAILURE)
Aug 08 00:18:19 c6354976113c systemd[1]: Starting LSB: Sensu monitoring framework client...
Aug 08 00:18:19 c6354976113c sensu-client[1534]: /etc/init.d/sensu-service: line 71: /etc/init.d/functions: No such file or directory
Aug 08 00:18:19 c6354976113c sensu-client[1534]: Starting sensu-client/etc/init.d/sensu-service: line 79: daemon: command not found
Aug 08 00:18:20 c6354976113c sensu-client[1534]: /etc/init.d/sensu-service: line 88: echo_failure: command not found
Aug 08 00:18:20 c6354976113c systemd[1]: sensu-client.service: control process exited, code=exited status=1
Aug 08 00:18:20 c6354976113c systemd[1]: Failed to start LSB: Sensu monitoring framework client.
Aug 08 00:18:20 c6354976113c systemd[1]: Unit sensu-client.service entered failed state.
Aug 08 00:18:20 c6354976113c systemd[1]: sensu-client.service failed.
When the ansible role is deployed on a remote system the sensu-client starts, but it fails on Travis although the other services are able to start.