📅  最后修改于: 2022-03-11 14:51:45.043000             🧑  作者: Mango
# Use file module
- name: Create a file
file:
path: /my/absolute/path/myfile
state: touch
owner: root
group: root
mode: '0664'
# Ad hoc command
ansible my_hosts -m file -a "path=/my/absolute/path/myfile state=touch"