mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
Various simple linting type cleanups on modules
This commit is contained in:
parent
4ec0ccd5ac
commit
aaf762573e
11 changed files with 8 additions and 14 deletions
|
@ -235,7 +235,6 @@ def create_image(module, ec2):
|
||||||
for img in images:
|
for img in images:
|
||||||
if img.name == name:
|
if img.name == name:
|
||||||
module.exit_json(msg="AMI name already present", image_id=img.id, state=img.state, changed=False)
|
module.exit_json(msg="AMI name already present", image_id=img.id, state=img.state, changed=False)
|
||||||
sys.exit(0)
|
|
||||||
else:
|
else:
|
||||||
module.fail_json(msg="Error in retrieving duplicate AMI details")
|
module.fail_json(msg="Error in retrieving duplicate AMI details")
|
||||||
else:
|
else:
|
||||||
|
@ -313,7 +312,6 @@ def deregister_image(module, ec2):
|
||||||
module.fail_json(msg = "timed out waiting for image to be reregistered/deleted")
|
module.fail_json(msg = "timed out waiting for image to be reregistered/deleted")
|
||||||
|
|
||||||
module.exit_json(msg="AMI deregister/delete operation complete", changed=True)
|
module.exit_json(msg="AMI deregister/delete operation complete", changed=True)
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
|
|
||||||
def update_image(module, ec2):
|
def update_image(module, ec2):
|
||||||
|
|
|
@ -179,7 +179,6 @@ def main():
|
||||||
|
|
||||||
if state == 'list':
|
if state == 'list':
|
||||||
module.exit_json(changed=False, tags=tagdict)
|
module.exit_json(changed=False, tags=tagdict)
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
# import module snippets
|
# import module snippets
|
||||||
from ansible.module_utils.basic import *
|
from ansible.module_utils.basic import *
|
||||||
|
|
|
@ -520,7 +520,6 @@ def main():
|
||||||
|
|
||||||
# Use this snippet to debug through conditionals:
|
# Use this snippet to debug through conditionals:
|
||||||
# module.exit_json(msg="Bucket return %s"%bucketrtn)
|
# module.exit_json(msg="Bucket return %s"%bucketrtn)
|
||||||
# sys.exit(0)
|
|
||||||
|
|
||||||
# Lets check the src path.
|
# Lets check the src path.
|
||||||
pathrtn = path_check(src)
|
pathrtn = path_check(src)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/python
|
||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# This file is part of Ansible
|
# This file is part of Ansible
|
||||||
|
|
|
@ -274,7 +274,6 @@ def main():
|
||||||
from ansible.module_utils.basic import *
|
from ansible.module_utils.basic import *
|
||||||
from ansible.module_utils.shell import *
|
from ansible.module_utils.shell import *
|
||||||
from ansible.module_utils.eos import *
|
from ansible.module_utils.eos import *
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -380,7 +380,6 @@ def main():
|
||||||
module.exit_json(changed=changed, **args)
|
module.exit_json(changed=changed, **args)
|
||||||
|
|
||||||
module.fail_json(msg='Unexpected position reached')
|
module.fail_json(msg='Unexpected position reached')
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
# import module snippets
|
# import module snippets
|
||||||
from ansible.module_utils.basic import *
|
from ansible.module_utils.basic import *
|
||||||
|
|
|
@ -356,7 +356,6 @@ def main():
|
||||||
result = SysctlModule(module)
|
result = SysctlModule(module)
|
||||||
|
|
||||||
module.exit_json(changed=result.changed)
|
module.exit_json(changed=result.changed)
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
# import module snippets
|
# import module snippets
|
||||||
from ansible.module_utils.basic import *
|
from ansible.module_utils.basic import *
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# WANT_JSON
|
||||||
# POWERSHELL_COMMON
|
# POWERSHELL_COMMON
|
||||||
|
|
||||||
########
|
########
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue