Skip to content

Commit 7c1a966

Browse files
committed
Update README.md.erb
Add colored syntax highlighting for better visibilty.
1 parent 90c8681 commit 7c1a966

File tree

1 file changed

+67
-50
lines changed

1 file changed

+67
-50
lines changed

README.md.erb

+67-50
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ The module is based on **stdmod** naming standards version 0.9.0.
2222

2323
Refer to http://github.com/stdmod/ for complete documentation on the common parameters.
2424

25-
2625
##Setup
2726

2827
###Resources managed by <%= metadata.name %> module
@@ -40,87 +39,106 @@ Refer to http://github.com/stdmod/ for complete documentation on the common para
4039

4140
To install the package provided by the module just include it:
4241

43-
include <%= metadata.name %>
42+
```puppet
43+
include <%= metadata.name %>
44+
```
4445

4546
The main class arguments can be provided either via Hiera (from Puppet 3.x) or direct parameters:
4647

47-
class { '<%= metadata.name %>':
48-
parameter => value,
49-
}
48+
```puppet
49+
class { '<%= metadata.name %>':
50+
parameter => value,
51+
}
52+
```
5053

5154
The module provides also a generic define to manage any <%= metadata.name %> configuration file:
5255

53-
<%= metadata.name %>::conf { 'sample.conf':
54-
content => '# Test',
55-
}
56-
56+
```puppet
57+
<%= metadata.name %>::conf { 'sample.conf':
58+
content => '# Test',
59+
}
60+
```
5761

5862
##Usage
5963

6064
* A common way to use this module involves the management of the main configuration file via a custom template (provided in a custom site module):
6165

62-
class { '<%= metadata.name %>':
63-
config_file_template => 'site/<%= metadata.name %>/<%= metadata.name %>.conf.erb',
64-
}
66+
```puppet
67+
class { '<%= metadata.name %>':
68+
config_file_template => 'site/<%= metadata.name %>/<%= metadata.name %>.conf.erb',
69+
}
70+
```
6571

6672
* You can write custom templates that use setting provided but the config_file_options_hash paramenter
6773

68-
class { '<%= metadata.name %>':
69-
config_file_template => 'site/<%= metadata.name %>/<%= metadata.name %>.conf.erb',
70-
config_file_options_hash => {
71-
opt => 'value',
72-
opt2 => 'value2',
73-
},
74-
}
74+
```puppet
75+
class { '<%= metadata.name %>':
76+
config_file_template => 'site/<%= metadata.name %>/<%= metadata.name %>.conf.erb',
77+
config_file_options_hash => {
78+
opt => 'value',
79+
opt2 => 'value2',
80+
},
81+
}
82+
```
7583

7684
* Use custom source (here an array) for main configuration file. Note that template and source arguments are alternative.
7785

78-
class { '<%= metadata.name %>':
79-
config_file_source => [ "puppet:///modules/site/<%= metadata.name %>/<%= metadata.name %>.conf-${hostname}" ,
80-
"puppet:///modules/site/<%= metadata.name %>/<%= metadata.name %>.conf" ],
81-
}
82-
86+
```puppet
87+
class { '<%= metadata.name %>':
88+
config_file_source => [ "puppet:///modules/site/<%= metadata.name %>/<%= metadata.name %>.conf-${hostname}" ,
89+
"puppet:///modules/site/<%= metadata.name %>/<%= metadata.name %>.conf" ],
90+
}
91+
```
8392

8493
* Use custom source directory for the whole configuration directory, where present.
8594

86-
class { '<%= metadata.name %>':
87-
config_dir_source => 'puppet:///modules/site/<%= metadata.name %>/conf/',
88-
}
95+
```puppet
96+
class { '<%= metadata.name %>':
97+
config_dir_source => 'puppet:///modules/site/<%= metadata.name %>/conf/',
98+
}
99+
```
89100

90101
* Use custom source directory for the whole configuration directory and purge all the local files that are not on the dir.
91102
Note: This option can be used to be sure that the content of a directory is exactly the same you expect, but it is desctructive and may remove files.
92103

93-
class { '<%= metadata.name %>':
94-
config_dir_source => 'puppet:///modules/site/<%= metadata.name %>/conf/',
95-
config_dir_purge => true, # Default: false.
96-
}
104+
```puppet
105+
class { '<%= metadata.name %>':
106+
config_dir_source => 'puppet:///modules/site/<%= metadata.name %>/conf/',
107+
config_dir_purge => true, # Default: false.
108+
}
109+
```
97110

98111
* Use custom source directory for the whole configuration dir and define recursing policy.
99112

100-
class { '<%= metadata.name %>':
101-
config_dir_source => 'puppet:///modules/site/<%= metadata.name %>/conf/',
102-
config_dir_recursion => false, # Default: true.
103-
}
113+
```puppet
114+
class { '<%= metadata.name %>':
115+
config_dir_source => 'puppet:///modules/site/<%= metadata.name %>/conf/',
116+
config_dir_recursion => false, # Default: true.
117+
}
118+
```
104119

105120
* Provide an hash of files resources to be created with <%= metadata.name %>::conf.
106121

107-
class { '<%= metadata.name %>':
108-
conf_hash => {
109-
'<%= metadata.name %>.conf' => {
110-
template => 'site/<%= metadata.name %>/<%= metadata.name %>.conf',
111-
},
112-
'<%= metadata.name %>.other.conf' => {
113-
template => 'site/<%= metadata.name %>/<%= metadata.name %>.other.conf',
114-
},
115-
},
116-
}
122+
```puppet
123+
class { '<%= metadata.name %>':
124+
conf_hash => {
125+
'<%= metadata.name %>.conf' => {
126+
template => 'site/<%= metadata.name %>/<%= metadata.name %>.conf',
127+
},
128+
'<%= metadata.name %>.other.conf' => {
129+
template => 'site/<%= metadata.name %>/<%= metadata.name %>.other.conf',
130+
},
131+
},
132+
}
133+
```
117134

118135
* Do not trigger a service restart when a config file changes.
119136

120-
class { '<%= metadata.name %>':
121-
config_dir_notify => '', # Default: Service[<%= metadata.name %>]
122-
}
123-
137+
```puppet
138+
class { '<%= metadata.name %>':
139+
config_dir_notify => '', # Default: Service[<%= metadata.name %>]
140+
}
141+
```
124142

125143
##Operating Systems Support
126144

@@ -129,7 +147,6 @@ This is tested on these OS:
129147
- Debian 6 and 7
130148
- Ubuntu 10.04 and 12.04
131149

132-
133150
##Development
134151

135152
Pull requests (PR) and bug reports via GitHub are welcomed.

0 commit comments

Comments
 (0)