Bootstrapping a Red Hat Enterprise Linux (RHEL) 9 server on-premises for Ansible involves setting up SSH, Python, and a sudo user, tailored to RHEL’s specifics (e.g., dnf
package manager, wheel
group for sudo). Since this is your first server, I’ll provide a concise, secure, and RHEL-specific process to get it ready for Ansible management, including a shell script to automate the bootstrap. The process assumes you have initial access to the server (e.g., via root or a default user) and are setting it up from a control node (your local machine or another server running Ansible).
- RHEL 9 installed: Ensure the server has a base installation with SSH enabled (usually included in RHEL’s default setup).
- Control node: A machine with Ansible installed (can be your local machine or another server).
- Network access: The control node must reach the server via SSH (port 22).
- Initial credentials: Root access or a user with sudo privile