Merge branch 'cleanup-imports' of https://github.com/jdavisp3/ansible into devel
This commit is contained in:
commit
02ba5a48e0
10 changed files with 2 additions and 37 deletions
|
@ -15,7 +15,6 @@
|
||||||
# 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/>.
|
||||||
|
|
||||||
from ansible import errors
|
|
||||||
import ansible.constants as C
|
import ansible.constants as C
|
||||||
|
|
||||||
class Host(object):
|
class Host(object):
|
||||||
|
@ -63,4 +62,3 @@ class Host(object):
|
||||||
groups = self.get_groups()
|
groups = self.get_groups()
|
||||||
results['group_names'] = sorted([ g.name for g in groups if g.name != 'all'])
|
results['group_names'] = sorted([ g.name for g in groups if g.name != 'all'])
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
|
@ -17,17 +17,13 @@
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
|
|
||||||
import fnmatch
|
|
||||||
import os
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
import ansible.constants as C
|
import ansible.constants as C
|
||||||
from ansible.inventory.host import Host
|
from ansible.inventory.host import Host
|
||||||
from ansible.inventory.group import Group
|
from ansible.inventory.group import Group
|
||||||
from ansible.inventory.expand_hosts import detect_range
|
from ansible.inventory.expand_hosts import detect_range
|
||||||
from ansible.inventory.expand_hosts import expand_hostname_range
|
from ansible.inventory.expand_hosts import expand_hostname_range
|
||||||
from ansible import errors
|
from ansible import errors
|
||||||
from ansible import utils
|
|
||||||
|
|
||||||
class InventoryParser(object):
|
class InventoryParser(object):
|
||||||
"""
|
"""
|
||||||
|
@ -170,5 +166,3 @@ class InventoryParser(object):
|
||||||
else:
|
else:
|
||||||
(k,v) = line.split("=",1)
|
(k,v) = line.split("=",1)
|
||||||
group.set_variable(k,v)
|
group.set_variable(k,v)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,12 +17,10 @@
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
|
|
||||||
import os
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import ansible.constants as C
|
import ansible.constants as C
|
||||||
from ansible.inventory.host import Host
|
from ansible.inventory.host import Host
|
||||||
from ansible.inventory.group import Group
|
from ansible.inventory.group import Group
|
||||||
from ansible import errors
|
|
||||||
from ansible import utils
|
from ansible import utils
|
||||||
|
|
||||||
class InventoryScript(object):
|
class InventoryScript(object):
|
||||||
|
@ -53,4 +51,3 @@ class InventoryScript(object):
|
||||||
all.add_host(host)
|
all.add_host(host)
|
||||||
all.add_child_group(group)
|
all.add_child_group(group)
|
||||||
return groups
|
return groups
|
||||||
|
|
||||||
|
|
|
@ -24,12 +24,8 @@ import random
|
||||||
import traceback
|
import traceback
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
import base64
|
|
||||||
import getpass
|
|
||||||
import codecs
|
|
||||||
import collections
|
import collections
|
||||||
import socket
|
import socket
|
||||||
import re
|
|
||||||
|
|
||||||
import ansible.constants as C
|
import ansible.constants as C
|
||||||
import ansible.inventory
|
import ansible.inventory
|
||||||
|
@ -38,7 +34,7 @@ from ansible import errors
|
||||||
from ansible import module_common
|
from ansible import module_common
|
||||||
import poller
|
import poller
|
||||||
import connection
|
import connection
|
||||||
from ansible.callbacks import DefaultRunnerCallbacks, vv, vvv
|
from ansible.callbacks import DefaultRunnerCallbacks, vv
|
||||||
|
|
||||||
HAS_ATFORK=True
|
HAS_ATFORK=True
|
||||||
try:
|
try:
|
||||||
|
@ -803,4 +799,3 @@ class Runner(object):
|
||||||
self.background = time_limit
|
self.background = time_limit
|
||||||
results = self.run()
|
results = self.run()
|
||||||
return results, poller.AsyncPoller(results, self)
|
return results, poller.AsyncPoller(results, self)
|
||||||
|
|
||||||
|
|
|
@ -16,15 +16,10 @@
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import warnings
|
import warnings
|
||||||
import traceback
|
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import pipes
|
import pipes
|
||||||
import socket
|
import socket
|
||||||
import random
|
import random
|
||||||
from ansible import utils
|
|
||||||
from ansible.callbacks import vvv
|
from ansible.callbacks import vvv
|
||||||
from ansible import errors
|
from ansible import errors
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ import yaml
|
||||||
import optparse
|
import optparse
|
||||||
import operator
|
import operator
|
||||||
from ansible import errors
|
from ansible import errors
|
||||||
from ansible import color
|
|
||||||
from ansible import __version__
|
from ansible import __version__
|
||||||
import ansible.constants as C
|
import ansible.constants as C
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -2,8 +2,6 @@ import os
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from ansible.inventory import Inventory
|
from ansible.inventory import Inventory
|
||||||
from ansible.runner import Runner
|
|
||||||
# from nose.plugins.skip import SkipTest
|
|
||||||
|
|
||||||
class TestInventory(unittest.TestCase):
|
class TestInventory(unittest.TestCase):
|
||||||
|
|
||||||
|
@ -236,4 +234,3 @@ class TestInventory(unittest.TestCase):
|
||||||
'group_names': ['norse'],
|
'group_names': ['norse'],
|
||||||
'inventory_hostname': 'thor',
|
'inventory_hostname': 'thor',
|
||||||
'inventory_hostname_short': 'thor'}
|
'inventory_hostname_short': 'thor'}
|
||||||
|
|
||||||
|
|
|
@ -10,11 +10,6 @@ import ansible.utils as utils
|
||||||
import ansible.callbacks as ans_callbacks
|
import ansible.callbacks as ans_callbacks
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import time
|
|
||||||
try:
|
|
||||||
import json
|
|
||||||
except:
|
|
||||||
import simplejson as json
|
|
||||||
|
|
||||||
EVENTS = []
|
EVENTS = []
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,6 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
import time
|
import time
|
||||||
import tempfile
|
import tempfile
|
||||||
try:
|
|
||||||
import json
|
|
||||||
except:
|
|
||||||
import simplejson as json
|
|
||||||
|
|
||||||
from nose.plugins.skip import SkipTest
|
from nose.plugins.skip import SkipTest
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import ansible.utils
|
import ansible.utils
|
||||||
|
|
Loading…
Reference in a new issue