标签:The led skipped esc debug exe sts 循环 reac
with_indexed_items示例:
输出结果如下:
[root@jack7-1 work]# ansible-playbook --syntax-check item_index.yml
playbook: item_index.yml
[root@jack7-1 work]# ansible-playbook item_index.yml
PLAY [jack6_1] *****
TASK [debug] ***
ok: [jack6_1] => (item=[0, u‘t1‘]) => {
"msg": [
0,
"t1"
]
}
ok: [jack6_1] => (item=[1, u‘t2‘]) => {
"msg": [
1,
"t2"
]
}
ok: [jack6_1] => (item=[2, u‘t3‘]) => {
"msg": [
2,
"t3"
]
}
ok: [jack6_1] => (item=[3, [u‘t4‘, u‘t5‘]]) => {
"msg": [
3,
[
"t4",
"t5"
]
]
}
ok: [jack6_1] => (item=[4, u‘t6‘]) => {
"msg": [
4,
"t6"
]
}
PLAY RECAP *****
jack6_1 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
标签:The led skipped esc debug exe sts 循环 reac
原文地址:https://blog.51cto.com/13434656/2529217