Commits

Vladimir Mihailenco  committed 84ba81c

Fix postgres db_root_user and db_root_password usage

  • Participants
  • Parent commits bb9cc03

Comments (0)

Files changed (2)

File fabdeploy/containers.py

     db_password = '%(user)s'
     db_host = 'localhost'
     mysql__db_root_user = 'root'
+    mysql__db_root_password = 'mysql'
     mysql__db_port = 3306
     postgres__db_root_user = 'postgres'
+    postgres__db_root_password = 'postgres'
     postgres__db_port = 5432
 
     pip_cache_path = '/var/run/pip-download-cache'

File fabdeploy/postgres.py

     'grant',
     'set_config',
     'set_config_for_django',
-    'db_size',
-    'table_size',
     'shell',
     'restart',
     'reload',
 class Install(Task):
     def do(self):
         system.aptitude_install.run(packages='postgresql libpq-dev')
-        sudo('sudo -u postgres psql --command="\password postgres" postgres')
+        sudo('sudo -u %(db_root_user)s '
+             'psql '
+             '--command="\password %(db_root_user)s" %(db_root_password)s')
 
 install = Install()