Ansible playbook to set up rex on forklift devel server?

I am struggling to get rex to run on the forklift devel server itself. I tried the steps in manual[1] (note foreman-tasks.service doesn’t exist so can’t be restarted). Does anyone have an ansible-playbook to set everything up on a devel server? Or if you know the exact steps, I can write the playbook and contribute.

The error I get is Error initializing command: Net::SSH::AuthenticationFailed - Authentication failed for user I have added root’s and vagrant’s pub keys to foreman-proxy’s authorized-keys and vagrant’s to root’s.

[1] Foreman :: Plugin Manuals

I don’t use forklift so this will be a bit more general, but hopefully this will give you enough to get it up and running.

foreman-tasks service was renamed to dynflowd some time ago and the docs weren’t updated yet. Adding it to my todo list.

You’re trying to log into as root. In order for it to work, root on that machine has to have foreman-proxy's public key (located in ~foreman-proxy/.ssh/id_rsa_foreman_proxy) in /root/.ssh/authorized_keys.

It sounds you did it the other way around.

What I usually do is log into the target machine as the intended target user and do the following:

umask 077
mkdir -p ~/.ssh
curl $FOREMAN_PROXY_URL/ssh/pubkey >> ~/.ssh/authorized_keys