1

I'm using ansible-playbook to deploy my django application to Ubuntu servers. I'm storing my django environment variables in .bashrc file of the user ubuntu in the server. But my ansible-playbook is not using the env variables in .bashrc even when i'm running as ubuntu user. Is there any way for me to access these env variables using ansible-playbook.

  • 2
  • @techraf i'm having issues with accessing the values that i add in .bashrc when i run some commands using ansible. I can add the values but ansile-playbook is not using these values when i run some commands. – Nijo Aug 19 '17 at 10:03
  • 1
    Of course you have, because bash does not read .bashrc in non-interactive mode. – techraf Aug 19 '17 at 10:05
  • @techraf then how can i run django management commands in ansible using the variables in .bashrc – Nijo Aug 19 '17 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.