Broken puppet run via puppet_proxy_customrun

setting :use_provider: to puppet_proxy_customrun causes puppet run trigger to throw erro:

failed to execute puppetrun: ERF12-4252 [ProxyAPI::ProxyException]: Unable to execute Puppet run ([RestClient::NotFound]: 404 Not Found) for proxy http://foreman.local:8000/puppet

Expected outcome:
foreman-proxy should run script defined in :command: section of puppet_proxy_puppetrun.yml

Foreman and Proxy versions:
foreman 1.22.0-1
foreman-proxy 1.22.0-1

Foreman and Proxy plugin versions:

Other relevant data:
This is log from proxy.log:

2019-10-04T16:21:19 d5875e5b [I] Started POST /puppet/run
2019-10-04T16:21:19 d5875e5b [I] Finished POST /puppet/run with 404 (13.33 ms)


:enabled: true
:puppet_version: 4.10.12
:puppet_conf: /etc/puppetlabs/puppet/puppet.conf
:use_provider: puppet_proxy_customrun


:settings_directory: /etc/foreman-proxy/settings.d
:ssl_certificate: /etc/puppetlabs/puppet/ssl/certs/cert.pem
:ssl_ca_file: /etc/puppetlabs/puppet/ssl/certs/ca.pem
:ssl_private_key: /etc/puppetlabs/puppet/ssl/private_keys/key.pem
:daemon: true
:bind_host: [‘’]
:http_port: 8000
:https_port: 8443
:log_file: /var/log/foreman-proxy/proxy.log
:log_level: DEBUG


What is the content of puppet_proxy_customrun.yml? I’m also interested what http://foreman.local:8000/features shows.

Hi, here they are:

http://foreman.local:8000/features returns:

[~]> curl http://foreman.local:8000/features


# Set :command to the full path of the script you want to run, instead of /bin/false
:command: /tmp/
# Set :command_arguments to any args you want to pass to your custom script. The hostname of the
# system to run against will be appended after the custom commands.

where is a curl towards ansible awx’s REST API


I’ve modified your post’s formatting for readability. That features is empty means there’s an issue with that means the puppet module isn’t loaded. I’d have a look at the proxy’s log.

Thanks for the edit.
Ok, here is the error, you were right:

2019-10-04T17:47:50 [E] Disabling all modules in the group [‘puppet_proxy_customrun’, ‘puppet_proxy_puppet_api’, ‘puppet’] due to a failure in one of them: Parameter ‘command_arguments’ is expected to have a non-empty value

But i do not want any argument for my script, just the hostname as the first argument as told in the comment section.
Should i implement a random argument in the script?


Ok, i got it working :grin:

Now i have:
2019-10-04T18:01:06 d5875e5b [W] Non-null exit code when executing ‘[“/tmp/”, “-n”, “mynode.local”]’
2019-10-04T18:01:06 d5875e5b [E] Failed puppet run: Check Log files
2019-10-04T18:01:06 d5875e5b [I] Finished POST /run with 500 (127298.85 ms)

where mynode.local is the hostname of the puppet node where ansible tower will run the playbook for.
if i’m not mistaken, the hostname is argument #2 since foreman-proxy will run:

/tmp/ -n mynode.local


Ok, got it working all together.
I works like a charm. Thanks for support