Skip to content
This repository
Browse code

more anchor patterns fixes and some repo mgmt

  • Loading branch information...
commit 4b15445f5b7df04ab8e941bde28aea7fee68b96a 1 parent 551d1c2
Henrik Feldt authored October 26, 2012
1  .gitignore
@@ -9,3 +9,4 @@ Gemfile.lock
9 9
 files/packages/
10 10
 graphs/
11 11
 metadata.json
  12
+.project
23  .project
... ...
@@ -1,23 +0,0 @@
1  
-<?xml version="1.0" encoding="UTF-8"?>
2  
-<projectDescription>
3  
-	<name>puppet-riak</name>
4  
-	<comment></comment>
5  
-	<projects>
6  
-	</projects>
7  
-	<buildSpec>
8  
-		<buildCommand>
9  
-			<name>org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder</name>
10  
-			<arguments>
11  
-			</arguments>
12  
-		</buildCommand>
13  
-		<buildCommand>
14  
-			<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
15  
-			<arguments>
16  
-			</arguments>
17  
-		</buildCommand>
18  
-	</buildSpec>
19  
-	<natures>
20  
-		<nature>org.cloudsmith.geppetto.pp.dsl.ui.puppetNature</nature>
21  
-		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
22  
-	</natures>
23  
-</projectDescription>
21  manifests/appconfig.pp
@@ -134,16 +134,18 @@
134 134
     default => $source,
135 135
   }
136 136
 
137  
-  anchor { 'riak::appconfig::start': } ->
  137
+  anchor { 'riak::appconfig::start': }
138 138
 
139 139
   file { [
140 140
       $appcfg[riak_core][platform_log_dir],
141 141
       $appcfg[riak_core][platform_lib_dir],
142 142
       $appcfg[riak_core][platform_data_dir],
143 143
     ]:
144  
-    ensure => directory,
145  
-    mode   => '0755',
146  
-    owner  => 'riak',
  144
+    ensure  => directory,
  145
+    mode    => '0755',
  146
+    owner   => 'riak',
  147
+    require => Anchor['riak::appconfig::start'],
  148
+    before  => Anchor['riak::appconfig::end'],
147 149
   }
148 150
 
149 151
   file { "${$appcfg[riak_core][platform_etc_dir]}/app.config":
@@ -154,15 +156,10 @@
154 156
       File["${$appcfg[riak_core][platform_log_dir]}"],
155 157
       File["${$appcfg[riak_core][platform_lib_dir]}"],
156 158
       File["${$appcfg[riak_core][platform_data_dir]}"],
  159
+      Anchor['riak::appconfig::start'],
157 160
     ],
  161
+    before  => Anchor['riak::appconfig::end'],
158 162
   }
159 163
 
160  
-  anchor { 'riak::appconfig::end':
161  
-    require => [
162  
-      File["${$appcfg[riak_core][platform_etc_dir]}/app.config"],
163  
-      File["${$appcfg[riak_core][platform_log_dir]}"],
164  
-      File["${$appcfg[riak_core][platform_lib_dir]}"],
165  
-      File["${$appcfg[riak_core][platform_data_dir]}"],
166  
-    ],
167  
-  }
  164
+  anchor { 'riak::appconfig::end': }
168 165
 }
2  manifests/init.pp
@@ -143,7 +143,7 @@
143 143
   }
144 144
 
145 145
   if $use_repos == true {
146  
-    package { 'riak':
  146
+    package { $package:
147 147
       ensure  => $manage_package,
148 148
       require => [
149 149
         Class[riak::config],
6  manifests/vmargs.pp
@@ -47,13 +47,15 @@
47 47
     default => $source,
48 48
   }
49 49
 
50  
-  anchor { 'riak::vmargs::start': } ->
  50
+  anchor { 'riak::vmargs::start': }
51 51
 
52 52
   file { '/etc/riak/vm.args':
53 53
     ensure  => $manage_file,
54 54
     content => $manage_template,
55 55
     source  => $manage_source,
56  
-  } ->
  56
+    require => Anchor['riak::vmargs::start'],
  57
+    before  => Anchor['riak::vmargs::end'],
  58
+  }
57 59
 
58 60
   anchor { 'riak::vmargs::end': }
59 61
 }

0 notes on commit 4b15445

Please sign in to comment.
Something went wrong with that request. Please try again.