-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Ansible 1.8.2 shell action doesn't handle ">" redirect correctly #9791
Comments
This doesn't fix Ansible's problem but it might fix your problem. And then you can use |
I'm not able to reproduce with either 1.8.1, devel, or the 1.8.2 tag in the git repo using the following playbook:
Are you able to reproduce with that? Do you have a simpler play that shows the problem or are you able to show us enough of your mysqldump play to reproduce it? |
It should also be noted, the mysql_db module offers dump as an option, while has nothing to do with this bug report, would likely be the best module to use for the task above. |
Thanks abadger, you sample look the same as mine under all relevant aspects, i'll try to re-create a vagrant box with latest 1.8.2 version asap and let you know. ansible was installed via PIP, don't know if this may differ from a clean check out in any way. Jmainguy, mysql_db has a big limit, it works just with mysql versions up to 5.5 while I have to cover 5.6 as well. Morover dump option doesn't allow tables filtering but just full db dump. |
oh, I was not aware it stopped working with 5.5, I will have to check into that. Ty sir |
Ok guys, I've just re-upgraded the very same box to Ansible 1.8.2 via PIP and it seems that now both @abadger sample and my playbook are executing correctly. The only possible scenario I can though about is that my first installation was somehow corrupted (I was upgrading from an older 1.4.x version, while now the starting point was 1.7.2) Upgrade procedure (both this one as the previous one) completed with an error, but it seems that Ansible got updated properly.
I do not know if this can be relevant or not but surely shell module has no problem at all. :) Thanks everyone for your support, and sorry for the fake alarm, I think this issue can be closed. @michalgasek thanks for your hint, I'll try to move my shell action to command with the additional option you suggested asap |
Shell module shouldn't have any issues with ">" FWIW. Not sure why you are avoiding, but it is a good idea to use shell if you are worried about someone setting variables and making sure they don't stick something fishy in there, etc. |
@mpdehaan "avoid" is a wrong word here. |
Hi all, looking back through old issues and it appears this was resolved but never closed, so closing it now. If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved. Thank you! |
Issue Type:Bug Report
Ansible Version:1.8.2
Environment: Ubuntu 12.04 (vagrant box)
Summary:
it seems that "shell" action has some issue handling stdout redirect.
my action is (I've tried any kind of quoting)
but it always fails with error:
simply rolling-back ansible to 1.7.2 made the action back to work as usual.
This seems to be affecting any "shell" action with redirect within.
Steps To Reproduce: simply run a playbook with a shell action using a ">" redirect
The text was updated successfully, but these errors were encountered: