--- - name: Start gemserv hosts: gemserv become: true become_user: root become_method: sudo tasks: - name: Start gemserv become: true become_user: root become_method: sudo ansible.builtin.shell: cmd: whoami && sv stop gemserv