![](https://www.devopsschool.com/blog/wp-content/uploads/2018/12/Login-to-linux.png)
Here is the scnario which we tried last week with Pranav Goel in order to login the Ansible remote server which is enlabe with LDAP and become a su to execute any playbook tasks. Here are the steps given as below;
Inventory:
[code]
[root@ussltcovm498 ansible]# cat inventory
hostname.demo.com ansible_user=adname\\aduser ansible_ssh_pass=password ansible_become_pass=password
[/code]
Ansible Configuration File)
[code]
[privilege_escalation]
become=True
become_method=su
become_user=oracle
#become_ask_pass=True
[/code]
Note:
In order to pass LDAP user use “\\”
Command to Check:
[code]ansible all -i inventory -m command -a “whoami”[/code]
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 1
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 2
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 3
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 4
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 5
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 6
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 7
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 8
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 9
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 10
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 11
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 12
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 13
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 14
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Beginner to Advanced Complete Ansible Tutorial in 15 hours 6-2021 Part – 15
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
Latest posts by Rajesh Kumar (see all)
- How to remove sensitive warning from ms office powerpoint - July 14, 2024
- AIOps and DevOps: A Powerful Duo for Modern IT Operations - July 14, 2024
- Leveraging DevOps and AI Together: Benefits and Synergies - July 14, 2024