Skip to content

Commit 083c8f8

Browse files
Adjusted content codeblocks options
otherwise Hugo failed to parse language {flag} Ticket: ENT-13188 Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
1 parent 96d80d5 commit 083c8f8

15 files changed

+88
-88
lines changed

cheatsheet.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,13 @@ Linux
246246
```
247247

248248
You might also specify output syntax highlighting by adding language
249-
after the starting backticks and placing `{output}` at the end of the line.
249+
after the starting backticks and placing `{output=true}` at the end of the line.
250250

251251
```command
252252
curl --user admin:admin https://test.cfengine.com/api/user
253253
```
254254

255-
```json {output}
255+
```json {output=true}
256256
{
257257
"meta": { "page": 1, "count": 1, "total": 1, "timestamp": 1350994249 },
258258
"data": [

content/examples/_index.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ from the example.
219219
3. Insert the example's bundle name in the `bundlesequence` section
220220
of the main policy file `/var/cfengine/masterfiles/promises.cf`:
221221

222-
```cf3 {skip TODO}
222+
```cf3 {skip=true TODO=true}
223223
bundlesequence => {
224224
...
225225
"hello_world",
@@ -230,7 +230,7 @@ from the example.
230230
4. Insert the policy file name in the [`inputs`][Components#inputs] section of the main policy file
231231
`/var/cfengine/masterfiles/promises.cf`:
232232

233-
```cf3 {skip TODO}
233+
```cf3 {skip=true TODO=true}
234234
inputs => {
235235
...
236236
"hello_world.cf",
@@ -241,7 +241,7 @@ from the example.
241241
5. You must also remove any inputs section from the example that
242242
includes the external library:
243243

244-
```cf3 {skip TODO}
244+
```cf3 {skip=true TODO=true}
245245
inputs => {
246246
"libraries/cfengine_stdlib.cf"
247247
};

content/examples/example-snippets/promise-patterns/example_aborting_execution.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Copy and paste `abortbundleclasses => { "invalid" };` into
4242
`/var/cfengine/masterfiles/controls/cf_agent.cf`. If you add it to
4343
the end of the file it should look something like this:
4444

45-
```cf3 {skip TODO}
45+
```cf3 {skip=true TODO=true}
4646
...
4747
# dryrun => "true";
4848

content/examples/tutorials/distribute-files-from-a-central-location.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ These variables provide path definitions for storing and deploying patches.
4646

4747
Add the following variable information to the `masterfiles/def.cf` file:
4848

49-
```cf3 {file="def.cf" skip TODO}
49+
```cf3 {file="def.cf" skip=true TODO=true}
5050
"dir_patch_store"
5151
string => "/storage/patches",
5252
comment => "Define patch files source location",

content/examples/tutorials/integrating-with-sumo-logic.markdown

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ First, we define a couple of variables.
2929

3030
The two Sumo variables are used to access the service, while the `curl_args` is the actual curl command that will upload our timestamp file to Sumo Logic.
3131

32-
```cf3 {skip TODO}
32+
```cf3 {skip=true TODO=true}
3333
vars:
3434
"policy_update_file"
3535
string => "/tmp/CFEngine_policy_updated";
@@ -47,7 +47,7 @@ We also ensures that the content of this file will be the value of the `sys.last
4747

4848
Finally, below you will see a body defining how CFEngine is going to detect changes in policy files, this time using an md5 hash and only looking for change in the content (not permissions or ownership).
4949

50-
```cf3 {skip TODO}
50+
```cf3 {skip=true TODO=true}
5151
files:
5252
"$(policy_update_file)"
5353
create => "true",
@@ -71,7 +71,7 @@ The final section in the CFEngine policy is where the command that uploads the f
7171

7272
The command will only be issued whenever a class called `new_policy_update` is set, which we above defined to be set when there is a change detection. The handle argument is a useful way to document your intentions.
7373

74-
```cf3 {skip TODO}
74+
```cf3 {skip=true TODO=true}
7575
commands:
7676
new_policy_update::
7777
"/usr/bin/curl"
@@ -105,7 +105,7 @@ Normally, to ensure your policy file is put into action, you would need to follo
105105

106106
Under the body common control, add `sumo_logic_policy_update` to your bundle sequence.
107107

108-
```cf3 {skip TODO}
108+
```cf3 {skip=true TODO=true}
109109
body common control
110110
111111
{
@@ -118,7 +118,7 @@ body common control
118118

119119
Under body common control, add /sumologic_policy_update.cf/ to your inputs section.
120120

121-
```cf3 {skip TODO}
121+
```cf3 {skip=true TODO=true}
122122
inputs => {
123123
# File definition for global variables and classes
124124
"sumologic_policy_update.cf",

content/examples/tutorials/json-yaml-support-in-cfengine.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ through them and look up values.
109109

110110
Well, you can change
111111

112-
```cf3 {skip TODO}
112+
```cf3 {skip=true TODO=true}
113113
"bykey" data => parsejson('{ "dev": ["c", "b"], "prod": ["flea"], "qa": ["a"], "private": ["linux"] }');
114114
```
115115

116116
with
117117

118-
```cf3 {skip TODO}
118+
```cf3 {skip=true TODO=true}
119119
"bykey" data => data_readstringarray(...);
120120
```
121121

@@ -131,7 +131,7 @@ private linux
131131

132132
You can also use
133133

134-
```cf3 {skip TODO}
134+
```cf3 {skip=true TODO=true}
135135
"bykey" data => readjson(...);
136136
```
137137

content/examples/tutorials/manage-ntp.markdown

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,23 @@ You can think of bundles as a collection of desired states. You can have as many
3434

3535
#### vars
3636

37-
```cf3 {skip TODO}
37+
```cf3 {skip=true TODO=true}
3838
vars:
3939
```
4040

4141
`vars` is a promise type that ensures the presence of variables that hold specific values. `vars:` starts a promise type block which ends when the next promise type block is declared.
4242

4343
##### ntp_package_name
4444

45-
```cf3 {skip TODO}
45+
```cf3 {skip=true TODO=true}
4646
"ntp_package_name" string => "ntp";
4747
```
4848

4949
A variable with the name `ntp_package_name` is declared and it is assigned a value, `ntp`. This string variable will be referenced in the other sections of the bundle.
5050

5151
#### packages
5252

53-
```cf3 {skip TODO}
53+
```cf3 {skip=true TODO=true}
5454
packages:
5555
"$(ntp_package_name)" -> { "StandardsDoc 3.2.1" }
5656
policy => "present",
@@ -62,7 +62,7 @@ packages:
6262

6363
##### $(ntp_package_name)
6464

65-
```cf3 {skip TODO}
65+
```cf3 {skip=true TODO=true}
6666
"$(ntp_package_name)" -> { "StandardsDoc 3.2.1" }
6767
```
6868

@@ -72,23 +72,23 @@ This promiser has a number of additional attributes defined:
7272

7373
###### policy
7474

75-
```cf3 {skip TODO}
75+
```cf3 {skip=true TODO=true}
7676
policy => "present",
7777
```
7878

7979
The package_policy attribute describes what you want to do the package. In this case you want to ensure that it is present on the system. Other valid values of this attribute include delete, update, patch, reinstall, addupdate, and verify. Because of the self-healing capabilities of CFEngine, the agents will continuously check to make sure the package is installed. If it is not installed, CFEngine will try to install it according to its policy.
8080

8181
###### handle
8282

83-
```cf3 {skip TODO}
83+
```cf3 {skip=true TODO=true}
8484
handle => "ntp_packages_$(ntp_package_name)",
8585
```
8686

8787
The handle uniquely identifies a promise within a policy. A recommended naming scheme for the handle is `bundle_name_promise_type_class_restriction_promiser`. It is often used for documentation and compliance purposes. As shown in this example, you can easily substitute values of variables for the handle.
8888

8989
###### classes
9090

91-
```cf3 {skip TODO}
91+
```cf3 {skip=true TODO=true}
9292
classes => results("bundle", "ntp_package_");
9393
```
9494

@@ -134,7 +134,7 @@ Validate it.
134134
python -m json.tool < def.json
135135
```
136136

137-
```json {output}
137+
```json {output=true}
138138
{
139139
"inputs": ["services/ntp.cf"],
140140
"vars": { "control_common_bundlesequence_end": ["ntp"] }
@@ -207,7 +207,7 @@ Let's dissect this policy and review the differences in the policy.
207207

208208
#### vars
209209

210-
```cf3 {skip TODO}
210+
```cf3 {skip=true TODO=true}
211211
redhat::
212212
"ntp_service_name" string => "ntpd";
213213
debian::
@@ -218,7 +218,7 @@ The first thing that you will notice is that the variable declarations section h
218218

219219
#### reports
220220

221-
```cf3 {skip TODO}
221+
```cf3 {skip=true TODO=true}
222222
reports:
223223
ntp_service_repaired.inform_mode::
224224
"NTP service repaired";
@@ -232,7 +232,7 @@ ntp_service_repaired.inform_mode::
232232

233233
This line restricts the context for the promises that follow to hosts that have `ntp_service_repaired` and `inform_mode` defined. Note: `inform_mode` is defined when information level logging is requested, e.g. the `-I`, `--inform`, or `--log-level inform` options are given to `cf-agent` defined.
234234

235-
```cf3 {skip TODO}
235+
```cf3 {skip=true TODO=true}
236236
"NTP service repaired";
237237
```
238238

@@ -354,7 +354,7 @@ Let's review the different sections of the code, starting with the variable decl
354354

355355
#### vars
356356

357-
```cf3 {skip TODO}
357+
```cf3 {skip=true TODO=true}
358358
vars:
359359
linux::
360360
"ntp_package_name" string => "ntp";
@@ -384,7 +384,7 @@ A few new variables are defined. The variables `ntp_package_name`, `config_file`
384384

385385
Now let's walk through the files promise in detail.
386386

387-
```cf3 {skip TODO}
387+
```cf3 {skip=true TODO=true}
388388
files:
389389
"$(config_file)"
390390
create => "true",
@@ -400,55 +400,55 @@ The promiser here is referenced by the `config_file` variable. In this case, it
400400

401401
##### create
402402

403-
```cf3 {skip TODO}
403+
```cf3 {skip=true TODO=true}
404404
create => "true",
405405
```
406406

407407
Valid values for this attribute are `true` or `false` to instruct the agent whether or not to create the file. In other words, the file must exist. If it does not exist, it will be created.
408408

409409
##### perms
410410

411-
```cf3 {skip TODO}
411+
```cf3 {skip=true TODO=true}
412412
perms => mog( "644", "root", "root" ),
413413
```
414414

415415
This attribute sets the permissions and ownership of the file. [`mog()`][stdlib-mog] is a `perms` body in the CFEngine standard library that sets the `mode`, `owner`, and `group` of the file. In this example, the permissions for the NTP configuration file are set to `644` with _owner_ and _group_ both assigned to `root`.
416416

417417
##### handle
418418

419-
```cf3 {skip TODO}
419+
```cf3 {skip=true TODO=true}
420420
handle => "ntp_files_conf",
421421
```
422422

423423
A handle uniquely identifies a promise within a policy set. The [policy style guide][Policy style guide#promise handles] recommends a naming scheme for the handles e.g. `bundle_name_promise_type_class_restriction_promiser`. Handles are optional, but can be very useful when reviewing logs and can also be used to influence promise ordering with `depends_on`.
424424

425425
##### classes
426426

427-
```cf3 {skip TODO}
427+
```cf3 {skip=true TODO=true}
428428
classes => results( "bundle", "ntp_config" );
429429
```
430430

431431
The classes attribute here uses the [`results()`][lib/common.cf#results] classes body from the standard library. The `results()` body defines classes for every outcome a promise has. Every time this promise is executed classes will be defined bundle scoped classes prefixed with `ntp_config`. If the promise changes the file content or permissions the class `ntp_config_repaired` will be set.
432432

433433
##### template_method
434434

435-
```cf3 {skip TODO}
435+
```cf3 {skip=true TODO=true}
436436
template_method => "inline_mustache",
437437
```
438438

439439
CFEngine supports multiple templating engines, the [template_method][files#template_method] attribute specifies how the promised file content will be resolved. The value `inline_mustache` indicates that we will use the mustache templating engine and specify the template in-line, instead of in an external file.
440440

441441
##### edit_template_string
442442

443-
```cf3 {skip TODO}
443+
```cf3 {skip=true TODO=true}
444444
edit_template_string => "$(config_template_string)",
445445
```
446446

447447
The `edit_template_string` attribute is set to `$(config_template_string)` which holds the mustache template used to render the file content.
448448

449449
##### template_data
450450

451-
```cf3 {skip TODO}
451+
```cf3 {skip=true TODO=true}
452452
template_data => mergedata( '{ "driftfile": "$(driftfile)", "servers": servers }' ),
453453
```
454454

content/examples/tutorials/reporting/command-line-reports.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ reports:
176176

177177
A bonus to this is that you can get CFEngine to report system anomalies:
178178

179-
```cf3 {skip TODO}
179+
```cf3 {skip=true TODO=true}
180180
reports:
181181
182182
rootprocs_high_dev2::

content/examples/tutorials/tags.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ way to categorize various data accessible to the agent.
114114
Dynamic bundlesequences are extremely easy. First you find all the bundles whos
115115
name matches a regular expression and N tags.
116116

117-
```cf3 {skip TODO}
117+
```cf3 {skip=true TODO=true}
118118
vars:
119119
"bundles" slist => bundlesmatching("regex", "tag1", "tag2", ...);
120120
```
121121

122122
Then every bundle matching the regular expression `regex` and **all**
123123
the tags will be found and run.
124124

125-
```cf3 {skip TODO}
125+
```cf3 {skip=true TODO=true}
126126
methods:
127127
"run $(bundles)" usebundle => $(bundles);
128128
```

content/examples/tutorials/writing-and-serving-policy/authoring-policy-tools-and-workflow.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ body contain masterfiles_contain
124124
3. Save the file.
125125
4. Add bundle and file information to `/var/cfengine/masterfiles/promises.cf`. Example (where `...` represents existing text in the file, omitted for clarity):
126126

127-
```cf3 {file="promises.cf" skip TODO}
127+
```cf3 {file="promises.cf" skip=true TODO=true}
128128
body common control
129129
130130
{

0 commit comments

Comments
 (0)