title: Passing Values in Variables to run specific commands in Ansible
body: <p>I have a yml file which installs ODBC Connections on a windows nodes using powershell. For Each DB type we have different yml files and each yml has install scripts for different Databases.</p>
  <p>So, everytime we want to change or add a new connection, we comment out all but the one that is only required to be executed and this requires a lot of manual work as and when a connection is changed or added.</p>
  <p>This is how i defined the win_command:</p>
  <pre class="lang-yaml prettyprint-override"><code>- name: Run xxxx Oracle
    win_command: powershell -executionpolicy unrestricted folder:\xxx.ps1 -Server {{ XXXX_DB_SERVER }} -UID {{ XXXX_Username }} -PWD {{ XXXXX }} -Database {{ XXX_DB_NAME }} -DSN {{ XXXX_DSN }}
    register: cmdXXXXX
  - debug: var=cmdXXXX
  </code></pre>
  <p>I have commands like this for almost 9 DBs in this yml. I want to create a variable which will be provided at runtime and only those commands should be executed to install the DB connections.</p>