title: How to execute ansible playbook with sudo privilege
body: <p>I've got a problem with running ansible-playbook</p>
  
  <p>See below my playbook</p>
  
  <pre><code>---
  - hosts: some_group
    remote_user: someuser
    become: true
    become_method: sudo
    tasks:
    - name: Copy file to remote nodes
      copy: src=/root/ansible/someimage dest=/home/someuser/
  
    - name: Load exported file of nginx image
      command: docker load -i /home/someuser/someimage
  </code></pre>
  
  <p>The command in terminal is:</p>
  
  <p><strong><code>ansible-playbook test.yml --ask-pass -K</code></strong></p>
  
  <p>ansible version is 2.0.0.2</p>
  
  <p>The error is : "stderr": "Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:</p>