The createsuperuser command doesn't support a command line option to set a
password; you can only set username and email when running with the
--noinput flag. There are hackish workarounds for creating an initial
superuser with password (
http://source.mihelac.org/2009/10/23/django-avoiding-typing-password-for-superuser/),
but these wouldn't use the django_manage module. Your other option would
be writing your own custom management command for creating superusers.
For running django management commands not specifically listed in the docs,
or to use custom command options, you can specify your command and options
as a single string, e.g.:
- django_manage: command="makemigrations --noinput app1"
app_path={{app_path}} settings={{django_settings}}
On Tue, Dec 23, 2014 at 6:13 AM, Eric sharma <[email protected]>
wrote:
> The module provide here
> http://docs.ansible.com/django_manage_module.html
> needs to have some more example for manage.py command.
>
> example: createsuperuser. How can we create superuser with a specific
> username and password? is there any way to pass this information in this
> module
>
>
> - name: Django Create Superuser
> django_manage: command=createsuperuser
> app_path={{app_path}}
> settings={{django_settings}}
> tags:
> - django
>
> and how do we use latest django'(1.7)'s makemigration command where we
> have to give app name (I mean
> python manage.py makemigration app1
> )
>
> for same environment/path settings collectstatic command works perfectly
>
> - name: Django Collectstatic
> django_manage: command=collectstatic
> app_path={{app_path}}
> settings={{django_settings}}
>
>
> Could somebody please provide example of these
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/80ad9495-a9d4-43a1-a63b-10f08e465369%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/80ad9495-a9d4-43a1-a63b-10f08e465369%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAH%2BKTJ5bt%2BrPcRCCyFnMST_XtbdvB-3qgmFPtW5uZdNuXEkWMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.