mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
PEP8 E712 fixes (#21916)
This commit is contained in:
@@ -204,7 +204,7 @@ def main():
|
||||
|
||||
changed = False
|
||||
if operation == 'create':
|
||||
if slb_server_exists == False:
|
||||
if slb_server_exists is False:
|
||||
result = axapi_call_v3(module, axapi_base_url+'slb/server/', method='POST', body=json.dumps(json_post), signature=signature)
|
||||
if axapi_failure(result):
|
||||
module.fail_json(msg="failed to create the server: %s" % result['response']['err']['msg'])
|
||||
|
||||
@@ -210,7 +210,7 @@ def main():
|
||||
kickstart_image_file):
|
||||
changed = True
|
||||
|
||||
if not module.check_mode and changed == True:
|
||||
if not module.check_mode and changed is True:
|
||||
set_boot_options(module,
|
||||
system_image_file,
|
||||
kickstart=kickstart_image_file)
|
||||
|
||||
@@ -680,7 +680,7 @@ def main():
|
||||
commands.append(defaults)
|
||||
|
||||
elif state == 'absent':
|
||||
if existing.get('sparse') == True:
|
||||
if existing.get('sparse') is True:
|
||||
delta['sparse'] = False
|
||||
# defaults is a list of commands
|
||||
defaults = config_pim_interface_defaults(existing, jp_bidir, isauth)
|
||||
|
||||
@@ -300,12 +300,12 @@ def get_commands_to_config_vpc(module, vpc, domain, existing):
|
||||
' source {1} vrf {2}'.format(pkl_dest, pkl_src, pkl_vrf))
|
||||
commands.append(pkl_command)
|
||||
|
||||
if vpc.get('auto_recovery') == False:
|
||||
if vpc.get('auto_recovery') is False:
|
||||
vpc['auto_recovery'] = 'no'
|
||||
else:
|
||||
vpc['auto_recovery'] = ''
|
||||
|
||||
if vpc.get('peer_gw') == False:
|
||||
if vpc.get('peer_gw') is False:
|
||||
vpc['peer_gw'] = 'no'
|
||||
else:
|
||||
vpc['peer_gw'] = ''
|
||||
|
||||
@@ -209,7 +209,7 @@ def main():
|
||||
|
||||
# Verify that we receive a community when using snmp v2
|
||||
if m_args['version'] == "v2" or m_args['version'] == "v2c":
|
||||
if m_args['community'] == False:
|
||||
if m_args['community'] is False:
|
||||
module.fail_json(msg='Community not set when using snmp version 2')
|
||||
|
||||
if m_args['version'] == "v3":
|
||||
|
||||
Reference in New Issue
Block a user