📜  ansible 创建文件 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:45.043000             🧑  作者: Mango

代码示例2
# 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"