title: How do I call a role from within another role in Ansible?
body: <p>My playbook runs a list of roles:</p>
  
  <pre><code>roles:
    - common
    - postgres
    - nginx
    - supervisord
    - { role: deploy_app,  app_name: myapp }
    - { role: deploy_app,  app_name: otherapp }
  </code></pre>
  
  <p>I have another role, <code>celery</code>, that I only want to run when the app named <code>myapp</code> is created using <code>deploy_app</code>. I was thinking I should pass a parameter into the role like this:</p>
  
  <pre><code>- { role: deploy_app,  app_name: myapp, celery: yes }
  </code></pre>
  
  <p>Then within my <code>deploy_app</code> role, I would use a <code>when</code> conditional:</p>
  
  <pre><code>- name: create celery worker for application
    &lt;RUN ROLE HERE&gt;
    when: '{{ celery }}' == 'yes'
  </code></pre>
  
  <p>How can I conditionally run a role from within a task list?</p>