~ubuntu-branches/ubuntu/oneiric/puppet/oneiric-security

« back to all changes in this revision

Viewing changes to examples/components

  • Committer: Bazaar Package Importer
  • Author(s): Micah Anderson
  • Date: 2008-07-26 15:43:45 UTC
  • mto: (3.1.1 lenny) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20080726154345-1fmgo76b4l72ulvc
ImportĀ upstreamĀ versionĀ 0.24.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id$
 
2
 
 
3
# i still have no 'require'-like functionality, and i should also
 
4
# have 'recommend'-like functionality...
 
5
define apache(php,docroot,user,group) {
 
6
    package { apache:
 
7
        version => "2.0.53"
 
8
    }
 
9
    service { apache:
 
10
        running => true
 
11
    }
 
12
 
 
13
 
 
14
    # this definitely won't parse
 
15
    #if $php == "true" {
 
16
    #    # this needs to do two things:
 
17
    #    # - mark a dependency
 
18
    #    # - cause this apache component to receive refresh events generated by php
 
19
    #    #require("php")
 
20
    #    $var = value
 
21
    #}
 
22
 
 
23
    #file { "../examples/root/etc/configfile":
 
24
    #    owner => $user
 
25
    #}
 
26
}
 
27
 
 
28
define sudo() {
 
29
    package { sudo:
 
30
        version => "1.6.8p7"
 
31
    }
 
32
    file { "/etc/sudoers":
 
33
        owner => root,
 
34
        group => root,
 
35
        mode => "440"
 
36
    }
 
37
}
 
38
 
 
39
define ssh {
 
40
    package { ssh:
 
41
        version => "3.4.4.4"
 
42
    }
 
43
    service { "sshd":
 
44
        running => true
 
45
    }
 
46
}
 
47
 
 
48
define sleeper(path,mode) {
 
49
    Service {
 
50
        path => "../examples/root/etc/init.d"
 
51
    }
 
52
 
 
53
    service { sleeper:
 
54
        running => true,
 
55
        path => "../examples/root/etc/init.d"
 
56
    }
 
57
    file { $path:
 
58
        mode => $mode
 
59
    }
 
60
    $files = ["/tmp/testness","/tmp/funtest"]
 
61
    file { $files:
 
62
        ensure => file
 
63
    }
 
64
}
 
65
 
 
66
#apache { "test":
 
67
#    php => false,
 
68
#    docroot => "/export/html",
 
69
#    user => "www-data",
 
70
#    group => "www-data"
 
71
#}
 
72
 
 
73
#ssh { "yucko":}