mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Fix misc. linter errors
This commit is contained in:
parent
b99a04dd8d
commit
9f4afe6972
@ -169,7 +169,7 @@ def main():
|
||||
{% endif %}
|
||||
{% for association in associations[item_type] | default([]) %}
|
||||
{{ association['related_item'] }}_ids = None
|
||||
if {{ association['related_item'] }} != None:
|
||||
if {{ association['related_item'] }} is not None:
|
||||
{{ association['related_item'] }}_ids = []
|
||||
for item in {{ association['related_item'] }}:
|
||||
{{ association['related_item'] }}_ids.append( module.resolve_name_to_id('{{ association['related_item'] }}', item) )
|
||||
@ -194,7 +194,7 @@ def main():
|
||||
{% if option == name_option %}
|
||||
new_fields['{{ name_option }}'] = new_{{ name_option }} if new_{{ name_option }} else {{ name_option }}
|
||||
{% else %}
|
||||
if {{ option }} != None:
|
||||
if {{ option }} is not None:
|
||||
{% if item['json']['actions']['POST'][option]['type'] == 'id' %}
|
||||
new_fields['{{ option }}'] = {{ option }}_id
|
||||
{% else %}
|
||||
@ -203,10 +203,10 @@ def main():
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
if state == 'absent':
|
||||
if state is 'absent':
|
||||
# If the state was absent we can let the module delete it if needed, the module will handle exiting from this
|
||||
module.delete_if_needed(existing_item)
|
||||
elif state == 'present':
|
||||
elif state is 'present':
|
||||
# If the state was present and we can let the module build or update the existing item, this will return on its own
|
||||
module.create_or_update_if_needed(
|
||||
existing_item, new_fields,
|
||||
|
||||
@ -4,13 +4,13 @@ associations:
|
||||
- related_item: credentials
|
||||
endpoint: credentials
|
||||
description: "The credentials used by this job template"
|
||||
required: False
|
||||
required: false
|
||||
groups:
|
||||
- related_item: hosts
|
||||
endpoint: hosts
|
||||
description: "The hosts associated with this group"
|
||||
required: False
|
||||
required: false
|
||||
- related_item: groups
|
||||
endpoint: children
|
||||
description: "The hosts associated with this group"
|
||||
required: False
|
||||
required: false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user