File tree Expand file tree Collapse file tree 6 files changed +433
-17
lines changed Expand file tree Collapse file tree 6 files changed +433
-17
lines changed Original file line number Diff line number Diff line change 1
1
# 前言
2
2
3
- Ansible 大约每年发布两次新的重要版本。核心应用程序的发展略显保守,以重视语言设计及设置的简洁性。贡献者可以更快地开发和更改模块和插件 ,并将其托管在专辑中。
3
+ Ansible 大约每年发布两次新的重要版本。核心应用程序的发展略显保守,以重视语言设计及设置的简洁性。贡献者可以更快地开发和修改模组和插件 ,并将其托管在专辑中。
4
4
5
5
## Ansible 入门
6
6
@@ -49,7 +49,7 @@ Ansible 使用简单、人类可读的脚本(称为 playbook),来自动执
49
49
50
50
- ** 可扩展及灵活性,scalability and flexibility**
51
51
52
- 经由支持多种操作系统、云平台和网络设备的模块化设计 ,可轻松快速地扩展自动化系统。
52
+ 经由支持多种操作系统、云平台和网络设备的模组化设计 ,可轻松快速地扩展自动化系统。
53
53
54
54
- ** 幂等性和可预测性,idempotence and predictability**
55
55
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ data :
3
+ greeter.prefix : Hello
4
+ kind : ConfigMap
5
+ metadata :
6
+ creationTimestamp : 2017-09-19T04:03:37Z
7
+ name : spring-boot-configmaps-demo
8
+ namespace : default
9
+ resourceVersion : " 50671"
10
+ selfLink : /api/v1/namespaces/default/configmaps/spring-boot-configmaps-demo
11
+ uid : 8397deb7-9cef-11e7-9b8d-080027da6995
Original file line number Diff line number Diff line change 2
2
- name : Test filters
3
3
hosts : nginx
4
4
gather_facts : False
5
- vars :
6
- b64hector : " {{ '彭海林' | string | b64encode }}"
7
- string : " unisko@gmail.com"
8
5
9
6
tasks :
10
- - name : Gathering mounts
11
- setup :
12
- gather_subset :
13
- - distribution
14
- - mounts
15
-
16
- - name : Get a comma-separated list of the mount points
17
- debug :
18
- # msg: "{{ '%Y-%m-%d %H:%M:%S' | strftime(ansible_date_time.epoch) }}"
19
- msg : " {{ '%H:%M:%S' | strftime(utc=True) }}"
7
+ - name : " Human Readable"
8
+ assert :
9
+ that :
10
+ - ' "1.00 Bytes" == 1|human_readable'
11
+ - ' "1.00 bits" == 1|human_readable(isbits=True)'
12
+ - ' "10.00 KB" == 10240|human_readable'
13
+ - ' "97.66 MB" == 102400000|human_readable'
14
+ - ' "0.10 GB" == 102400000|human_readable(unit="G")'
15
+ - ' "0.10 Gb" == 10240000|human_readable(isbits=True, unit="G")'
Original file line number Diff line number Diff line change
1
+ my_secret:
2
+ kind: Secret
3
+ metadata:
4
+ name: my_secret_name
5
+
6
+ deployment_resource:
7
+ kind: Deployment
8
+ spec:
9
+ template:
10
+ spec:
11
+ containers:
12
+ - envFrom:
13
+ - secretRef:
14
+ name: {{ my_secret | kubernetes.core.k8s_config_resource_name }}
Original file line number Diff line number Diff line change @@ -2330,7 +2330,7 @@ fatal: [debian_199]: FAILED! => {"msg": "Invalid value '11111111-2222-3333-4444-
2330
2330
# 获取某台主机上以逗号分隔的挂载点(例如 ` " /,/mnt/stuff" )列表
2331
2331
{{ ansible_mounts | map(attribute='mount') | join(',') }}
2332
2332
```
2333
-
2333
+ < a name = " ansible_mounts " ></ a >
2334
2334
> ** 译注** :` ansible_mounts ` 这个变量,在执行 ` ansible.builtin.setup ` 的 ` gather_subset ` 任务后可用。
2335
2335
2336
2336
You can’t perform that action at this time.
0 commit comments