How to create a directory using Ansible

后端 未结 22 1484
暗喜
暗喜 2020-12-22 16:44

How do you create a directory www at /srv on a Debian-based system using an Ansible playbook?

22条回答
  •  礼貌的吻别
    2020-12-22 17:21

    We have modules available to create directory , file in ansible

    Example

    - name: Creates directory
      file:
        path: /src/www
        state: directory
    

提交回复
热议问题