diff --git a/lib/ansible/inventory.py b/lib/ansible/inventory/__init__.py similarity index 95% rename from lib/ansible/inventory.py rename to lib/ansible/inventory/__init__.py index 09c23bb0fed..7c5248896a8 100644 --- a/lib/ansible/inventory.py +++ b/lib/ansible/inventory/__init__.py @@ -20,13 +20,13 @@ import fnmatch import os -import constants as C import subprocess -from ansible.inventory_parser import InventoryParser -from ansible.inventory_parser_yaml import InventoryParserYaml -from ansible.inventory_script import InventoryScript -from ansible.group import Group -from ansible.host import Host +import ansible.constants as C +from ansible.inventory.ini import InventoryParser +from ansible.inventory.yaml import InventoryParserYaml +from ansible.inventory.script import InventoryScript +from ansible.inventory.group import Group +from ansible.inventory.host import Host from ansible import errors from ansible import utils diff --git a/lib/ansible/group.py b/lib/ansible/inventory/group.py similarity index 100% rename from lib/ansible/group.py rename to lib/ansible/inventory/group.py diff --git a/lib/ansible/host.py b/lib/ansible/inventory/host.py similarity index 100% rename from lib/ansible/host.py rename to lib/ansible/inventory/host.py diff --git a/lib/ansible/inventory_parser.py b/lib/ansible/inventory/ini.py similarity index 97% rename from lib/ansible/inventory_parser.py rename to lib/ansible/inventory/ini.py index 3a086af0781..64bc7785113 100644 --- a/lib/ansible/inventory_parser.py +++ b/lib/ansible/inventory/ini.py @@ -21,9 +21,9 @@ import fnmatch import os import subprocess -import constants as C -from ansible.host import Host -from ansible.group import Group +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 diff --git a/lib/ansible/inventory_script.py b/lib/ansible/inventory/script.py similarity index 94% rename from lib/ansible/inventory_script.py rename to lib/ansible/inventory/script.py index 8c4a78b1251..8d0f16a2145 100644 --- a/lib/ansible/inventory_script.py +++ b/lib/ansible/inventory/script.py @@ -19,10 +19,9 @@ import os import subprocess -import constants as C -import os -from ansible.host import Host -from ansible.group import Group +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 diff --git a/lib/ansible/inventory_parser_yaml.py b/lib/ansible/inventory/yaml.py similarity index 97% rename from lib/ansible/inventory_parser_yaml.py rename to lib/ansible/inventory/yaml.py index bdf69b17c37..a9d14457e5a 100644 --- a/lib/ansible/inventory_parser_yaml.py +++ b/lib/ansible/inventory/yaml.py @@ -17,9 +17,9 @@ ############################################# -import constants as C -from ansible.host import Host -from ansible.group import Group +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 diff --git a/lib/ansible/playbook.py b/lib/ansible/playbook/__init__.py similarity index 100% rename from lib/ansible/playbook.py rename to lib/ansible/playbook/__init__.py diff --git a/lib/ansible/runner.py b/lib/ansible/runner/__init__.py similarity index 99% rename from lib/ansible/runner.py rename to lib/ansible/runner/__init__.py index e1ce28d3e7e..a263544944d 100644 --- a/lib/ansible/runner.py +++ b/lib/ansible/runner/__init__.py @@ -32,11 +32,11 @@ import getpass import codecs import ansible.constants as C -import ansible.connection +import connection import ansible.inventory from ansible import utils from ansible import errors -from ansible import poller +from ansible.runner import poller from ansible import callbacks as ans_callbacks HAS_ATFORK=True @@ -153,7 +153,7 @@ class Runner(object): self.sudo_user = sudo_user self.transport = transport - self.connector = ansible.connection.Connection(self, self.transport, self.sudo_user) + self.connector = connection.Connection(self, self.transport, self.sudo_user) if inventory is None: self.inventory = ansible.inventory.Inventory(host_list) diff --git a/lib/ansible/connection.py b/lib/ansible/runner/connection.py similarity index 100% rename from lib/ansible/connection.py rename to lib/ansible/runner/connection.py diff --git a/lib/ansible/poller.py b/lib/ansible/runner/poller.py similarity index 100% rename from lib/ansible/poller.py rename to lib/ansible/runner/poller.py