ansible-playbooks icon indicating copy to clipboard operation
ansible-playbooks copied to clipboard

[dev.icinga.com #8831] TASK fails on /sbin/initctl status icinga2

Open icinga-migration opened this issue 10 years ago • 2 comments
trafficstars

This issue has been migrated from Redmine: https://dev.icinga.com/issues/8831

Created by thoth on 2015-03-21 14:08:50 +00:00

Assignee: (none) Status: New Target Version: (none) Last Update: 2015-03-25 14:36:17 +00:00 (in Redmine)


I was trying out ansible, and tried to shoehorn the ansible playbook into a docker container with ansible in it and try the install from there. It fails on me at this step:

TASK: [icinga2-ansible-no-ui | Start Icinga2] ********************************* 
failed: [icinga_one] => {"cmd": "/sbin/initctl status icinga2", "failed": true, "rc": 8}
msg: [Errno 8] Exec format error

might be just happening too fast and I need to insert a wait in there. But I thought I'd gather any suggestions here. If you'd like to take a look at my docker container it is here:

https://github.com/joshuacox/docker-ansible-icinga2

icinga-migration avatar Mar 21 '15 14:03 icinga-migration

Updated by thoth on 2015-03-21 16:59:42 +00:00

this is due to the architecture of docker containers and merely obscures my original issue, this one can be closed, I'll post another issue that describes my issue in more detail, and a repo with it isolated if I can think of a way to do that.

icinga-migration avatar Mar 21 '15 16:03 icinga-migration

Updated by thoth on 2015-03-25 14:36:17 +00:00

looking back at this and the prevalence of docker this might be worth keeping open and working on. I believe the solution involves determining that ansible is indeed running inside a docker environment (maybe a semaphore can be given by the user). And then foregoing the restart kicked off my the playbook, being understood that the creator of the docker container will probably use supervisord or something similar to start icinga2. I have docker containers for all of the configuration management options from the official icinga team, if you look around my github account you'll see I'm forking all sorts of icinga related docker containers, or making my own if they don't exist.

icinga-migration avatar Mar 25 '15 14:03 icinga-migration