sucessfully ran single play but not when the play is part of a task in the pb

I sucessully ran this play as a single play

I don’t see a question?
And what do you mean by this playbook being pet of a playbook task?
Where is that code? Do we need to guess again what that looks like?

Only this would need to be part of a larger playbook unless you want a playbook to have multiple PLAYS.

  • name: run rke installer
    shell: ‘rke up’
    args:
    chdir: “/home/rke”
    become: yes
    become_user: “rke”
    delegate_to: localhost
    register: result
  • debug:
    msg: "{{ result }} "