Please note the the “Puppet Run” functionality has been deprecated and will be removed in Foreman 2.2, in part due to the difficulty of setting it up properly (as well as the fact this functionality was removed from puppet itself many years ago). The recommended way of triggering a one-off puppet agent execution is using the Remote Execution plugin. Dropping "Run puppet" button with a replacement using remote execution plugin has more information.