You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a bunch of examples that do not respect what the style guide
recommends. Adjust them so that code snippets follow recommended style
for consistency.
Signed-off-by: Romain Tartière <romain@blogreen.org>
Copy file name to clipboardExpand all lines: docs/_openvox_8x/cheatsheet_core_types.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,7 @@ If a service has a bad init script, you can work around it and manage almost any
151
151
Logs an arbitrary message, at the `notice` log level. This appears in the POSIX syslog or Windows Event Log on the Puppet agent node and is also logged in reports.
152
152
153
153
```puppet
154
-
notify { "This message is getting logged on the agent node.": }
154
+
notify { 'This message is getting logged on the agent node.': }
155
155
```
156
156
157
157
{:.section}
@@ -194,8 +194,8 @@ Executes an arbitrary command on the agent node. When using execs, you must eith
194
194
Manages cron jobs. Largely self-explanatory. On Windows, you should use [`scheduled_task`](./type.html#scheduledtask) instead.
195
195
196
196
cron { 'logrotate':
197
-
command => "/usr/sbin/logrotate",
198
-
user => "root",
197
+
command => '/usr/sbin/logrotate',
198
+
user => 'root',
199
199
hour => 2,
200
200
minute => 0,
201
201
}
@@ -219,7 +219,7 @@ Manages cron jobs. Largely self-explanatory. On Windows, you should use [`schedu
219
219
220
220
Manages user accounts; mostly used for system users.
Copy file name to clipboardExpand all lines: docs/_openvox_8x/custom_types.markdown
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,19 +90,19 @@ You can and should write a string describing the resource type and assign it to
90
90
The string should be in [Markdown][] format (avoiding dialect-specific features that aren't universally supported). When the Puppet tools extract the string, they will strip the greatest common amount of leading whitespace from the front of each line, excluding the first line. For example:
91
91
92
92
```ruby
93
-
Puppet::Type.newtype(:database) do
94
-
@doc=%q{Creates a new database. Depending
95
-
on the provider, this might create relational
96
-
databases or NoSQL document stores.
97
-
98
-
Example:
99
-
100
-
database {'mydatabase':
101
-
ensure => present,
102
-
owner => root,
103
-
}
104
-
}
105
-
end
93
+
Puppet::Type.newtype(:database) do
94
+
@doc=%q{Creates a new database. Depending
95
+
on the provider, this might create relational
96
+
databases or NoSQL document stores.
97
+
98
+
Example:
99
+
100
+
database {'mydatabase':
101
+
ensure => present,
102
+
owner => root,
103
+
}
104
+
}
105
+
end
106
106
```
107
107
108
108
In this example, any whitespace would be trimmed from the first line (in this case, it's zero spaces), then the greatest common amount would be trimmed from remaining lines. Three lines have four leading spaces, two lines have six, and two lines have eight, so four leading spaces would be trimmed from each line. This leaves the example code block indented by four spaces, and thus doesn't break the Markdown formatting.
Resource-like declarations use [resource-like behavior][resource-like]. (Multiple declarations prohibited; parameters can be overridden at compile-time.) You can provide a value for any class parameter by specifying it as resource attribute; any parameters not specified will follow the normal external/default/fail lookup path.
@@ -384,7 +384,7 @@ In addition to class-specific parameters, you can also specify a value for any [
Copy file name to clipboardExpand all lines: docs/_openvox_8x/lang_data_resource_reference.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,16 +64,16 @@ They can be used wherever an array of references might be used. They can also go
64
64
You can use a resource reference to access the values of a [resource][]'s attributes. To access a value, use square brackets and the name of an attribute (as a [string][]). This works much like [accessing hash values.][hash access]
65
65
66
66
```puppet
67
-
file { "/etc/first.conf":
67
+
file { '/etc/first.conf':
68
68
ensure => file,
69
-
mode => "0644",
70
-
owner => "root",
69
+
mode => '0644',
70
+
owner => 'root',
71
71
}
72
72
73
-
file { "/etc/second.conf":
73
+
file { '/etc/second.conf':
74
74
ensure => file,
75
-
mode => File["/etc/first.conf"]["mode"],
76
-
owner => File["/etc/first.conf"]["owner"],
75
+
mode => File['/etc/first.conf']['mode'],
76
+
owner => File['/etc/first.conf']['owner'],
77
77
}
78
78
```
79
79
@@ -115,7 +115,7 @@ To allow a resource reference of a _specific_ resource type --- in this example,
115
115
116
116
```puppet
117
117
Type[File] # Capitalized resource type name
118
-
Type[Resource["file"]] # `Resource` data type, with type name in parameter as a string
118
+
Type[Resource['file']] # `Resource` data type, with type name in parameter as a string
119
119
Type[Resource[File]] # `Resource` data type, with capitalized resource type name
1 | Resource type | `String` or `Resource` | nothing | A resource type, either as a string or a `Resource` data type value. If provided, this will turn this data type into a resource-specific data type. `Resource[Mytype]` and `Resource["mytype"]` are both 100% identical to the data type `Mytype`.
123
-
2–∞ | Resource title | `String` | nothing | The title of some specific resource of this type. If provided, this will turn this data type into a usable [resource reference][] or array of resource references. `Resource[Mytype, "mytitle"]` and `Resource["mytype", "mytitle"]` are both 100% identical to the data type `Mytype["mytitle"]`.
122
+
1 | Resource type | `String` or `Resource` | nothing | A resource type, either as a string or a `Resource` data type value. If provided, this will turn this data type into a resource-specific data type. `Resource[Mytype]` and `Resource['mytype']` are both 100% identical to the data type `Mytype`.
123
+
2–∞ | Resource title | `String` | nothing | The title of some specific resource of this type. If provided, this will turn this data type into a usable [resource reference][] or array of resource references. `Resource[Mytype, 'mytitle']` and `Resource['mytype', 'mytitle']` are both 100% identical to the data type `Mytype['mytitle']`.
124
124
125
125
126
126
### Examples
127
127
128
128
*`Resource[File]` --- the data type corresponding to the `file` resource type.
129
129
*`Resource[File, '/tmp/foo']` --- a resource reference to the `file` resource whose title is `/tmp/foo`.
130
-
*`Resource["file", '/tmp/foo']` --- a resource reference to the `file` resource whose title is `/tmp/foo`.
130
+
*`Resource['file', '/tmp/foo']` --- a resource reference to the `file` resource whose title is `/tmp/foo`.
131
131
*`Resource[File, '/tmp/foo', '/tmp/bar']` --- equivalent to `[ File['/tmp/foo'], File['/tmp/bar'] ]`.
132
132
133
133
Also:
134
134
135
135
*`Type[Resource[File]]` --- a synonym for the data type that _matches_ any [resource references][resource reference] to `file` resources. This is useful for, e.g., restricting the values of class or defined type parameters.
136
-
*`Type[Resource["file"]]` --- another synonym for the data type that _matches_ any [resource references][resource reference] to `file` resources. This is useful for, e.g., restricting the values of class or defined type parameters.
136
+
*`Type[Resource['file']]` --- another synonym for the data type that _matches_ any [resource references][resource reference] to `file` resources. This is useful for, e.g., restricting the values of class or defined type parameters.
137
137
138
138
139
139
## The `Class` data type
@@ -159,7 +159,7 @@ Position | Parameter | Data Type | Default Value | Description
159
159
160
160
### Examples
161
161
162
-
*`Class["apache"]` --- a [class reference][] to class `apache`.
162
+
*`Class['apache']` --- a [class reference][] to class `apache`.
0 commit comments