|
|
@ -75,10 +75,11 @@ options:
|
|
|
|
paths:
|
|
|
|
paths:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- List of paths of directories to search. All paths must be fully qualified.
|
|
|
|
- List of paths of directories to search. All paths must be fully qualified.
|
|
|
|
|
|
|
|
- From ansible-core 2.18 and onwards, the data type has changed from C(str) to C(path).
|
|
|
|
type: list
|
|
|
|
type: list
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
aliases: [ name, path ]
|
|
|
|
aliases: [ name, path ]
|
|
|
|
elements: str
|
|
|
|
elements: path
|
|
|
|
file_type:
|
|
|
|
file_type:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Type of file to select.
|
|
|
|
- Type of file to select.
|
|
|
@ -468,7 +469,7 @@ def statinfo(st):
|
|
|
|
def main():
|
|
|
|
def main():
|
|
|
|
module = AnsibleModule(
|
|
|
|
module = AnsibleModule(
|
|
|
|
argument_spec=dict(
|
|
|
|
argument_spec=dict(
|
|
|
|
paths=dict(type='list', required=True, aliases=['name', 'path'], elements='str'),
|
|
|
|
paths=dict(type='list', required=True, aliases=['name', 'path'], elements='path'),
|
|
|
|
patterns=dict(type='list', default=[], aliases=['pattern'], elements='str'),
|
|
|
|
patterns=dict(type='list', default=[], aliases=['pattern'], elements='str'),
|
|
|
|
excludes=dict(type='list', aliases=['exclude'], elements='str'),
|
|
|
|
excludes=dict(type='list', aliases=['exclude'], elements='str'),
|
|
|
|
contains=dict(type='str'),
|
|
|
|
contains=dict(type='str'),
|
|
|
@ -547,7 +548,6 @@ def main():
|
|
|
|
looked = 0
|
|
|
|
looked = 0
|
|
|
|
has_warnings = False
|
|
|
|
has_warnings = False
|
|
|
|
for npath in params['paths']:
|
|
|
|
for npath in params['paths']:
|
|
|
|
npath = os.path.expanduser(os.path.expandvars(npath))
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
if not os.path.isdir(npath):
|
|
|
|
if not os.path.isdir(npath):
|
|
|
|
raise Exception("'%s' is not a directory" % to_native(npath))
|
|
|
|
raise Exception("'%s' is not a directory" % to_native(npath))
|
|
|
|