[ansible-project] Re: How to use external variable inside an ansible inventory file.

2015-12-15 Thread anoop . kolari
Any suggestion guys?? On Tuesday, December 15, 2015 at 1:00:25 PM UTC+5:30, anoop@tarams.com wrote: > > Hi, > > I have an inventory file 'inventory/localhost' and contains; > [localhost] > "{{MYSITE_NAME}}-local.com"ansible_ssh_port= > > > Lets say 'MYSITE_NAME' is a variable

[ansible-project] How to use external variable inside an ansible inventory file.

2015-12-14 Thread anoop . kolari
Hi, I have an inventory file 'inventory/localhost' and contains; [localhost] "{{MYSITE_NAME}}-local.com"ansible_ssh_port= Lets say 'MYSITE_NAME' is a variable defined in some file. I need to access this inside my inventory file. Please suggest some solution. --

[ansible-project] Re: Access ansible list in python script.

2015-12-10 Thread anoop . kolari
Hi Mike, Thank you for your response. I resolved this by following steps. 1. I quoted the arguments passed with the command like python /home/vagrant/setup/configs/update_installed_app.py "*['django-allauth', 'test']*" 2. In python script I can access it as a string. Then using python 'ast'

[ansible-project] Access ansible list in python script.

2015-12-09 Thread anoop . kolari
Hi, I'm calling a python script by passing an ansible list as an argument. command: "python /home/vagrant/setup/configs/update_installed_app.py ['django-allauth', 'test']" But when i print this list in my python script its printing with misplaced quotes, so i couldnt process it with python.

[ansible-project] Re: Ansible createsuperuser with django_manage module.

2015-12-07 Thread anoop . kolari
Hi Chris, I have created a custom django management command to set admin password called 'change_django_admin_password' and calling this through ansible as below; - name: "Run django manage commands for the apps." django_manage: command="{{item.cmd}}"

[ansible-project] django_manage with custom django manage commands.

2015-12-03 Thread anoop . kolari
Does ansible 1.7.1 supports execution of custom django manage commands with ansible django_manage module? -- = DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this

[ansible-project] Re: Ansible createsuperuser with django_manage module.

2015-12-03 Thread anoop . kolari
Thanks Chris. Instead of the solution you have suggested, I'm tried to create a custom django manage command. But when i invoked this from ansible through django_manage, its throws an error like the one below. fatal: [djangoskeleton-local.com] => failed to parse:

[ansible-project] Ansible createsuperuser with django_manage module.

2015-12-02 Thread anoop . kolari
Hi, I'm creating a super user for my django application through ansible. Script is below. django_manage: command="createsuperuser --noinput --username=admin --email= anoop.kol...@tarams.com" app_path={{ django_dir }} settings={{settings_path}} Its creating the super user with some random