Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
2629cd3f
Commit
2629cd3f
authored
Aug 11, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some copyrights, fix a misc test.
parent
533fb215
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
8 deletions
+21
-8
examples/ansible.cfg
+7
-0
lib/ansible/cache/file.py
+2
-1
lib/ansible/cache/memcached.py
+2
-1
lib/ansible/cache/memory.py
+1
-2
lib/ansible/cache/redis.py
+4
-3
lib/ansible/constants.py
+1
-1
test/units/TestUtils.py
+4
-0
No files found.
examples/ansible.cfg
View file @
2629cd3f
...
...
@@ -132,6 +132,13 @@ filter_plugins = /usr/share/ansible_plugins/filter_plugins
# avoid issues.
#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]
# uncomment this line to cause the paramiko connection plugin to not record new host
...
...
lib/ansible/cache/file.py
View file @
2629cd3f
# (c) 2014,
Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2014,
Brian Coca, Josh Drake, et al
#
# This file is part of Ansible
#
...
...
@@ -14,6 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
from
__future__
import
absolute_import
import
collections
...
...
lib/ansible/cache/memcached.py
View file @
2629cd3f
# (c) 2014,
Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2014,
Brian Coca, Josh Drake, et al
#
# This file is part of Ansible
#
...
...
@@ -14,6 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
import
collections
import
os
import
sys
...
...
lib/ansible/cache/memory.py
View file @
2629cd3f
# (c) 2014,
Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2014,
Brian Coca, Josh Drake, et al
#
# This file is part of Ansible
#
...
...
@@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
class
CacheModule
(
object
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
lib/ansible/cache/redis.py
View file @
2629cd3f
# (c) 2014,
Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2014,
Brian Coca, Josh Drake, et al
#
# This file is part of Ansible
#
...
...
@@ -14,9 +14,10 @@
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
from
__future__
import
absolute_import
from
__future__
import
absolute_import
import
collections
# FIXME: can we store these as something else before we ship it?
import
cPickle
import
sys
import
time
...
...
@@ -33,7 +34,7 @@ except ImportError:
class
PickledRedis
(
StrictRedis
):
"""
A subclass of StricRedis that uses the pickle module to store and load
A subclass of Stric
t
Redis that uses the pickle module to store and load
representations of the provided values.
"""
def
get
(
self
,
name
):
...
...
lib/ansible/constants.py
View file @
2629cd3f
...
...
@@ -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_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_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
)
...
...
test/units/TestUtils.py
View file @
2629cd3f
...
...
@@ -697,10 +697,14 @@ class TestUtils(unittest.TestCase):
)
# invalid quote detection
try
:
with
self
.
assertRaises
(
Exception
):
split_args
(
'hey I started a quote"'
)
with
self
.
assertRaises
(
Exception
):
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
_test_combo
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment