#hello this is my first playbookk
- name: Ejecutar comando dinámico
  hosts: all
  become: yes

  vars:
    comando: "{{ command }}"

  tasks:
    - name: Ejecutar comando recibido
      shell: "{{ comando }}"
      register: resultado

    - name: Mostrar salida
      debug:
        var: resultado.stdout