文件操作 - fileglob.yml
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3.12/site-packages/ansible/plugins/filter/fileglob.yml
编辑文件内容
DOCUMENTATION: name: fileglob short_description: explode a path glob to matching files description: - Return a list of files that matches the supplied path glob pattern. - Filters run on the controller, so the files are matched from the controller's file system. positional: _input options: _input: description: Path glob pattern. type: string required: true EXAMPLES: | # found = ['/etc/hosts', '/etc/hasts'] found: "{{ '/etc/h?sts' | fileglob }}" RETURN: _value: description: List of files matched. type: list elements: string
修改文件时间
将文件时间修改为当前时间的前一年
删除文件