-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathch03-Puppet_Language_and_Style.txt
53 lines (34 loc) · 1.61 KB
/
ch03-Puppet_Language_and_Style.txt
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
[[chapter03]]
== Puppet 语言及其写作风格
[quote, Larry Wall,]
Computer language design is just like a stroll in the park. Jurassic Park, that is.
在本章中,我们将学习如下内容:
- {Recipe301}
- {Recipe302}
- {Recipe303}
- {Recipe304}
- {Recipe305}
- {Recipe306}
- {Recipe307}
- {Recipe308}
- {Recipe309}
- {Recipe310}
- {Recipe311}
[quote, Edsger W. Dijkstra,]
Elegance is not a dispensable luxury, but a factor that decides between success
and failure.
在本章,你将学习如何书写优雅的 Puppet 配置清单。“优雅”的含义体现在几个方面:
可读性、高效性、书写符合社区规范的代码。
我们将会看到,如何遵循社区规范将你的代码组织并构造成模块,以便他人能很容易地阅读和维护你的代码。
我还会向你展示一些 Puppet 语言的强大功能,使你写出更简洁而传神的配置清单。
include::recipes/ch03sec01-using_community_puppet_style.txt[]
include::recipes/ch03sec02-using_modules.txt[]
include::recipes/ch03sec03-using_standard_naming_conventions.txt[]
include::recipes/ch03sec04-using_embedded_ruby.txt[]
include::recipes/ch03sec05-writing_manifests_in_pure_ruby.txt[]
include::recipes/ch03sec06-iterating_over_multiple_items.txt[]
include::recipes/ch03sec07-writing_powerful_conditional_statements.txt[]
include::recipes/ch03sec08-using_regular_expressions_in_if_statements.txt[]
include::recipes/ch03sec09-using_selectors_and_case_statements.txt[]
include::recipes/ch03sec10-testing_if_values_are_contained_in_strings.txt[]
include::recipes/ch03sec11-using_regular_expression_substitutions.txt[]