title: Pass bash script arguments to ansible command in script
body: <p>I'm trying to run this command from a bash script and pass the extra-vars from the bash arguments.</p>
  
  <pre><code>#!/bin/bash
  ansible-playbook /path/to/playbook.yml --extra-vars "var1=1 $@" &gt; /path/to/log/file
  </code></pre>
  
  <p>I run the script like below and get this error:</p>
  
  <pre><code>&gt; ./test.bs var2=2 var3=3
  ERROR! the playbook: var3=3 could not be found
  </code></pre>
  
  <p>I even tried escaping the quotes but it didn't work.
  How can I get this to run?</p>