Commits

Denis Darii committed 5ed5ecc

bugfix in _create_django_user task

  • Participants
  • Parent commits 797e847

Comments (0)

Files changed (1)

fagungis/tasks.py

 def _create_django_user():
     with settings(hide('running', 'stdout', 'stderr', 'warnings'), warn_only=True):
         res = sudo('useradd -d %(django_user_home)s -m -r %(django_user)s' % env)
-        if 'already exists' in res:
-            puts('User \'%(django_user)s\' already exists, will not be changed.' % env)
-            return
-        #  set password
-        sudo('passwd %(django_user)s' % env)
+    if 'already exists' in res:
+        puts('User \'%(django_user)s\' already exists, will not be changed.' % env)
+        return
+    #  set password
+    sudo('passwd %(django_user)s' % env)
 
 
 def _verify_sudo():