diff --git a/lib/ansible/inventory/host.py b/lib/ansible/inventory/host.py
index 0611c1239c..b73d1c6588 100644
--- a/lib/ansible/inventory/host.py
+++ b/lib/ansible/inventory/host.py
@@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see .
-from ansible import errors
import ansible.constants as C
class Host(object):
@@ -63,4 +62,3 @@ class Host(object):
groups = self.get_groups()
results['group_names'] = sorted([ g.name for g in groups if g.name != 'all'])
return results
-
diff --git a/lib/ansible/inventory/ini.py b/lib/ansible/inventory/ini.py
index 42b50553ef..8251d08697 100644
--- a/lib/ansible/inventory/ini.py
+++ b/lib/ansible/inventory/ini.py
@@ -17,17 +17,13 @@
#############################################
-import fnmatch
-import os
-import subprocess
-
import ansible.constants as C
from ansible.inventory.host import Host
from ansible.inventory.group import Group
from ansible.inventory.expand_hosts import detect_range
from ansible.inventory.expand_hosts import expand_hostname_range
from ansible import errors
-from ansible import utils
+
class InventoryParser(object):
"""
@@ -170,5 +166,3 @@ class InventoryParser(object):
else:
(k,v) = line.split("=",1)
group.set_variable(k,v)
-
-
diff --git a/lib/ansible/inventory/script.py b/lib/ansible/inventory/script.py
index 6d87e6b558..524ee83319 100644
--- a/lib/ansible/inventory/script.py
+++ b/lib/ansible/inventory/script.py
@@ -17,12 +17,10 @@
#############################################
-import os
import subprocess
import ansible.constants as C
from ansible.inventory.host import Host
from ansible.inventory.group import Group
-from ansible import errors
from ansible import utils
class InventoryScript(object):
@@ -53,4 +51,3 @@ class InventoryScript(object):
all.add_host(host)
all.add_child_group(group)
return groups
-
diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py
index 71b6047fc4..a1e566ce8e 100644
--- a/lib/ansible/runner/__init__.py
+++ b/lib/ansible/runner/__init__.py
@@ -24,12 +24,8 @@ import random
import traceback
import tempfile
import time
-import base64
-import getpass
-import codecs
import collections
import socket
-import re
import ansible.constants as C
import ansible.inventory
@@ -38,7 +34,7 @@ from ansible import errors
from ansible import module_common
import poller
import connection
-from ansible.callbacks import DefaultRunnerCallbacks, vv, vvv
+from ansible.callbacks import DefaultRunnerCallbacks, vv
HAS_ATFORK=True
try:
@@ -803,4 +799,3 @@ class Runner(object):
self.background = time_limit
results = self.run()
return results, poller.AsyncPoller(results, self)
-
diff --git a/lib/ansible/runner/connection/paramiko_ssh.py b/lib/ansible/runner/connection/paramiko_ssh.py
index ca48f1dd98..88e501a6cd 100644
--- a/lib/ansible/runner/connection/paramiko_ssh.py
+++ b/lib/ansible/runner/connection/paramiko_ssh.py
@@ -16,15 +16,10 @@
# along with Ansible. If not, see .
import warnings
-import traceback
import os
-import re
-import shutil
-import subprocess
import pipes
import socket
import random
-from ansible import utils
from ansible.callbacks import vvv
from ansible import errors
diff --git a/lib/ansible/utils.py b/lib/ansible/utils.py
index b248ce8182..9582ab9f82 100644
--- a/lib/ansible/utils.py
+++ b/lib/ansible/utils.py
@@ -25,7 +25,6 @@ import yaml
import optparse
import operator
from ansible import errors
-from ansible import color
from ansible import __version__
import ansible.constants as C
import time
diff --git a/test/TestInventory.py b/test/TestInventory.py
index 680ad72bd2..8ce9e979f9 100644
--- a/test/TestInventory.py
+++ b/test/TestInventory.py
@@ -2,8 +2,6 @@ import os
import unittest
from ansible.inventory import Inventory
-from ansible.runner import Runner
-# from nose.plugins.skip import SkipTest
class TestInventory(unittest.TestCase):
@@ -236,4 +234,3 @@ class TestInventory(unittest.TestCase):
'group_names': ['norse'],
'inventory_hostname': 'thor',
'inventory_hostname_short': 'thor'}
-
diff --git a/test/TestPlayBook.py b/test/TestPlayBook.py
index d5b828f2f4..ebd8bd7aef 100644
--- a/test/TestPlayBook.py
+++ b/test/TestPlayBook.py
@@ -10,11 +10,6 @@ import ansible.utils as utils
import ansible.callbacks as ans_callbacks
import os
import shutil
-import time
-try:
- import json
-except:
- import simplejson as json
EVENTS = []
diff --git a/test/TestRunner.py b/test/TestRunner.py
index a29c36009e..37cb9ded7c 100644
--- a/test/TestRunner.py
+++ b/test/TestRunner.py
@@ -10,10 +10,6 @@ import os
import shutil
import time
import tempfile
-try:
- import json
-except:
- import simplejson as json
from nose.plugins.skip import SkipTest
diff --git a/test/TestUtils.py b/test/TestUtils.py
index 6eab8373f3..00eee68fcf 100644
--- a/test/TestUtils.py
+++ b/test/TestUtils.py
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
-import os
import unittest
import ansible.utils