Misc typo fixes (#53284)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
a59565c062
commit
917520d560
7 changed files with 9 additions and 9 deletions
|
@ -75,10 +75,10 @@ class AnsiblePlugin(with_metaclass(ABCMeta, object)):
|
|||
self._options = C.config.get_plugin_options(get_plugin_class(self), self._load_name, keys=task_keys, variables=var_options, direct=direct)
|
||||
|
||||
# allow extras/wildcards from vars that are not directly consumed in configuration
|
||||
# this is needed to support things like winrm that can have extended protocol options we don't direclty handle
|
||||
# this is needed to support things like winrm that can have extended protocol options we don't directly handle
|
||||
if self.allow_extras and var_options and '_extras' in var_options:
|
||||
self.set_option('_extras', var_options['_extras'])
|
||||
|
||||
def _check_required(self):
|
||||
# FIXME: standarize required check based on config
|
||||
# FIXME: standardize required check based on config
|
||||
pass
|
||||
|
|
|
@ -15,7 +15,7 @@ from ansible.plugins import AnsiblePlugin
|
|||
|
||||
|
||||
def _gen_id(length=32):
|
||||
''' return random string used to identify the current privelege escalation '''
|
||||
''' return random string used to identify the current privilege escalation '''
|
||||
return ''.join(choice(ascii_lowercase) for x in range(length))
|
||||
|
||||
|
||||
|
@ -65,7 +65,7 @@ class BecomeBase(AnsiblePlugin):
|
|||
return any(b_success in l.rstrip() for l in b_output.splitlines(True))
|
||||
|
||||
def check_password_prompt(self, b_output):
|
||||
''' checks if the expected passwod prompt exists in b_output '''
|
||||
''' checks if the expected password prompt exists in b_output '''
|
||||
if self.prompt:
|
||||
b_prompt = to_bytes(self.prompt).strip()
|
||||
return any(l.strip().startswith(b_prompt) for l in b_output.splitlines())
|
||||
|
|
|
@ -95,7 +95,7 @@ class BecomeModule(BecomeBase):
|
|||
missing = ('Authorization required',)
|
||||
|
||||
def check_password_prompt(self, b_output):
|
||||
''' checks if the expected passwod prompt exists in b_output '''
|
||||
''' checks if the expected password prompt exists in b_output '''
|
||||
|
||||
# FIXME: more accurate would be: 'doas (%s@' % remote_user
|
||||
# however become plugins don't have that information currently
|
||||
|
|
|
@ -96,7 +96,7 @@ class BecomeModule(BecomeBase):
|
|||
missing = ('No password given',)
|
||||
|
||||
def check_password_prompt(self, b_output):
|
||||
''' checks if the expected passwod prompt exists in b_output '''
|
||||
''' checks if the expected password prompt exists in b_output '''
|
||||
|
||||
prompts = self.get_option('prompt_l10n') or ["Kerberos password for .*@.*:"]
|
||||
b_prompt = b"|".join(to_bytes(p) for p in prompts)
|
||||
|
|
|
@ -6,7 +6,7 @@ __metaclass__ = type
|
|||
|
||||
DOCUMENTATION = """
|
||||
become: sesu
|
||||
short_description: CA Privilged Access Manager
|
||||
short_description: CA Privileged Access Manager
|
||||
description:
|
||||
- This become plugins allows your remote/login user to execute commands as another user via the sesu utility.
|
||||
author: ansible (@nekonyuu)
|
||||
|
|
|
@ -131,7 +131,7 @@ class BecomeModule(BecomeBase):
|
|||
]
|
||||
|
||||
def check_password_prompt(self, b_output):
|
||||
''' checks if the expected passwod prompt exists in b_output '''
|
||||
''' checks if the expected password prompt exists in b_output '''
|
||||
|
||||
prompts = self.get_option('prompt_l10n') or self.SU_PROMPT_LOCALIZATIONS
|
||||
b_password_string = b"|".join((br'(\w+\'s )?' + to_bytes(p)) for p in prompts)
|
||||
|
|
|
@ -131,7 +131,7 @@ class CallbackModule(CallbackBase):
|
|||
# args can be specified as no_log in several places: in the task or in
|
||||
# the argument spec. We can check whether the task is no_log but the
|
||||
# argument spec can't be because that is only run on the target
|
||||
# machine and we haven't run it thereyet at this time.
|
||||
# machine and we haven't run it there yet at this time.
|
||||
#
|
||||
# So we give people a config option to affect display of the args so
|
||||
# that they can secure this if they feel that their stdout is insecure
|
||||
|
|
Loading…
Reference in a new issue