title: Run Command Inside of Docker Container Using Ansible
body: <p>what I'm trying to accomplish is to run commands inside of a Docker container that has already been created on a Digital Ocean Ubuntu/Docker Droplet using Ansible.</p>
  
  <p>Can't seem to find anything on this, or I'm majorly missing something. This is my Ansible task in my play book. I'm very new to Ansible so any advice or wisdom would be greatly appreciated.</p>
  
  <pre><code>- name: Test Deploy
      hosts: [my-cluster-of-servers]
  
  tasks: 
    - name: Go Into Docker Container And Run Multiple Commands
      docker:
        name: [container-name]
        image: [image-ive-created-container-with-on-server]
        state: present
        command: docker exec -it [container-name] bash
  </code></pre>