--- - name: run commands hosts: all tasks: - name: run commands command: "{{ item }}" loop: "{{ commands }}"