summaryrefslogtreecommitdiff
path: root/lib/ansible/playbook
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2017-01-30 15:01:47 -0800
committerGitHub <noreply@github.com>2017-01-30 15:01:47 -0800
commitcb76200c7dd07f604b3bbf9f0d8b9fafde16b4b3 (patch)
treec7f84e832dc07a1f9db4f8a1881bcc3f2070dff0 /lib/ansible/playbook
parent1609afbd12abb68d1434ee5ce56fe09e12a53fdb (diff)
downloadansible-cb76200c7dd07f604b3bbf9f0d8b9fafde16b4b3.tar.gz
PEP 8 E111 & E114 cleanup. (#20838)
Diffstat (limited to 'lib/ansible/playbook')
-rw-r--r--lib/ansible/playbook/play_context.py4
-rw-r--r--lib/ansible/playbook/playbook_include.py2
-rw-r--r--lib/ansible/playbook/role/metadata.py12
-rw-r--r--lib/ansible/playbook/taggable.py2
4 files changed, 10 insertions, 10 deletions
diff --git a/lib/ansible/playbook/play_context.py b/lib/ansible/playbook/play_context.py
index 65c40b44da..148b5f5f34 100644
--- a/lib/ansible/playbook/play_context.py
+++ b/lib/ansible/playbook/play_context.py
@@ -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)
diff --git a/lib/ansible/playbook/playbook_include.py b/lib/ansible/playbook/playbook_include.py
index 139ea2048e..dc0ee076d4 100644
--- a/lib/ansible/playbook/playbook_include.py
+++ b/lib/ansible/playbook/playbook_include.py
@@ -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
diff --git a/lib/ansible/playbook/role/metadata.py b/lib/ansible/playbook/role/metadata.py
index a9206605ad..0a77849490 100644
--- a/lib/ansible/playbook/role/metadata.py
+++ b/lib/ansible/playbook/role/metadata.py
@@ -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:
diff --git a/lib/ansible/playbook/taggable.py b/lib/ansible/playbook/taggable.py
index 583983d0db..3b8556010e 100644
--- a/lib/ansible/playbook/taggable.py
+++ b/lib/ansible/playbook/taggable.py
@@ -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: