【发布时间】:2019-09-25 11:34:24
【问题描述】:
我想在 /var/tmp 中查找具有特定模式“*_info”且上次修改时间大于 200 秒的文件。
这是我的剧本
---
- name: find module
hosts: myservers
gather_facts: no
tasks:
- name: find files in /var/tmp having specific pattetern _info with last modified time greater than 200 seconds
find:
paths: /var/tmp
patterens: '*_info'
age: 200
age_stamp: mtime
recurse: yes
file_type: file
register: out
- name: to print the files
debug:
var: out.files
出现以下错误。
PLAY [find module] *******************************************************************************************************
TASK [find files in /var/tmp having specific pattetern _info with last modified time greater than 200 seconds] ***********
fatal: [ansc1]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (find) module: patterens Supported parameters include: age, age_stamp, contains, depth, excludes, file_type, follow, get_checksum, hidden, paths, patterns, recurse, size, use_regex"}
PLAY RECAP ***************************************************************************************************************
ansc1 : ok=0 changed=0 unreachable=0 failed=1
【问题讨论】:
标签: ansible