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