title: Different Build steps according to external variable in Drone CI
body: <p>I use Drone CI for handling CI/CD process.
  I am working on a use case where I take input variables and run different pipelines according to the key value pair.
  <a href="https://i.stack.imgur.com/SIK61.png" rel="nofollow noreferrer">Inputs to the deploy pipeline.</a></p>
  <p>Currently in my pipeline I use Ansible Plugin to push the changes to the destination. Something like this</p>
  <pre><code>- name: pipeline1
    image: plugins/ansible:3
    environment:
      &lt;&lt;: *creds
    settings:
      playbook: .ci/.ansible/playbook.yml
      inventory: .ci/.ansible/inventory
      user: admin_user
      private_key:
        from_secret: admin_key
      become: true
      verbosity: 3
    when:
      KEY1 = True
      
  - name: pipeline2
    image: plugins/ansible:3
    environment:
      &lt;&lt;: *creds
    settings:
      playbook: .ci/.ansible/playbook.yml
      inventory: .ci/.ansible/inventory
      user: admin_user
      private_key:
        from_secret: admin_key
      become: true
      verbosity: 3
    when:
      KEY2 = True
  .
  .
  .
  </code></pre>
  <p>How can I deploy such a pipeline?
  <em>when</em> keyword does not have any example in this regard</p>