title: Ansible Using --extra-vars for conditional includes
body: <p>I am using Ansible to deploy an environment that may have services distributed or not.  I would like to conditionally include playbooks based on arguments I pass to ansible-playbook.</p>
  
  <p>create_server.yml</p>
  
  <pre><code>---
  - include: launch_ec2_instance.yml
  
  - include install_postgres.yml
    when {{db}} == "Y"
  
  - include install_redis.yml
    when {{redis}} == "Y"
  </code></pre>
  
  <p>Here is how I am calling create_server.yml</p>
  
  <pre><code>ansible-playbook create_server.yml -i local --extra-vars "db=Y redis=N"
  </code></pre>
  
  <p>Is it possible to do this and if so, how?</p>