mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Add remote setting to file, update TODO
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user