Just curious if this is a bug in the find module or if it's working as 
intended?
Running ansible 2.0.0.2

Demo snippet:
- name: module find mpath
  find: paths='/dev/mapper' patterns='mpath*p*'
  register: modfind_result

- debug: var=modfind_result

- name: shell find mpath
  shell: find /dev/mapper -name mpath*p*
  register: shfind_result

- debug: var=shfind_result


Output:
TASK [module find mpath] 
*******************************************************
ok: [devwebdb0]

TASK [debug] 
*******************************************************************
ok: [devwebdb0] => {
    "modfind_result": {
        "changed": false, 
        "examined": 3, 
        "files": [], 
        "matched": 0, 
        "msg": ""
    }
}

TASK [shell find mpath] 
********************************************************
changed: [devwebdb0]

TASK [debug] 
*******************************************************************
ok: [devwebdb0] => {
    "shfind_result": {
        "changed": true, 
        "cmd": "find /dev/mapper -name mpath*p*", 
        "delta": "0:00:00.404326", 
        "end": "2016-02-10 14:51:21.624126", 
        "rc": 0, 
        "start": "2016-02-10 14:51:21.219800", 
        "stderr": "", 
        "stdout": "/dev/mapper/mpath5p1", 
        "stdout_lines": [
            "/dev/mapper/mpath5p1"
        ], 
        "warnings": []
    }
}

modfind_result.examined=3, so it appears to be seeing the device files, 
however modfind_result.files=[], which would make me think it's not 
matching the pattern.  Using patterns="*" or leaving it out entirely 
returns the same results however, and it works just fine if I try and match 
against a text or binary file.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ac4663fb-5ff9-4f6a-af87-5f40b1a32a5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to