我必须检查文件是否存在/etc/.如果该文件存在,那么我必须跳过该任务.这是我正在使用的代码:
/etc/
- name: checking the file exists command: touch file.txt when: $(! -s /etc/file.txt)
如果file.txt存在则我必须跳过任务.
file.txt
ansible
ansible ×1