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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 190 - (show annotations) (download)
Sun Nov 7 13:07:01 2010 UTC (9 years, 11 months ago) by misc
File size: 1588 byte(s)
- my trick about using $name do not work as expected

1 class postgresql {
2
3 $pgsql_data = "/var/lib/pgsql/data/"
4
5 package { 'postgresql9.0-server':
6 alias => "postgresql-server",
7 ensure => installed
8 }
9
10 service { postgresql:
11 ensure => running,
12 subscribe => Package["postgresql-server"],
13 hasstatus => true,
14 }
15
16 exec { "service postgresql reload":
17 refreshonly => true,
18 subscribe => [ File["postgresql.conf"],
19 File["pg_ident.conf"],
20 File["pg_hba.conf"] ]
21 }
22
23 file { '/etc/pam.d/postgresql':
24 ensure => present,
25 owner => root,
26 group => root,
27 mode => 644,
28 content => template("postgresql/pam"),
29 }
30
31 file { "postgresql.conf":
32 path => "$pgsql_data/postgresql.conf",
33 ensure => present,
34 owner => postgres,
35 group => postgres,
36 mode => 600,
37 content => template("postgresql/postgresql.conf"),
38 require => Package["postgresql-server"],
39 }
40
41 file { 'pg_hba.conf':
42 path => "$pgsql_data/pg_hba.conf",
43 ensure => present,
44 owner => postgres,
45 group => postgres,
46 mode => 600,
47 content => template("postgresql/pg_hba.conf"),
48 require => Package["postgresql-server"],
49 }
50
51 file { 'pg_ident.conf':
52 path => "$pgsql_data/pg_ident.conf",
53 ensure => present,
54 owner => postgres,
55 group => postgres,
56 mode => 600,
57 content => template("postgresql/pg_ident.conf"),
58 require => Package["postgresql-server"],
59 }
60 }

  ViewVC Help
Powered by ViewVC 1.1.28