From ccd559137f199e37f4061e1946ba9667c2f869fa Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 10 Oct 2014 16:47:55 -0400 Subject: [PATCH] add missing headers, rm the subtree of ansible/inventory as we wish to overhaul it. --- lib/ansible/modules/core | 2 +- lib/ansible/modules/extras | 2 +- test/v2/errors/test_errors.py | 17 ++++++++- test/v2/parsing/__init__.py | 17 ++++++++- test/v2/parsing/test_general.py | 17 ++++++++- test/v2/parsing/test_mod_args.py | 17 ++++++++- test/v2/parsing/yaml/__init__.py | 17 ++++++++- test/v2/parsing/yaml/test_yaml.py | 17 ++++++++- test/v2/playbook/__init__.py | 18 ++++++++-- test/v2/playbook/test_task.py | 17 ++++++++- v2/ansible/__init__.py | 17 ++++++++- v2/ansible/inventory/__init__.py | 26 -------------- v2/ansible/inventory/group.py | 44 ------------------------ v2/ansible/inventory/host.py | 27 --------------- v2/ansible/inventory/loaders/__init__.py | 17 --------- v2/ansible/inventory/loaders/dir.py | 17 --------- v2/ansible/inventory/loaders/ini.py | 17 --------- v2/ansible/inventory/loaders/script.py | 17 --------- v2/ansible/inventory/pattern.py | 36 ------------------- v2/ansible/modules/__init__.py | 18 ++++++++-- v2/ansible/parsing/__init__.py | 17 ++++++++- v2/scripts/ansible | 16 +++++++++ 22 files changed, 194 insertions(+), 216 deletions(-) delete mode 100644 v2/ansible/inventory/__init__.py delete mode 100644 v2/ansible/inventory/group.py delete mode 100644 v2/ansible/inventory/host.py delete mode 100644 v2/ansible/inventory/loaders/__init__.py delete mode 100644 v2/ansible/inventory/loaders/dir.py delete mode 100644 v2/ansible/inventory/loaders/ini.py delete mode 100644 v2/ansible/inventory/loaders/script.py delete mode 100644 v2/ansible/inventory/pattern.py diff --git a/lib/ansible/modules/core b/lib/ansible/modules/core index 5af8d55b03..cb69744bce 160000 --- a/lib/ansible/modules/core +++ b/lib/ansible/modules/core @@ -1 +1 @@ -Subproject commit 5af8d55b0365a5c3278c43b5424bf5f2ddf897b8 +Subproject commit cb69744bcee4b4217d83b4a30006635ba69e2aa0 diff --git a/lib/ansible/modules/extras b/lib/ansible/modules/extras index 681db4ce2c..8a4f07eecd 160000 --- a/lib/ansible/modules/extras +++ b/lib/ansible/modules/extras @@ -1 +1 @@ -Subproject commit 681db4ce2c534eca4fca57c5a83a5be8035c257d +Subproject commit 8a4f07eecd2bb877f51b7b04b5352efa6076cce5 diff --git a/test/v2/errors/test_errors.py b/test/v2/errors/test_errors.py index 874195e476..762aaceb6d 100644 --- a/test/v2/errors/test_errors.py +++ b/test/v2/errors/test_errors.py @@ -1,4 +1,19 @@ -# TODO: header +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . import unittest diff --git a/test/v2/parsing/__init__.py b/test/v2/parsing/__init__.py index 8b13789179..1f84012e01 100644 --- a/test/v2/parsing/__init__.py +++ b/test/v2/parsing/__init__.py @@ -1 +1,16 @@ - +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . diff --git a/test/v2/parsing/test_general.py b/test/v2/parsing/test_general.py index a6277edfc6..e932d3e448 100644 --- a/test/v2/parsing/test_general.py +++ b/test/v2/parsing/test_general.py @@ -1,4 +1,19 @@ -# TODO: header +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . import unittest from ansible.parsing import load diff --git a/test/v2/parsing/test_mod_args.py b/test/v2/parsing/test_mod_args.py index 15d725956a..5fa60e1aca 100644 --- a/test/v2/parsing/test_mod_args.py +++ b/test/v2/parsing/test_mod_args.py @@ -1,4 +1,19 @@ -# TODO: header +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . from ansible.parsing.mod_args import ModuleArgsParser import unittest diff --git a/test/v2/parsing/yaml/__init__.py b/test/v2/parsing/yaml/__init__.py index 44026bdff0..1f84012e01 100644 --- a/test/v2/parsing/yaml/__init__.py +++ b/test/v2/parsing/yaml/__init__.py @@ -1 +1,16 @@ -# TODO: header +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . diff --git a/test/v2/parsing/yaml/test_yaml.py b/test/v2/parsing/yaml/test_yaml.py index 00394f6091..6be75032ae 100644 --- a/test/v2/parsing/yaml/test_yaml.py +++ b/test/v2/parsing/yaml/test_yaml.py @@ -1,4 +1,19 @@ -# TODO: header +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . import unittest diff --git a/test/v2/playbook/__init__.py b/test/v2/playbook/__init__.py index ec86ee6101..1f84012e01 100644 --- a/test/v2/playbook/__init__.py +++ b/test/v2/playbook/__init__.py @@ -1,2 +1,16 @@ -# TODO: header - +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . diff --git a/test/v2/playbook/test_task.py b/test/v2/playbook/test_task.py index e6ffe2ece3..76ad0e2447 100644 --- a/test/v2/playbook/test_task.py +++ b/test/v2/playbook/test_task.py @@ -1,4 +1,19 @@ -# TODO: header +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . from ansible.playbook.task import Task import unittest diff --git a/v2/ansible/__init__.py b/v2/ansible/__init__.py index 44026bdff0..1f84012e01 100644 --- a/v2/ansible/__init__.py +++ b/v2/ansible/__init__.py @@ -1 +1,16 @@ -# TODO: header +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . diff --git a/v2/ansible/inventory/__init__.py b/v2/ansible/inventory/__init__.py deleted file mode 100644 index 29c9a8324d..0000000000 --- a/v2/ansible/inventory/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# (c) 2012-2014, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . - -class Inventory(object): - def __init__(self): - pass - - def get_hosts(self): - return [] - - def get_groups(self): - return [] diff --git a/v2/ansible/inventory/group.py b/v2/ansible/inventory/group.py deleted file mode 100644 index 9a277178f4..0000000000 --- a/v2/ansible/inventory/group.py +++ /dev/null @@ -1,44 +0,0 @@ -# (c) 2012-2014, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . - -class Group(object): - def __init__(self, name, hosts=[]): - self.name = name - self.hosts = hosts - self.parents = [] - self.children = [] - - def get_vars(self): - return dict() - - def get_hosts(self): - return self.hosts - - def get_direct_subgroups(self): - direct_children = [] - for child in self.children: - direct_children.append(child.name) - return direct_children - - def get_all_subgroups(self): - all_children = [] - for child in self.children: - all_children.extend(child.get_all_subgroups()) - return all_children - - def get_parent_groups(self): - return self.parents diff --git a/v2/ansible/inventory/host.py b/v2/ansible/inventory/host.py deleted file mode 100644 index 390f0f8744..0000000000 --- a/v2/ansible/inventory/host.py +++ /dev/null @@ -1,27 +0,0 @@ -# (c) 2012-2014, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . - -class Host(object): - def __init__(self, name): - self.name = name - self.groups = [] - - def get_vars(self): - return dict() - - def get_groups(self): - return self.groups diff --git a/v2/ansible/inventory/loaders/__init__.py b/v2/ansible/inventory/loaders/__init__.py deleted file mode 100644 index d6c11ffa74..0000000000 --- a/v2/ansible/inventory/loaders/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# (c) 2012-2014, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . - diff --git a/v2/ansible/inventory/loaders/dir.py b/v2/ansible/inventory/loaders/dir.py deleted file mode 100644 index d6c11ffa74..0000000000 --- a/v2/ansible/inventory/loaders/dir.py +++ /dev/null @@ -1,17 +0,0 @@ -# (c) 2012-2014, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . - diff --git a/v2/ansible/inventory/loaders/ini.py b/v2/ansible/inventory/loaders/ini.py deleted file mode 100644 index d6c11ffa74..0000000000 --- a/v2/ansible/inventory/loaders/ini.py +++ /dev/null @@ -1,17 +0,0 @@ -# (c) 2012-2014, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . - diff --git a/v2/ansible/inventory/loaders/script.py b/v2/ansible/inventory/loaders/script.py deleted file mode 100644 index d6c11ffa74..0000000000 --- a/v2/ansible/inventory/loaders/script.py +++ /dev/null @@ -1,17 +0,0 @@ -# (c) 2012-2014, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . - diff --git a/v2/ansible/inventory/pattern.py b/v2/ansible/inventory/pattern.py deleted file mode 100644 index dd7068bdbc..0000000000 --- a/v2/ansible/inventory/pattern.py +++ /dev/null @@ -1,36 +0,0 @@ -# (c) 2012-2014, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . - -from v2.inventory import Host, Group - -class HostPattern(object): - def __init__(self, pattern): - self.pattern = pattern - - def match(thing): - ''' - return a list of matches - ''' - - matches = [] - if isinstance(thing, Host): - # simple match against a single host - pass - elif isinstance(thing, Group): - # match against the list of hosts in the group - pass - return matches diff --git a/v2/ansible/modules/__init__.py b/v2/ansible/modules/__init__.py index ec86ee6101..1f84012e01 100644 --- a/v2/ansible/modules/__init__.py +++ b/v2/ansible/modules/__init__.py @@ -1,2 +1,16 @@ -# TODO: header - +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . diff --git a/v2/ansible/parsing/__init__.py b/v2/ansible/parsing/__init__.py index 9e6329bab2..232d95b834 100644 --- a/v2/ansible/parsing/__init__.py +++ b/v2/ansible/parsing/__init__.py @@ -1,4 +1,19 @@ -# TODO: header +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . from ansible.errors import AnsibleError, AnsibleInternalError diff --git a/v2/scripts/ansible b/v2/scripts/ansible index e69de29bb2..1f84012e01 100644 --- a/v2/scripts/ansible +++ b/v2/scripts/ansible @@ -0,0 +1,16 @@ +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see .