title: Ansible: run multiple action
body: <p>I am running ansible to copy and execute the script on remote side if script not found. but I am getting this error. </p>
  
  <p><strong>ERROR! conflicting action statements: copy, command</strong></p>
  
  <p>How can i use multiple action in single task.</p>
  
  <pre><code>---
  - name: Check if the bb.sh exists
    stat:
      path: /tmp/bb.sh
    register: stat_result
  
  - name: Copy and execute script
    copy: src=sync/bb.sh dest=/tmp/sync/ mode=0755
    command: sh -c "/bin/sh /tmp/bb.sh"
    when: stat_result.stat.exists == False
  </code></pre>