Hi everybody,
I’m deploying Adobe CQ projects with Ansible, everything works fine except the restart at the end of the deployment.
The excerpt of the my playbook:
-
name: Stop of CQ instance
command: sudo /etc/init.d/cq stop
-
name: make sure CQ is stopped
service: name=cq state=stopped (The Stop works fine, it checks the state and jumps to the next Task)

- name: Start of CQ instance
command: sudo /etc/init.d/cq start ( The instance starts well but the playbook stops here and ignores the further tasks )

I think it is because it doesn’t get any Return Code…
Is there a possibility to jump to the next task without any Return Code / Output?
Afterwards I would check if the port 4503 is available and go on cleaning the dispatcher cache and deleting the precompiled jsps as my last tasks.
-
name: CQ Port Monitoring
wait_for: port=4503 delay=300
-
name: Clean Dispatcher Cache
shell: rm -rf /opt/daycq/dispatcher/cache/publish*/*
-
name: Delete precompiled jsps
command: curl -X DELETE http://localhost:4503/var/classes/org/apache/jsp/apps/ -u {{username}}:{{password}}
Thank you in advance
Best regards,
Julián Jamardo
Hi
Hi everybody,
I'm deploying Adobe CQ projects with Ansible, everything works fine except the
restart at the end of the deployment.
The excerpt of the my playbook:
- name: Stop of CQ instance
command: sudo /etc/init.d/cq stop
- name: make sure CQ is stopped
service: name=cq state=stopped (The Stop works fine, it checks the
state and jumps to the next Task)
[wNR84w9g]
- name: Start of CQ instance
command: sudo /etc/init.d/cq start ( The instance starts well but the
playbook stops here and ignores the further tasks )
I have seen that before on badly written init scripts that do not
detach from the TTY properly. (Or fails to become a process group
leader - not sure which).
Try an experiment: Start the CQ service using ansible. And watch
ansible hang. Leave it hanging. Then (from a different ssh session),
stop the service manually. Does ansible then continue?
If so, it is likely that the CQ instance has the terminal open that
was used for starting it.
Short of fixing the init script, making ansible run:
sudo nohup e/tc/init.d/cq start
may work then.
yeah ansible contains some prevention for bad init scripts where it will daemonize around them to “trick” them into returning.
It’s occasionally not perfect.
I’m not familiar with Adobe CQ, but what OS are you managing when this happens?