mirror of
https://github.com/ansible/ansible-documentation.git
synced 2026-03-26 13:18:58 +07:00
Let "all" be an alias for "*" in patterns, fix output bug on non-command execution, make clean now removes the build dir
This commit is contained in:
1
Makefile
1
Makefile
@@ -24,6 +24,7 @@ pep8:
|
||||
pep8 lib/
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
find . -type f -name "*.pyc" -delete
|
||||
find . -type f -name "*.pyo" -delete
|
||||
find . -type f -name "*~" -delete
|
||||
|
||||
@@ -170,6 +170,7 @@ class Cli(object):
|
||||
else:
|
||||
buf += "%s | FAILED >>" % hostname
|
||||
buf += json.dumps(result, indent=4, sort_keys=True)
|
||||
print buf
|
||||
if options.tree:
|
||||
path = os.path.join(options.tree, hostname)
|
||||
fd = open(path, "w+")
|
||||
|
||||
@@ -121,6 +121,8 @@ class Runner(object):
|
||||
subpatterns = pattern.split(";")
|
||||
for subpattern in subpatterns:
|
||||
# the pattern could be a real glob
|
||||
if subpattern == 'all':
|
||||
return True
|
||||
if fnmatch.fnmatch(host_name, subpattern):
|
||||
return True
|
||||
# or it could be a literal group name instead
|
||||
|
||||
0
library/facter
Normal file → Executable file
0
library/facter
Normal file → Executable file
Reference in New Issue
Block a user