title: How to add optional variables in the ansible command line and check for their existence in the playbook?
body: <p>I would like to run a particular task only if a flag is given in the command line. For example, I would like to run the ansible-playbook command with the following: <code>--extra-vars "composer-install=true"</code>. I would somehow need a task that checks if the <code>composer-install</code> variable is set, and if set and equal to true, run the given task which runs <code>composer install</code>. I'm not quite sure how to do that last part.</p>