/[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 523 by misc, Tue Dec 7 02:40:21 2010 UTC revision 524 by misc, Tue Dec 7 02:40:22 2010 UTC
# Line 67  class postgresql { Line 67  class postgresql {
67          content => template("postgresql/pg_ident.conf"),          content => template("postgresql/pg_ident.conf"),
68          require => Package["postgresql-server"],          require => Package["postgresql-server"],
69      }      }
70    
71        define user($password) {
72            $sql = "CREATE ROLE $name ENCRYPTED PASSWORD '$password' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;"
73    
74            exec { "psql -U postgres -c \"$sql\" ":
75                user => root,
76                unless => "psql -A -t -U postgres -c '\du $name' | grep '$name'",
77            }
78        }
79  }  }

Legend:
Removed from v.523  
changed lines
  Added in v.524

  ViewVC Help
Powered by ViewVC 1.1.28