Example
# user & passowd & sudo without password
[web]
1.2.3.4 mynameinv=Rajesh in inventory
1.2.3.5
1.2.3.6
1.2.3.7
[web:vars]
ansible_user=user1
ansible_ssh_pass=pass1
ansible_become=yes
# user & key & sudo with password
[app]
2.2.3.4 mynameinv=Rajesh in inventory
3.2.3.5
4.2.3.6
5.2.3.7
[app:vars]
ansible_user=user1
ansible_ssh_private_key_file=node.pem
ansible_become=yes
ansible_become_pass=pass123
# user & key & sudo with Diff user and password
[log]
6.2.3.4 ansible_user=user1 ansible_ssh_private_key_file=node.pem ansible_become=yes ansible_become_user=user2 ansible_become_pass=pas122
7.2.3.5
8.2.3.6
9.2.3.7
# user & pass & sudo with Diff user and password
[db]
6.2.3.1 ansible_user=user1 ansible_ssh_pass=pass1 ansible_become=yes ansible_become_user=user2 ansible_become_pass=pass2
7.2.3.2
8.2.3.3
9.2.3.4
Code language: PHP (php)
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals