示例:
建立多個目錄及子目錄
mkdir -p /testdir/{a,b,c}/{1,2}shell
ansible劇本以下:ide
執行結果以下:
[root@jack7-1 work]# ansible jack6_1 -m shell -a "tree /testdir"
jack6_1 | CHANGED | rc=0 >>
/testdir
├── a
│ ├── t1
│ └── t2
├── b
│ ├── t1
│ └── t2
└── c
├── t1
└── t2rem