-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling opam commands in Ansible doesn't work well; not sending exit? #4102
Comments
Thanks for the report! Do you know what is the exact command that keep alive? Unless there is user interaction (confirm of some actions), opam always exits wit some predefined value. On the second run, switch seems to be already created (does package is well installed?), so maybe there is an unanswered question that keep it alive (you don't pass the |
Interesting. I'd have to investigate further. There's definitely no errors occurring, and I'd assume anything with a -y (yes) or -f (force) or -a (auto) or --no-user-input-required should return 0 unless there's an error. From a clean install, this definitely hangs on |
From a clean env, with |
This should be resolvable with either adding |
Have both OPAMYES and -y everywhere, but this issue persists. However, due to ansible very complicated command execution scheme, I have no idea what's causing the problem. It seems for some reason ansible cant detect opam command completion. The only thing I managed to find is that if opam wants to install packages via apt — it ignores opamyes and -y completely: you have to enter y for opam and also y for apt installation. May be this is the issue. |
I'm installing ocaml packages using
opam
via Ansible. I don't know what's wrong... I don't thinkopam
returns the correct exit signal or something because Ansible always hangs when trying to doopam
commands. If I cancel the deploy then run it again it works because the second time around the package already exists and that timeopam
gives the correct exit signal.For example, this simply runs these commands on the machine:
Even with the auto/yes flags it still hangs. I don't even get a timeout from Ansible which suggests something is still open? I cancel the Ansible deploy, then run this again, and it get success output like,
It's likely this is more of an "ansible" thing, but simply running
shell: echo test
works as expected - the command doesn't hang. So I feel likeopam
should do something else once it's finished successfully installing or initialising things.Thanks,
Keoni.
The text was updated successfully, but these errors were encountered: