Unable to used the PBRUN command in Ansible

Hi Team,
i am new in Ansible. i have installed the Ansible core and my environment used pbrun bash to give the privallage access to the server and want to use the same in Ansible playbook. Could you guide me how to used this. This is urgent.

Regards
Shtrudhan Kumar

I don’t see any playbook, or other content.
What did you try already?
What are you trying to automate?

On a side note, if you are new to ansible, what is the urgency about?

I meant what does DISTRIB_CODENAME evaluate to on the target system?

“bionic” . All fine

Ha ok tiny hiccup.
Glad it works.
And in 3 lines!

Thank you,

Hello,

First, are you using the same account with the playbook and when you test interactively ?

And are you sure you are using the same “become_user” ?

Second, when your playbook run a task/module, it is using a clean minimal environment ?
Are you able to issue the same command in non interactive mode ? (for example from a cron/at/…)

If you have to do “pbrun bash” then the command, it’s not exactly the same as doing “pbrun thecommand” (what you are asking your playbook to do) You’re first loading a specific interpreter (and I’m not sure your playbook is using the same exact shell) in interactive session (hence setting environment variables and doing stuffs via the ~/.bashrc or ~/.profile etc)

Just few hints.
Regards.