mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-28 15:41:22 -07:00
PEP 8 E111 & E114 cleanup. (#20838)
This commit is contained in:
parent
1609afbd12
commit
cb76200c7d
119 changed files with 339 additions and 378 deletions
|
@ -395,9 +395,9 @@ class PlayContext(Base):
|
|||
# become legacy updates -- from commandline
|
||||
if not new_info.become_pass:
|
||||
if new_info.become_method == 'sudo' and new_info.sudo_pass:
|
||||
setattr(new_info, 'become_pass', new_info.sudo_pass)
|
||||
setattr(new_info, 'become_pass', new_info.sudo_pass)
|
||||
elif new_info.become_method == 'su' and new_info.su_pass:
|
||||
setattr(new_info, 'become_pass', new_info.su_pass)
|
||||
setattr(new_info, 'become_pass', new_info.su_pass)
|
||||
|
||||
# become legacy updates -- from inventory file (inventory overrides
|
||||
# commandline)
|
||||
|
|
|
@ -127,7 +127,7 @@ class PlaybookInclude(Base, Conditional, Taggable):
|
|||
'''
|
||||
|
||||
if v is None:
|
||||
raise AnsibleParserError("include parameter is missing", obj=ds)
|
||||
raise AnsibleParserError("include parameter is missing", obj=ds)
|
||||
|
||||
# The include line must include at least one item, which is the filename
|
||||
# to include. Anything after that should be regarded as a parameter to the include
|
||||
|
|
|
@ -71,17 +71,17 @@ class RoleMetadata(Base):
|
|||
raise AnsibleParserError("Expected role dependencies to be a list.", obj=self._ds)
|
||||
|
||||
for role_def in ds:
|
||||
if isinstance(role_def, string_types) or 'role' in role_def or 'name' in role_def:
|
||||
roles.append(role_def)
|
||||
continue
|
||||
try:
|
||||
if isinstance(role_def, string_types) or 'role' in role_def or 'name' in role_def:
|
||||
roles.append(role_def)
|
||||
continue
|
||||
try:
|
||||
# role_def is new style: { src: 'galaxy.role,version,name', other_vars: "here" }
|
||||
def_parsed = RoleRequirement.role_yaml_parse(role_def)
|
||||
if def_parsed.get('name'):
|
||||
role_def['name'] = def_parsed['name']
|
||||
roles.append(role_def)
|
||||
except AnsibleError as exc:
|
||||
raise AnsibleParserError(str(exc), obj=role_def)
|
||||
except AnsibleError as exc:
|
||||
raise AnsibleParserError(str(exc), obj=role_def)
|
||||
|
||||
current_role_path = None
|
||||
if self._owner:
|
||||
|
|
|
@ -82,7 +82,7 @@ class Taggable:
|
|||
should_run = False
|
||||
|
||||
if 'always' in tags or 'all' in only_tags:
|
||||
should_run = True
|
||||
should_run = True
|
||||
elif not tags.isdisjoint(only_tags):
|
||||
should_run = True
|
||||
elif 'tagged' in only_tags and tags != self.untagged:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue