I'm trying to update a few .sql files and had success using sed in the command line but I cannot get it to work from ansible.
The command goes something like:
- cd /tmp/Ratings_DB
- Run the command as sudo - sudo sed -i 's/TYPE/ENGINE/' *.sql
- The files are created from root account hence sudo.
My goal is to replace TYPE with ENGINE as they are older .sql dumps. Unless there is a way to do with directly in MySQL - I cannot import them.
Error 'An exception occurred during task execution. To see the full traceback, use -vvv. The error was: OSError: [Errno 2] No such file or directory: '/home/jesse/Desktop/playbooks/cd /tmp/Ratings_DB'
Seems I'm not redirecting to the correct directory somehow.