mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add regex support call to the command line
This commit is contained in:
parent
8bf7bcad12
commit
35e1ba5778
1 changed files with 8 additions and 0 deletions
|
@ -31,12 +31,20 @@ class SaltCMD(object):
|
|||
type=int,
|
||||
dest='timeout',
|
||||
help='Set the return timeout for batch jobs')
|
||||
parser.add_option('-E',
|
||||
'--pcre',
|
||||
default=False,
|
||||
dest='pcre',
|
||||
action='store_true'
|
||||
help='Instead of using shell globs to evaluate the target'\
|
||||
+ ' servers, use pcre regular expressions')
|
||||
|
||||
options, args = parser.parse_args()
|
||||
|
||||
opts = {}
|
||||
|
||||
opts['timeout'] = options.timeout
|
||||
opts['pcre'] = options.pcre
|
||||
opts['tgt'] = args[0]
|
||||
opts['fun'] = args[1]
|
||||
opts['arg'] = args[2:]
|
||||
|
|
Loading…
Add table
Reference in a new issue