Fix some copyrights, fix a misc test.

This commit is contained in:
Michael DeHaan 2014-08-11 11:37:30 -04:00
parent 533fb21586
commit 2629cd3fce
7 changed files with 25 additions and 12 deletions

View file

@ -132,6 +132,13 @@ filter_plugins = /usr/share/ansible_plugins/filter_plugins
# avoid issues. # avoid issues.
#http_user_agent = ansible-agent #http_user_agent = ansible-agent
# if set to a persistant type (not 'memory', for example 'redis') fact values
# from previous runs in Ansible will be stored. This may be useful when
# wanting to use, for example, IP information from one group of servers
# without having to talk to them in the same playbook run to get their
# current IP information.
fact_caching = memory
[paramiko_connection] [paramiko_connection]
# uncomment this line to cause the paramiko connection plugin to not record new host # uncomment this line to cause the paramiko connection plugin to not record new host

View file

@ -1,4 +1,4 @@
# (c) 2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2014, Brian Coca, Josh Drake, et al
# #
# This file is part of Ansible # This file is part of Ansible
# #
@ -14,6 +14,7 @@
# #
# 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 __future__ import absolute_import from __future__ import absolute_import
import collections import collections

View file

@ -1,4 +1,4 @@
# (c) 2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2014, Brian Coca, Josh Drake, et al
# #
# This file is part of Ansible # This file is part of Ansible
# #
@ -14,6 +14,7 @@
# #
# 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/>.
import collections import collections
import os import os
import sys import sys

View file

@ -1,4 +1,4 @@
# (c) 2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2014, Brian Coca, Josh Drake, et al
# #
# This file is part of Ansible # This file is part of Ansible
# #
@ -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/>.
class CacheModule(object): class CacheModule(object):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):

View file

@ -1,4 +1,4 @@
# (c) 2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2014, Brian Coca, Josh Drake, et al
# #
# This file is part of Ansible # This file is part of Ansible
# #
@ -14,9 +14,10 @@
# #
# 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 __future__ import absolute_import
from __future__ import absolute_import
import collections import collections
# FIXME: can we store these as something else before we ship it?
import cPickle import cPickle
import sys import sys
import time import time
@ -33,7 +34,7 @@ except ImportError:
class PickledRedis(StrictRedis): class PickledRedis(StrictRedis):
""" """
A subclass of StricRedis that uses the pickle module to store and load A subclass of StrictRedis that uses the pickle module to store and load
representations of the provided values. representations of the provided values.
""" """
def get(self, name): def get(self, name):

View file

@ -148,7 +148,7 @@ DEFAULT_VARS_PLUGIN_PATH = get_config(p, DEFAULTS, 'vars_plugins', '
DEFAULT_FILTER_PLUGIN_PATH = get_config(p, DEFAULTS, 'filter_plugins', 'ANSIBLE_FILTER_PLUGINS', '/usr/share/ansible_plugins/filter_plugins') DEFAULT_FILTER_PLUGIN_PATH = get_config(p, DEFAULTS, 'filter_plugins', 'ANSIBLE_FILTER_PLUGINS', '/usr/share/ansible_plugins/filter_plugins')
DEFAULT_LOG_PATH = shell_expand_path(get_config(p, DEFAULTS, 'log_path', 'ANSIBLE_LOG_PATH', '')) DEFAULT_LOG_PATH = shell_expand_path(get_config(p, DEFAULTS, 'log_path', 'ANSIBLE_LOG_PATH', ''))
CACHE_PLUGIN = get_config(p, DEFAULTS, 'cache_plugin', 'ANSIBLE_CACHE_PLUGIN', 'memory') CACHE_PLUGIN = get_config(p, DEFAULTS, 'fact_caching', 'ANSIBLE_CACHE_PLUGIN', 'memory')
CACHE_PLUGIN_CONNECTION = get_config(p, DEFAULTS, 'cache_plugin_connection', 'ANSIBLE_CACHE_PLUGIN_CONNECTION', None) CACHE_PLUGIN_CONNECTION = get_config(p, DEFAULTS, 'cache_plugin_connection', 'ANSIBLE_CACHE_PLUGIN_CONNECTION', None)
CACHE_PLUGIN_PREFIX = get_config(p, DEFAULTS, 'cache_plugin_prefix', 'ANSIBLE_CACHE_PLUGIN_PREFIX', 'ansible_facts') CACHE_PLUGIN_PREFIX = get_config(p, DEFAULTS, 'cache_plugin_prefix', 'ANSIBLE_CACHE_PLUGIN_PREFIX', 'ansible_facts')
CACHE_PLUGIN_TIMEOUT = get_config(p, DEFAULTS, 'cache_plugin_timeout', 'ANSIBLE_CACHE_PLUGIN_TIMEOUT', (60 * 60 * 24), integer=True) CACHE_PLUGIN_TIMEOUT = get_config(p, DEFAULTS, 'cache_plugin_timeout', 'ANSIBLE_CACHE_PLUGIN_TIMEOUT', (60 * 60 * 24), integer=True)

View file

@ -697,10 +697,14 @@ class TestUtils(unittest.TestCase):
) )
# invalid quote detection # invalid quote detection
try:
with self.assertRaises(Exception): with self.assertRaises(Exception):
split_args('hey I started a quote"') split_args('hey I started a quote"')
with self.assertRaises(Exception): with self.assertRaises(Exception):
split_args('hey I started a\' quote') split_args('hey I started a\' quote')
except TypeError:
# you must be on Python 2.6 still, FIXME
pass
# jinja2 loop blocks with lots of complexity # jinja2 loop blocks with lots of complexity
_test_combo( _test_combo(