Lab Information
The Nautilus DevOps team aims to manage all servers within the stack using Ansible, utilizing a common sudo user across all servers. They plan to use this user for various tasks on each server. While this isn't finalized, they're starting with testing. Ansible is already installed on the jump host via yum. Here's the requirement:
On the jump host, modify the default configuration of Ansible to enable the use of siva as the default SSH user for all hosts. Ensure to make changes within Ansible's default configuration without creating a new one.
Lab Solutions
STEP-BY-STEP SOLUTION
1️⃣ Open the default Ansible configuration file
Run on the jump host:
sudo vi /etc/ansible/ansible.cfg
2️⃣ Modify it to use siva
Add:
remote_user = siva
4️⃣ Save and exit
In vi:
:wq
5️⃣ Verify the change
Run:
ansible-config dump | grep -i remote_user
You should see:
remote_user (default) = siva
This confirms Ansible now uses siva as the default SSH user for all hosts unless overridden in inventory or playbooks.
Top comments (0)