title: Running sed command from ansible
body: <p>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.</p>
  
  <p>The command goes something like:</p>
  
  <ol>
  <li>cd /tmp/Ratings_DB</li>
  <li>Run the command as sudo - sudo sed -i 's/TYPE/ENGINE/' *.sql</li>
  <li>The files are created from root account hence sudo.</li>
  </ol>
  
  <p>My goal is to replace <code>TYPE</code> with <code>ENGINE</code> as they are older .sql dumps. Unless there is a way to do with directly in MySQL - I cannot import them.</p>
  
  <blockquote>
    <p>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'</p>
  </blockquote>
  
  <p>Seems I'm not redirecting to the correct directory somehow.</p>