Login to linux ansible remote server enabled with LDAP using SSH?

By | December 3, 2018

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:

[root@ussltcovm498 ansible]# cat inventory
hostname.demo.com ansible_user=adname\\aduser ansible_ssh_pass=password ansible_become_pass=password

Ansible Configuration File)

[privilege_escalation]
become=True
become_method=su
become_user=oracle
#become_ask_pass=True

Note:
In order to pass LDAP user use “\\”

Command to Check:

ansible all -i inventory -m command -a "whoami"

 

Leave a Reply