title: Ansible - default to everything when no arguments are specified
body: <p>I have a fairly large playbook that is capable of updating up to 10 services on a given host.</p>
  
  <p>Let's say I have the services a b c d and I'd like to be to be able to selectively update the services by passing command line arguments, but default to updating everything when no arguments are passed. How could you do this in Ansible without being able to drop into arbitrary scripting?</p>
  
  <p>Right now what I have is a when check on each service and define whether or not the service is true at playbook invocation. Given I may have as many as 10 services, I can't write boolean logic to accommodate every possibility.</p>
  
  <p>I was hoping there is maybe a builtin like $@ in bash that lists all arguments and I can do a check along the lines of <code>when: $@.length = 0</code></p>
  
  <pre><code>ansible-playbook deploy.yml -e "a=true b=true d=true"
  
  when: a == "true"
  when: b == "true"
  when: c == "true"
  when: d == "true"
  </code></pre>