Which puppet module to used (How to configure), so that it can execute command in the remote machine, without using any puppet agent

for example from HOST-A, a puppet script to be executed and it takes the command and execute the command in HOST-B
what i know is the openssh keys can be used to exchange the login info, then after the command can be executed, what i'm missing is is there any module available that do this job, so that, just adding the command the same can be achieved
This is coming from the ANsible background