mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-29 23:49:09 +00:00
Add remote setting to file, update TODO
This commit is contained in:
parent
03647d64e9
commit
7eb2dd2dee
3 changed files with 29 additions and 19 deletions
|
|
@ -32,6 +32,7 @@ DEFAULT_MODULE_NAME = 'ping'
|
|||
DEFAULT_PATTERN = '*'
|
||||
DEFAULT_FORKS = 3
|
||||
DEFAULT_MODULE_ARGS = ''
|
||||
DEFAULT_REMOTE_USER = 'root'
|
||||
|
||||
class Cli(object):
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ class Cli(object):
|
|||
help="path to hosts list", default=DEFAULT_HOST_LIST)
|
||||
parser.add_option("-L", "--library", dest="module_path",
|
||||
help="path to module library", default=DEFAULT_MODULE_PATH)
|
||||
parser.add_option("-F", "--forks", dest="forks",
|
||||
parser.add_option("-f", "--forks", dest="forks",
|
||||
help="level of parallelism", default=DEFAULT_FORKS)
|
||||
parser.add_option("-n", "--name", dest="module_name",
|
||||
help="module name to execute", default=DEFAULT_MODULE_NAME)
|
||||
|
|
@ -52,6 +53,8 @@ class Cli(object):
|
|||
help="module arguments", default=DEFAULT_MODULE_ARGS)
|
||||
parser.add_option("-p", "--pattern", dest="pattern",
|
||||
help="hostname pattern", default=DEFAULT_PATTERN)
|
||||
parser.add_option("-u", "--remote-user", dest="remote_user",
|
||||
help="remote username", default=DEFAULT_REMOTE_USER)
|
||||
|
||||
options, args = parser.parse_args()
|
||||
|
||||
|
|
@ -62,6 +65,7 @@ class Cli(object):
|
|||
module_name=options.module_name,
|
||||
module_path=options.module_path,
|
||||
module_args=options.module_args.split(' '),
|
||||
remote_user=options.remote_user,
|
||||
host_list=options.host_list,
|
||||
forks=options.forks,
|
||||
pattern=options.pattern,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue