-
Notifications
You must be signed in to change notification settings - Fork 18
/
CfengineStdLibrary.html
3942 lines (2927 loc) · 133 KB
/
CfengineStdLibrary.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html lang="en">
<head>
<title>Community Open Promise Body Library</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Community Open Promise Body Library">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
@font-face {
font-family: 'CFE_FONT';
src: url('fonts/eot/opensans-regular-webfont.eot');
src: local('☺'), url('fonts/ttf/opensans-regular-webfont.ttf') format('truetype'), url('fonts/svg/opensans-regular-webfont.svg') format('svg');
font-weight: normal;
font-style: normal;
}
pre {
background-color: #EEFFDD;
border: 1px solid #CCCCCC;
font-family: courier;
margin-bottom: 10px;
margin-top: 10px;
padding: 5px;
font-size: 90%;
}
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smallexample
pre.smalllisp,
pre.smallformat,
pre.smalldisplay {
font-size: 90%;
}
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
body {
font: 90% 'CFE_FONT', arial, Helvetica,sans-serif;
color: #646464;
padding: 10px 20px;
width: 960px;
margin: 0 auto;
}
.node
{
text-align: right;
padding: 2px;
font-size: smaller;
}
.node hr {
border: 0;
width: 100%;
color: #CCC;
background-color: #CCC;
height: 5px;
}
.section {
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
}
h1 {
font-size: 26px;
font-weight: normal;
line-height: 32px;
margin: 32px 0 16px;
text-align: left;
text-transform: uppercase;
}
h2 {
color: #9E9981 !important;
font-size: 16px;
line-height: 18px;
font-weight: normal;
margin: 16px 0 26px;
text-align: left;
}
h3 {
margin-top: 3px;
margin-right: 0px;
margin-bottom: 10px;
margin-left: 0px;
line-height: 20px;
font-size: 16px;
font-weight: normal;
}
.contents
{
background-color: #CCC;
padding-top: 2px;
padding-right: 2px;
padding-bottom: 2px;
padding-left: 10px;
}
.index-cp
{
background: #fff url(index-cp.png) right repeat-y;
}
.index-vr
{
background: #fff url(index-vr.png) right repeat-y;
}
.index-mb
{
background: #eee url(index-faq.png) right repeat-y;
}
table.border
{
border-color: #666;
border-width: 0px;
}
FONT.liten {font-size: 80%; }
.tynn {
font-family: Arial, Helvetica, sans-serif;
font-size: smaller;
font-style: normal;
font-weight: lighter;
margin-bottom: 0em;
font-size: 11pt;
}
.verbatim {
color: #000;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 20px;
margin-left: 0px;
}
.example {
color: #000;
width: 100%;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 20px;
margin-left: 0px;
}
.smallexample {
color: #000;
padding-top: 10px;
padding-right: 30px;
padding-bottom: 5px;
padding-left: 30px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}
.cartouche {
padding: 5px;
font-style: italic;
font-size: 85%;
}
table.cartouche {
border: none !important;
}
.cartouche td {
background-color: #ddd;
border: 1px solid #ccc;
padding: 5px;
}
A:link { color: #2c2e70 }
A:visited { color: black }
A:active { color: #600041 }
dt em {font-weight: bold}
/* don't change this rule */
pre.sp {
background: none !important;
border:none !important
}
/* --- */
/*code hightlight*/
.red { color: #b80047; font-weight: bold; }
.blue { color: blue; /*font-weight: bold;*/ }
.green { color: darkgreen; }
.comment { font-style: italic; }
--></style>
</head>
<body>
<h1 class="settitle">Community Open Promise Body Library</h1>
<div class="node">
<a name="Top"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>,
Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
</div>
<h2 class="unnumbered">Cfengine-Open-Promise-Body-Library</h2>
<p><a href="#Contents">COMPLETE TABLE OF CONTENTS</a>
<h2>Summary of contents</h2>
<ul class="menu">
<li><a accesskey="1" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</ul>
<div class="node">
<a name="The-Purpose-Of-This-Handbook"></a>
<p><hr>
Previous: <a rel="previous" accesskey="p" href="#Top">Top</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
</div>
<h2 class="chapter">1 The Purpose Of This Handbook</h2>
<pre class="sp">
</pre>
Cfengine is built on promises. Promises were chosen as the model for Cfengine's
configuration language, because they represent an expression of intention.
<p>If you are using custom scripts to manage your systems, you are using
<i>recipes</i>. Take a look at any cookbook and you will see that all
recipes look the same: take flour, eggs, butter, sugar ... and you
know nothing because you can make a hundred things from these steps.
If you don't make clear your intention, it is very hard to know what
the recipe is supposed to be: is it a cake, a waffle, a pastry?
<p>The same is true in system administration. Recipes are not merely
scripts, they encapsulate knowledge and experience. Their value is
in communicating <i>desired outcomes</i> or states.
<p>This library of standard components is like a cookbook that tells you
only how to make basics well. It gives these basic skills names and
therefore gives you a common vocabulary – you will put together these
basics in creative ways to build your systems.
<pre class="sp">
</pre>
<p><table class="cartouche" summary="cartouche" border="1"><tr><td>
<p>Please contribute to this guide by helping to develop a repertoire of
basic skills and names. This collection should be comprehensive but
parsimonious. Basics are only basics if they are few and carefully
thought out. This is a work in progress and your experience is welcome.
<p>This library will be moderated by Cfengine, and contributions and discussions
ca n be made to the [email protected] mailing list.
</td></tr></table>
<ul class="menu">
<li><a accesskey="1" href="#body-acl-access_005fgeneric">body acl access_generic</a>
<li><a accesskey="2" href="#body-acl-ntfs">body acl ntfs</a>
<li><a accesskey="3" href="#body-acl-strict">body acl strict</a>
<li><a accesskey="4" href="#body-action-bg">body action bg</a>
<li><a accesskey="5" href="#body-action-if_005felapsed">body action if_elapsed</a>
<li><a accesskey="6" href="#body-action-ifwin_005fbg">body action ifwin_bg</a>
<li><a accesskey="7" href="#body-action-immediate">body action immediate</a>
<li><a accesskey="8" href="#body-action-log_005frepaired">body action log_repaired</a>
<li><a accesskey="9" href="#body-action-log_005fverbose">body action log_verbose</a>
<li><a href="#body-action-measure_005fperformance">body action measure_performance</a>
<li><a href="#body-action-policy">body action policy</a>
<li><a href="#body-action-sample_005frate">body action sample_rate</a>
<li><a href="#body-action-warn_005fonly">body action warn_only</a>
<li><a href="#body-changes-detect_005fall_005fchange">body changes detect_all_change</a>
<li><a href="#body-changes-detect_005fcontent">body changes detect_content</a>
<li><a href="#body-changes-diff">body changes diff</a>
<li><a href="#body-changes-diff_005fnoupdate">body changes diff_noupdate</a>
<li><a href="#body-changes-noupdate">body changes noupdate</a>
<li><a href="#body-classes-always">body classes always</a>
<li><a href="#body-classes-cf2_005fif_005felse">body classes cf2_if_else</a>
<li><a href="#body-classes-cmd_005frepair">body classes cmd_repair</a>
<li><a href="#body-classes-enumerate">body classes enumerate</a>
<li><a href="#body-classes-if_005felse">body classes if_else</a>
<li><a href="#body-classes-if_005fnotkept">body classes if_notkept</a>
<li><a href="#body-classes-if_005fok">body classes if_ok</a>
<li><a href="#body-classes-if_005frepaired">body classes if_repaired</a>
<li><a href="#body-classes-state_005frepaired">body classes state_repaired</a>
<li><a href="#body-contain-in_005fdir">body contain in_dir</a>
<li><a href="#body-contain-in_005fdir_005fshell">body contain in_dir_shell</a>
<li><a href="#body-contain-in_005fshell">body contain in_shell</a>
<li><a href="#body-contain-in_005fshell_005fand_005fsilent">body contain in_shell_and_silent</a>
<li><a href="#body-contain-in_005fshell_005fbg">body contain in_shell_bg</a>
<li><a href="#body-contain-jail">body contain jail</a>
<li><a href="#body-contain-setuid">body contain setuid</a>
<li><a href="#body-contain-setuid_005fsh">body contain setuid_sh</a>
<li><a href="#body-contain-setuidgid_005fsh">body contain setuidgid_sh</a>
<li><a href="#body-contain-silent">body contain silent</a>
<li><a href="#body-contain-silent_005fin_005fdir">body contain silent_in_dir</a>
<li><a href="#body-copy_005ffrom-backup_005flocal_005fcp">body copy_from backup_local_cp</a>
<li><a href="#body-copy_005ffrom-local_005fcp">body copy_from local_cp</a>
<li><a href="#body-copy_005ffrom-local_005fdcp">body copy_from local_dcp</a>
<li><a href="#body-copy_005ffrom-no_005fbackup_005fcp">body copy_from no_backup_cp</a>
<li><a href="#body-copy_005ffrom-no_005fbackup_005fdcp">body copy_from no_backup_dcp</a>
<li><a href="#body-copy_005ffrom-no_005fbackup_005frcp">body copy_from no_backup_rcp</a>
<li><a href="#body-copy_005ffrom-perms_005fcp">body copy_from perms_cp</a>
<li><a href="#body-copy_005ffrom-remote_005fcp">body copy_from remote_cp</a>
<li><a href="#body-copy_005ffrom-remote_005fdcp">body copy_from remote_dcp</a>
<li><a href="#body-copy_005ffrom-secure_005fcp">body copy_from secure_cp</a>
<li><a href="#body-copy_005ffrom-seed_005fcp">body copy_from seed_cp</a>
<li><a href="#body-copy_005ffrom-sync_005fcp">body copy_from sync_cp</a>
<li><a href="#body-delete-tidy">body delete tidy</a>
<li><a href="#body-depth_005fsearch-include_005fbase">body depth_search include_base</a>
<li><a href="#body-depth_005fsearch-recurse">body depth_search recurse</a>
<li><a href="#body-depth_005fsearch-recurse_005fignore">body depth_search recurse_ignore</a>
<li><a href="#body-edit_005fdefaults-empty">body edit_defaults empty</a>
<li><a href="#body-edit_005fdefaults-no_005fbackup">body edit_defaults no_backup</a>
<li><a href="#body-edit_005fdefaults-std_005fdefs">body edit_defaults std_defs</a>
<li><a href="#body-edit_005ffield-col">body edit_field col</a>
<li><a href="#body-edit_005ffield-line">body edit_field line</a>
<li><a href="#body-edit_005ffield-quoted_005fvar">body edit_field quoted_var</a>
<li><a href="#body-file_005fselect-by_005fname">body file_select by_name</a>
<li><a href="#body-file_005fselect-days_005fold">body file_select days_old</a>
<li><a href="#body-file_005fselect-dirs">body file_select dirs</a>
<li><a href="#body-file_005fselect-ex_005flist">body file_select ex_list</a>
<li><a href="#body-file_005fselect-exclude">body file_select exclude</a>
<li><a href="#body-file_005fselect-name_005fage">body file_select name_age</a>
<li><a href="#body-file_005fselect-plain">body file_select plain</a>
<li><a href="#body-file_005fselect-size_005frange">body file_select size_range</a>
<li><a href="#body-link_005ffrom-linkchildren">body link_from linkchildren</a>
<li><a href="#body-link_005ffrom-ln_005fs">body link_from ln_s</a>
<li><a href="#body-location-after">body location after</a>
<li><a href="#body-location-start">body location start</a>
<li><a href="#body-match_005fvalue-scan_005fchanging_005ffile">body match_value scan_changing_file</a>
<li><a href="#body-match_005fvalue-scan_005flog">body match_value scan_log</a>
<li><a href="#body-mount-nfs">body mount nfs</a>
<li><a href="#body-mount-nfs_005fp">body mount nfs_p</a>
<li><a href="#body-mount-unmount">body mount unmount</a>
<li><a href="#body-package_005fmethod-apt">body package_method apt</a>
<li><a href="#body-package_005fmethod-dpkg_005fversion">body package_method dpkg_version</a>
<li><a href="#body-package_005fmethod-freebsd">body package_method freebsd</a>
<li><a href="#body-package_005fmethod-generic">body package_method generic</a>
<li><a href="#body-package_005fmethod-msi_005fexplicit">body package_method msi_explicit</a>
<li><a href="#body-package_005fmethod-msi_005fimplicit">body package_method msi_implicit</a>
<li><a href="#body-package_005fmethod-rpm_005fversion">body package_method rpm_version</a>
<li><a href="#body-package_005fmethod-solaris">body package_method solaris </a>
<li><a href="#body-package_005fmethod-yum">body package_method yum</a>
<li><a href="#body-package_005fmethod-yum_005frpm">body package_method yum_rpm</a>
<li><a href="#body-package_005fmethod-zypper">body package_method zypper</a>
<li><a href="#body-perms-m">body perms m</a>
<li><a href="#body-perms-mo">body perms mo</a>
<li><a href="#body-perms-mog">body perms mog</a>
<li><a href="#body-perms-og">body perms og</a>
<li><a href="#body-perms-owner">body perms owner</a>
<li><a href="#body-process_005fcount-any_005fcount">body process_count any_count</a>
<li><a href="#body-process_005fcount-check_005frange">body process_count check_range</a>
<li><a href="#body-process_005fselect-days_005folder_005fthan">body process_select days_older_than</a>
<li><a href="#body-process_005fselect-exclude_005fprocs">body process_select exclude_procs</a>
<li><a href="#body-rename-disable">body rename disable</a>
<li><a href="#body-rename-rotate">body rename rotate</a>
<li><a href="#body-rename-to">body rename to</a>
<li><a href="#body-replace_005fwith-comment">body replace_with comment</a>
<li><a href="#body-replace_005fwith-uncomment">body replace_with uncomment</a>
<li><a href="#body-replace_005fwith-value">body replace_with value</a>
<li><a href="#body-select_005fregion-INI_005fsection">body select_region INI_section</a>
<li><a href="#body-service_005fmethod-bootstart">body service_method bootstart</a>
<li><a href="#body-service_005fmethod-force_005fdeps">body service_method force_deps</a>
<li><a href="#body-volume-min_005ffree_005fspace">body volume min_free_space</a>
<li><a href="#bundle-agent-cronjob">bundle agent cronjob</a>
<li><a href="#bundle-edit_005fline-append_005fgroups_005fstarting">bundle edit_line append_groups_starting</a>
<li><a href="#bundle-edit_005fline-append_005fif_005fno_005fline">bundle edit_line append_if_no_line</a>
<li><a href="#bundle-edit_005fline-append_005fif_005fno_005flines">bundle edit_line append_if_no_lines</a>
<li><a href="#bundle-edit_005fline-append_005fto_005fline_005fend">bundle edit_line append_to_line_end</a>
<li><a href="#bundle-edit_005fline-append_005fuser_005ffield">bundle edit_line append_user_field</a>
<li><a href="#bundle-edit_005fline-append_005fusers_005fstarting">bundle edit_line append_users_starting</a>
<li><a href="#bundle-edit_005fline-comment_005flines_005fcontaining">bundle edit_line comment_lines_containing</a>
<li><a href="#bundle-edit_005fline-comment_005flines_005fmatching">bundle edit_line comment_lines_matching</a>
<li><a href="#bundle-edit_005fline-create_005fsolaris_005fadmin_005ffile">bundle edit_line create_solaris_admin_file</a>
<li><a href="#bundle-edit_005fline-delete_005flines_005fmatching">bundle edit_line delete_lines_matching</a>
<li><a href="#bundle-edit_005fline-expand_005ftemplate">bundle edit_line expand_template</a>
<li><a href="#bundle-edit_005fline-insert_005ffile">bundle edit_line insert_file</a>
<li><a href="#bundle-edit_005fline-insert_005flines">bundle edit_line insert_lines</a>
<li><a href="#bundle-edit_005fline-replace_005fline_005fend">bundle edit_line replace_line_end</a>
<li><a href="#bundle-edit_005fline-replace_005for_005fadd">bundle edit_line replace_or_add</a>
<li><a href="#bundle-edit_005fline-resolvconf">bundle edit_line resolvconf</a>
<li><a href="#bundle-edit_005fline-set_005fconfig_005fvalues">bundle edit_line set_config_values</a>
<li><a href="#bundle-edit_005fline-set_005fuser_005ffield">bundle edit_line set_user_field</a>
<li><a href="#bundle-edit_005fline-set_005fvariable_005fvalues">bundle edit_line set_variable_values</a>
<li><a href="#bundle-edit_005fline-set_005fvariable_005fvalues2">bundle edit_line set_variable_values2</a>
<li><a href="#bundle-edit_005fline-uncomment_005flines_005fcontaining">bundle edit_line uncomment_lines_containing</a>
<li><a href="#bundle-edit_005fline-uncomment_005flines_005fmatching">bundle edit_line uncomment_lines_matching</a>
<li><a href="#bundle-edit_005fline-warn_005flines_005fmatching">bundle edit_line warn_lines_matching</a>
</ul>
<div class="node">
<a name="body-acl-access_generic"></a>
<a name="body-acl-access_005fgeneric"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-acl-ntfs">body acl ntfs</a>,
Previous: <a rel="previous" accesskey="p" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.1 body acl access_generic(acl)</h3>
<pre class="verbatim">body acl access_generic(acl)
# default/inherited ACLs are left unchanged,
# applicable for both files and directories on all platforms
{
acl_method => "overwrite";
aces => { "@(acl)" };
windows::
acl_type => "ntfs";
!windows::
acl_type => "posix";
}
</pre>
<div class="node">
<a name="body-acl-ntfs"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-acl-strict">body acl strict</a>,
Previous: <a rel="previous" accesskey="p" href="#body-acl-access_005fgeneric">body acl access_generic</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.2 body acl ntfs(acl)</h3>
<pre class="verbatim">body acl ntfs(acl)
{
acl_type => "ntfs";
acl_method => "overwrite";
aces => { "@(acl)" };
}
</pre>
<div class="node">
<a name="body-acl-strict"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-action-bg">body action bg</a>,
Previous: <a rel="previous" accesskey="p" href="#body-acl-ntfs">body acl ntfs</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.3 body acl strict</h3>
<pre class="verbatim">body acl strict
# NOTE: May need to take ownership of file/dir
# to be sure no-one else is allowed access
{
acl_method => "overwrite";
windows::
aces => { "user:Administrator:rwx" };
!windows::
aces => { "user:root:rwx" };
}
</pre>
<div class="node">
<a name="body-action-bg"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-action-if_005felapsed">body action if_elapsed</a>,
Previous: <a rel="previous" accesskey="p" href="#body-acl-strict">body acl strict</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.4 body action bg(elapsed,expire)</h3>
<pre class="verbatim">body action bg(elapsed,expire)
{
ifelapsed => "$(elapsed)";
expireafter => "$(expire)";
background => "true";
}
</pre>
<div class="node">
<a name="body-action-if_elapsed"></a>
<a name="body-action-if_005felapsed"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-action-ifwin_005fbg">body action ifwin_bg</a>,
Previous: <a rel="previous" accesskey="p" href="#body-action-bg">body action bg</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.5 body action if_elapsed(x)</h3>
<pre class="verbatim">body action if_elapsed(x)
{
ifelapsed => "$(x)";
expireafter => "$(x)";
}
</pre>
<div class="node">
<a name="body-action-ifwin_bg"></a>
<a name="body-action-ifwin_005fbg"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-action-immediate">body action immediate</a>,
Previous: <a rel="previous" accesskey="p" href="#body-action-if_005felapsed">body action if_elapsed</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.6 body action ifwin_bg</h3>
<pre class="verbatim">body action ifwin_bg
{
windows::
background => "true";
}
</pre>
<div class="node">
<a name="body-action-immediate"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-action-log_005frepaired">body action log_repaired</a>,
Previous: <a rel="previous" accesskey="p" href="#body-action-ifwin_005fbg">body action ifwin_bg</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.7 body action immediate</h3>
<pre class="verbatim">body action immediate
{
ifelapsed => "0";
}
</pre>
<div class="node">
<a name="body-action-log_repaired"></a>
<a name="body-action-log_005frepaired"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-action-log_005fverbose">body action log_verbose</a>,
Previous: <a rel="previous" accesskey="p" href="#body-action-immediate">body action immediate</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.8 body action log_repaired(log,message)</h3>
<pre class="verbatim">body action log_repaired(log,message)
{
log_string => "$(sys.date), $(message)";
log_repaired => "$(log)";
}
</pre>
<div class="node">
<a name="body-action-log_verbose"></a>
<a name="body-action-log_005fverbose"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-action-measure_005fperformance">body action measure_performance</a>,
Previous: <a rel="previous" accesskey="p" href="#body-action-log_005frepaired">body action log_repaired</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.9 body action log_verbose</h3>
<pre class="verbatim">body action log_verbose
{
log_level => "verbose";
}
</pre>
<div class="node">
<a name="body-action-measure_performance"></a>
<a name="body-action-measure_005fperformance"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-action-policy">body action policy</a>,
Previous: <a rel="previous" accesskey="p" href="#body-action-log_005fverbose">body action log_verbose</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.10 body action measure_performance(x)</h3>
<pre class="verbatim">body action measure_performance(x)
{
measurement_class => "Detect changes in $(this.promiser)";
ifelapsed => "$(x)";
expireafter => "$(x)";
}
</pre>
<div class="node">
<a name="body-action-policy"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-action-sample_005frate">body action sample_rate</a>,
Previous: <a rel="previous" accesskey="p" href="#body-action-measure_005fperformance">body action measure_performance</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.11 body action policy(p)</h3>
<pre class="verbatim">body action policy(p)
{
action_policy => "$(p)";
}
# Log a message to log=[/file|stdout]
</pre>
<div class="node">
<a name="body-action-sample_rate"></a>
<a name="body-action-sample_005frate"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-action-warn_005fonly">body action warn_only</a>,
Previous: <a rel="previous" accesskey="p" href="#body-action-policy">body action policy</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.12 body action sample_rate(x)</h3>
<pre class="verbatim">body action sample_rate(x)
{
ifelapsed => "$(x)";
expireafter => "10";
}
</pre>
<div class="node">
<a name="body-action-warn_only"></a>
<a name="body-action-warn_005fonly"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-changes-detect_005fall_005fchange">body changes detect_all_change</a>,
Previous: <a rel="previous" accesskey="p" href="#body-action-sample_005frate">body action sample_rate</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.13 body action warn_only</h3>
<pre class="verbatim">body action warn_only
{
action_policy => "warn";
ifelapsed => "60";
}
</pre>
<div class="node">
<a name="body-changes-detect_all_change"></a>
<a name="body-changes-detect_005fall_005fchange"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-changes-detect_005fcontent">body changes detect_content</a>,
Previous: <a rel="previous" accesskey="p" href="#body-action-warn_005fonly">body action warn_only</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.14 body changes detect_all_change</h3>
<pre class="verbatim">body changes detect_all_change
# This is fierce, and will cost disk cycles
{
hash => "best";
report_changes => "all";
update_hashes => "yes";
}
</pre>
<div class="node">
<a name="body-changes-detect_content"></a>
<a name="body-changes-detect_005fcontent"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-changes-diff">body changes diff</a>,
Previous: <a rel="previous" accesskey="p" href="#body-changes-detect_005fall_005fchange">body changes detect_all_change</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.15 body changes detect_content</h3>
<pre class="verbatim">body changes detect_content
# This is a cheaper alternative
{
hash => "md5";
report_changes => "content";
update_hashes => "yes";
}
</pre>
<div class="node">
<a name="body-changes-diff"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-changes-diff_005fnoupdate">body changes diff_noupdate</a>,
Previous: <a rel="previous" accesskey="p" href="#body-changes-detect_005fcontent">body changes detect_content</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.16 body changes diff</h3>
<pre class="verbatim">body changes diff
# Generates diff report (Nova and above)
{
hash => "sha256";
report_changes => "content";
report_diffs => "true";
update_hashes => "yes";
}
</pre>
<div class="node">
<a name="body-changes-diff_noupdate"></a>
<a name="body-changes-diff_005fnoupdate"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-changes-noupdate">body changes noupdate</a>,
Previous: <a rel="previous" accesskey="p" href="#body-changes-diff">body changes diff</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.17 body changes diff_noupdate</h3>
<pre class="verbatim">body changes diff_noupdate
{
hash => "sha256";
report_changes => "content";
report_diffs => "true";
update_hashes => "no";
}
</pre>
<div class="node">
<a name="body-changes-noupdate"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-classes-always">body classes always</a>,
Previous: <a rel="previous" accesskey="p" href="#body-changes-diff_005fnoupdate">body changes diff_noupdate</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.18 body changes noupdate</h3>
<pre class="verbatim">body changes noupdate
# Use on (small) files that should never change
{
hash => "sha256";
report_changes => "content";
update_hashes => "no";
}
</pre>
<div class="node">
<a name="body-classes-always"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-classes-cf2_005fif_005felse">body classes cf2_if_else</a>,
Previous: <a rel="previous" accesskey="p" href="#body-changes-noupdate">body changes noupdate</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.19 body classes always(x)</h3>
<pre class="verbatim">body classes always(x)
# Define a class no matter what the outcome of the promise is
{
promise_repaired => { "$(x)" };
promise_kept => { "$(x)" };
repair_failed => { "$(x)" };
repair_denied => { "$(x)" };
repair_timeout => { "$(x)" };
}
# agent bundles
</pre>
<div class="node">
<a name="body-classes-cf2_if_else"></a>
<a name="body-classes-cf2_005fif_005felse"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-classes-cmd_005frepair">body classes cmd_repair</a>,
Previous: <a rel="previous" accesskey="p" href="#body-classes-always">body classes always</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.20 body classes cf2_if_else(yes,no)</h3>
<pre class="verbatim">body classes cf2_if_else(yes,no)
# meant to match cf2 semantics
{
promise_repaired => { "$(yes)" };
repair_failed => { "$(no)" };
repair_denied => { "$(no)" };
repair_timeout => { "$(no)" };
}
</pre>
<div class="node">
<a name="body-classes-cmd_repair"></a>
<a name="body-classes-cmd_005frepair"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-classes-enumerate">body classes enumerate</a>,
Previous: <a rel="previous" accesskey="p" href="#body-classes-cf2_005fif_005felse">body classes cf2_if_else</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.21 body classes cmd_repair(code,cl)</h3>
<pre class="verbatim">body classes cmd_repair(code,cl)
{
repaired_returncodes => { "$(code)" };
promise_repaired => { "$(cl)" };
}
</pre>
<div class="node">
<a name="body-classes-enumerate"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-classes-if_005felse">body classes if_else</a>,
Previous: <a rel="previous" accesskey="p" href="#body-classes-cmd_005frepair">body classes cmd_repair</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.22 body classes enumerate(x)</h3>
<pre class="verbatim">body classes enumerate(x)
#
# This is used by commercial editions to count
# instances of jobs in a cluster
#
{
promise_repaired => { "mXC_$(x)" };
promise_kept => { "mXC_$(x)" };
persist_time => "15";
}
</pre>
<div class="node">
<a name="body-classes-if_else"></a>
<a name="body-classes-if_005felse"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-classes-if_005fnotkept">body classes if_notkept</a>,
Previous: <a rel="previous" accesskey="p" href="#body-classes-enumerate">body classes enumerate</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.23 body classes if_else(yes,no)</h3>
<pre class="verbatim">body classes if_else(yes,no)
{
promise_kept => { "$(yes)" };
promise_repaired => { "$(yes)" };
repair_failed => { "$(no)" };
repair_denied => { "$(no)" };
repair_timeout => { "$(no)" };
}
</pre>
<div class="node">
<a name="body-classes-if_notkept"></a>
<a name="body-classes-if_005fnotkept"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-classes-if_005fok">body classes if_ok</a>,
Previous: <a rel="previous" accesskey="p" href="#body-classes-if_005felse">body classes if_else</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.24 body classes if_notkept(x)</h3>
<pre class="verbatim">body classes if_notkept(x)
{
repair_failed => { "$(x)" };
repair_denied => { "$(x)" };
repair_timeout => { "$(x)" };
}
</pre>
<div class="node">
<a name="body-classes-if_ok"></a>
<a name="body-classes-if_005fok"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-classes-if_005frepaired">body classes if_repaired</a>,
Previous: <a rel="previous" accesskey="p" href="#body-classes-if_005fnotkept">body classes if_notkept</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.25 body classes if_ok(x)</h3>
<pre class="verbatim">body classes if_ok(x)
{
promise_repaired => { "$(x)" };
promise_kept => { "$(x)" };
}
</pre>
<div class="node">
<a name="body-classes-if_repaired"></a>
<a name="body-classes-if_005frepaired"></a>
<p><hr>
Next: <a rel="next" accesskey="n" href="#body-classes-state_005frepaired">body classes state_repaired</a>,
Previous: <a rel="previous" accesskey="p" href="#body-classes-if_005fok">body classes if_ok</a>,
Up: <a rel="up" accesskey="u" href="#The-Purpose-Of-This-Handbook">The Purpose Of This Handbook</a>
</div>
<h3 class="section">1.26 body classes if_repaired(x)</h3>
<pre class="verbatim">body classes if_repaired(x)
{
promise_repaired => { "$(x)" };
}
</pre>
<div class="node">