I am using ansible playbook to deploy a model in one of my remote server, I need to pass the responses like version number while running the script so I am using expect module.
NOTE: This deploy script can only be executed with super-user and there are some environment variables that has been set in .bashrc . So I am assuming I need to source .bashrc in order to get rid of that missing environment variable error. can anyone please help if there is any other solution to run deploy script in remote server using ansible playbook ?
Below is my ansible-playbook script: