diff options
| author | Seth Vidal <skvidal@fedoraproject.org> | 2013-07-03 23:54:25 -0400 |
|---|---|---|
| committer | Seth Vidal <skvidal@fedoraproject.org> | 2013-07-03 23:54:25 -0400 |
| commit | eb5233ffff3024cc7a3cd90d33dd06edf3a52f7a (patch) | |
| tree | 50e1bd224954739b0adc02a5813db5e9770cce59 /scripts | |
| parent | 0ef3ff79ad7b3b938e10c31da77451a073a0f9b2 (diff) | |
| download | ansible-eb5233ffff3024cc7a3cd90d33dd06edf3a52f7a.tar.gz ansible-eb5233ffff3024cc7a3cd90d33dd06edf3a52f7a.tar.xz ansible-eb5233ffff3024cc7a3cd90d33dd06edf3a52f7a.zip | |
add -l to list which playbooks were run on a specific date
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/show_changed | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/show_changed b/scripts/show_changed index 5cfaa396a..fb1e6b45f 100755 --- a/scripts/show_changed +++ b/scripts/show_changed @@ -25,6 +25,7 @@ def parse_args(args): parser.add_option("-p", default='*', dest='playbook', help="the playbook you want to look for") parser.add_option("-v", default=False, dest='verbose', action='store_true', help='Verbose') parser.add_option("-s", default=[], dest='search_terms', action='append', help="status to search for") + parser.add_option("-l", default=False, dest="list_pb", action='store_true', help="list playbooks for a specific date") (opts, args) = parser.parse_args(args) opts.datestr = date_cheat(opts.datestr) @@ -61,6 +62,10 @@ def main(args): for pb in glob.glob(logpath + '/' + opts.playbook): pb_name = os.path.basename(pb) for pb_logdir in glob.glob(pb + '/' + opts.datestr): + if opts.list_pb: + print pb_name + continue + logfiles = glob.glob(pb_logdir + '/*/*.log') msg = search_logs(opts, logfiles) if msg: |
