How to create a dedicated "ansible-user" on RedHat 9.x

Latest response

Hi all
We are running Satellite Version 6.12 and Ansible Automation Platform 2.3. After provisioning a RedHat-Server by Satellite we use Ansible to add a dedicated “ansible-user”.

For RedHat 8 and earlier versions, we use a playbook to create a dedicated user for ansible. This template can be executed by user root with password-prompt.

But on RedHat 9 ssh for root is disabled  by default and I don’t want to enable it.

I was able to add a dedicated user account with sudoer-rights during installation by Satellite (Parameter: (remote_execution_create_user) ) but I'm not able to create a password this way. 

Without password, I can't have Ansible access the box.

My approach looks like a dead end and I would like to know how other people handle this. 

I'm looking forward for alternatives and good ideas.

 Thanks a lot

Edith

Responses