mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
PEP 8 indent cleanup. (#20800)
* PEP 8 E121 cleanup. * PEP 8 E126 cleanup. * PEP 8 E122 cleanup.
This commit is contained in:
parent
1c6bb4add9
commit
10d9318de7
244 changed files with 2873 additions and 2973 deletions
|
@ -349,8 +349,8 @@ class Block(Base, Become, Conditional, Taggable):
|
|||
if isinstance(task, Block):
|
||||
tmp_list.append(evaluate_block(task))
|
||||
elif task.action == 'meta' \
|
||||
or (task.action == 'include' and task.evaluate_tags([], play_context.skip_tags, all_vars=all_vars)) \
|
||||
or task.evaluate_tags(play_context.only_tags, play_context.skip_tags, all_vars=all_vars):
|
||||
or (task.action == 'include' and task.evaluate_tags([], play_context.skip_tags, all_vars=all_vars)) \
|
||||
or task.evaluate_tags(play_context.only_tags, play_context.skip_tags, all_vars=all_vars):
|
||||
tmp_list.append(task)
|
||||
return tmp_list
|
||||
|
||||
|
|
|
@ -133,8 +133,8 @@ def load_list_of_tasks(ds, play, block=None, role=None, task_include=None, use_h
|
|||
is_static = t.static
|
||||
else:
|
||||
is_static = C.DEFAULT_TASK_INCLUDES_STATIC or \
|
||||
(use_handlers and C.DEFAULT_HANDLER_INCLUDES_STATIC) or \
|
||||
(not templar._contains_vars(t.args['_raw_params']) and t.all_parents_static() and not t.loop)
|
||||
(use_handlers and C.DEFAULT_HANDLER_INCLUDES_STATIC) or \
|
||||
(not templar._contains_vars(t.args['_raw_params']) and t.all_parents_static() and not t.loop)
|
||||
|
||||
if is_static:
|
||||
if t.loop is not None:
|
||||
|
@ -179,13 +179,13 @@ def load_list_of_tasks(ds, play, block=None, role=None, task_include=None, use_h
|
|||
include_target = templar.template(t.args['_raw_params'])
|
||||
except AnsibleUndefinedVariable:
|
||||
raise AnsibleParserError(
|
||||
"Error when evaluating variable in include name: %s.\n\n" \
|
||||
"When using static includes, ensure that any variables used in their names are defined in vars/vars_files\n" \
|
||||
"or extra-vars passed in from the command line. Static includes cannot use variables from inventory\n" \
|
||||
"sources like group or host vars." % t.args['_raw_params'],
|
||||
obj=task_ds,
|
||||
suppress_extended_error=True,
|
||||
)
|
||||
"Error when evaluating variable in include name: %s.\n\n" \
|
||||
"When using static includes, ensure that any variables used in their names are defined in vars/vars_files\n" \
|
||||
"or extra-vars passed in from the command line. Static includes cannot use variables from inventory\n" \
|
||||
"sources like group or host vars." % t.args['_raw_params'],
|
||||
obj=task_ds,
|
||||
suppress_extended_error=True,
|
||||
)
|
||||
if t._role:
|
||||
include_file = loader.path_dwim_relative(t._role._role_path, subdir, include_target)
|
||||
else:
|
||||
|
@ -269,13 +269,13 @@ def load_list_of_tasks(ds, play, block=None, role=None, task_include=None, use_h
|
|||
elif 'include_role' in task_ds:
|
||||
|
||||
ir = IncludeRole.load(
|
||||
task_ds,
|
||||
block=block,
|
||||
role=role,
|
||||
task_include=None,
|
||||
variable_manager=variable_manager,
|
||||
loader=loader
|
||||
)
|
||||
task_ds,
|
||||
block=block,
|
||||
role=role,
|
||||
task_include=None,
|
||||
variable_manager=variable_manager,
|
||||
loader=loader
|
||||
)
|
||||
|
||||
# 1. the user has set the 'static' option to false or true
|
||||
# 2. one of the appropriate config options was set
|
||||
|
|
|
@ -51,41 +51,41 @@ except ImportError:
|
|||
# in variable names.
|
||||
|
||||
MAGIC_VARIABLE_MAPPING = dict(
|
||||
connection = ('ansible_connection',),
|
||||
remote_addr = ('ansible_ssh_host', 'ansible_host'),
|
||||
remote_user = ('ansible_ssh_user', 'ansible_user'),
|
||||
port = ('ansible_ssh_port', 'ansible_port'),
|
||||
ssh_executable = ('ansible_ssh_executable',),
|
||||
accelerate_port = ('ansible_accelerate_port',),
|
||||
password = ('ansible_ssh_pass', 'ansible_password'),
|
||||
private_key_file = ('ansible_ssh_private_key_file', 'ansible_private_key_file'),
|
||||
pipelining = ('ansible_ssh_pipelining', 'ansible_pipelining'),
|
||||
shell = ('ansible_shell_type',),
|
||||
network_os = ('ansible_network_os',),
|
||||
become = ('ansible_become',),
|
||||
become_method = ('ansible_become_method',),
|
||||
become_user = ('ansible_become_user',),
|
||||
become_pass = ('ansible_become_password','ansible_become_pass'),
|
||||
become_exe = ('ansible_become_exe',),
|
||||
become_flags = ('ansible_become_flags',),
|
||||
ssh_common_args = ('ansible_ssh_common_args',),
|
||||
docker_extra_args= ('ansible_docker_extra_args',),
|
||||
sftp_extra_args = ('ansible_sftp_extra_args',),
|
||||
scp_extra_args = ('ansible_scp_extra_args',),
|
||||
ssh_extra_args = ('ansible_ssh_extra_args',),
|
||||
ssh_transfer_method = ('ansible_ssh_transfer_method',),
|
||||
sudo = ('ansible_sudo',),
|
||||
sudo_user = ('ansible_sudo_user',),
|
||||
sudo_pass = ('ansible_sudo_password', 'ansible_sudo_pass'),
|
||||
sudo_exe = ('ansible_sudo_exe',),
|
||||
sudo_flags = ('ansible_sudo_flags',),
|
||||
su = ('ansible_su',),
|
||||
su_user = ('ansible_su_user',),
|
||||
su_pass = ('ansible_su_password', 'ansible_su_pass'),
|
||||
su_exe = ('ansible_su_exe',),
|
||||
su_flags = ('ansible_su_flags',),
|
||||
executable = ('ansible_shell_executable',),
|
||||
module_compression = ('ansible_module_compression',),
|
||||
connection = ('ansible_connection',),
|
||||
remote_addr = ('ansible_ssh_host', 'ansible_host'),
|
||||
remote_user = ('ansible_ssh_user', 'ansible_user'),
|
||||
port = ('ansible_ssh_port', 'ansible_port'),
|
||||
ssh_executable = ('ansible_ssh_executable',),
|
||||
accelerate_port = ('ansible_accelerate_port',),
|
||||
password = ('ansible_ssh_pass', 'ansible_password'),
|
||||
private_key_file = ('ansible_ssh_private_key_file', 'ansible_private_key_file'),
|
||||
pipelining = ('ansible_ssh_pipelining', 'ansible_pipelining'),
|
||||
shell = ('ansible_shell_type',),
|
||||
network_os = ('ansible_network_os',),
|
||||
become = ('ansible_become',),
|
||||
become_method = ('ansible_become_method',),
|
||||
become_user = ('ansible_become_user',),
|
||||
become_pass = ('ansible_become_password','ansible_become_pass'),
|
||||
become_exe = ('ansible_become_exe',),
|
||||
become_flags = ('ansible_become_flags',),
|
||||
ssh_common_args = ('ansible_ssh_common_args',),
|
||||
docker_extra_args= ('ansible_docker_extra_args',),
|
||||
sftp_extra_args = ('ansible_sftp_extra_args',),
|
||||
scp_extra_args = ('ansible_scp_extra_args',),
|
||||
ssh_extra_args = ('ansible_ssh_extra_args',),
|
||||
ssh_transfer_method = ('ansible_ssh_transfer_method',),
|
||||
sudo = ('ansible_sudo',),
|
||||
sudo_user = ('ansible_sudo_user',),
|
||||
sudo_pass = ('ansible_sudo_password', 'ansible_sudo_pass'),
|
||||
sudo_exe = ('ansible_sudo_exe',),
|
||||
sudo_flags = ('ansible_sudo_flags',),
|
||||
su = ('ansible_su',),
|
||||
su_user = ('ansible_su_user',),
|
||||
su_pass = ('ansible_su_password', 'ansible_su_pass'),
|
||||
su_exe = ('ansible_su_exe',),
|
||||
su_flags = ('ansible_su_flags',),
|
||||
executable = ('ansible_shell_executable',),
|
||||
module_compression = ('ansible_module_compression',),
|
||||
)
|
||||
|
||||
b_SU_PROMPT_LOCALIZATIONS = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue