/[adm]/puppet/modules/postgresql/manifests/init.pp
ViewVC logotype

Diff of /puppet/modules/postgresql/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 646 by misc, Fri Dec 17 01:45:21 2010 UTC revision 773 by misc, Thu Jan 13 18:12:22 2011 UTC
# Line 57  class postgresql { Line 57  class postgresql {
57              require => Package["postgresql-server"],              require => Package["postgresql-server"],
58          }          }
59                    
60            # TODO use augeas to manage this file once augeas 0.7.4 is installed
61            # on our server, as this would allow use to autodeclare database in it without
62            # much trouble
63          file { 'pg_hba.conf':          file { 'pg_hba.conf':
64              path => "$pgsql_data/pg_hba.conf",              path => "$pgsql_data/pg_hba.conf",
65              ensure => present,              ensure => present,
# Line 77  class postgresql { Line 80  class postgresql {
80              require => Package["postgresql-server"],              require => Package["postgresql-server"],
81          }          }
82    
83            # TODO add a system of tag so we can declare database on more than one
84            # server
85          Postgresql::User <<| |>>          Postgresql::User <<| |>>
86          Postgresql::Database <<| |>>          Postgresql::Database <<| |>>
87      }      }
# Line 89  class postgresql { Line 94  class postgresql {
94              unless => "psql -A -t -U postgres -l | grep '^$name|'",              unless => "psql -A -t -U postgres -l | grep '^$name|'",
95          }          }
96      }      }
97        
98        # TODO convert to a regular type, so we can later change password without erasing the
99        # current user
100      define user($password) {      define user($password) {
101          $sql = "CREATE ROLE $name ENCRYPTED PASSWORD '\$pass' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;"          $sql = "CREATE ROLE $name ENCRYPTED PASSWORD '\$pass' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;"
102    

Legend:
Removed from v.646  
changed lines
  Added in v.773

  ViewVC Help
Powered by ViewVC 1.1.30