Human readable logs should be removed

Whle the human readable logging functionality is nice for debug purposes
it has little to no value in general deployments and in slows Ansible
runs down considerably. In my opinion, this plugin should be removed.
If this is a desirable feature for an individual deployer they can pull
the plugin into their stack outside of OSA.

Change-Id: Ie07eefe8ffe2036815bc89d129862f105b9ff566
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2016-09-21 11:49:12 -05:00
parent 5e0fd583f1
commit f25bf23558
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F
1 changed files with 0 additions and 55 deletions

View File

@ -1,55 +0,0 @@
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
from distutils.version import LooseVersion
from ansible import __version__ as __ansible_version__
import requests
# This appends the sys path with the file path which is used for the
# import of the specific verion of the config_template action plugin
# needed based on the ansible version calling the plugin.
DIRPATH = os.path.dirname(__file__)
# NOTICE: These plugins are developed outside of OSA and can not be
# added to the main repository due to GPL conflicts in OpenStack.
PLUGINS = {
'v1': 'https://gist.githubusercontent.com/cliffano/9868180/raw/'
'f32b76560b7c72cdc44e6aa0e9f46d0392f54a43/human_log.py',
'v2': 'https://raw.githubusercontent.com/rdo-infra/weirdo/master/'
'playbooks/library/human_log.py'
}
if DIRPATH not in sys.path:
sys.path.append(DIRPATH)
def get_plugin(plugin, name):
req = requests.get(plugin, stream=True)
if req.status_code == 200:
with open(os.path.join(DIRPATH, name), 'wb') as f:
for chunk in req.iter_content(1024):
f.write(chunk)
return True
else:
return False
if LooseVersion(__ansible_version__) < LooseVersion("2.0"):
if get_plugin(plugin=PLUGINS['v1'], name='_v1_human_log.py'):
from _v1_human_log import *
else:
if get_plugin(plugin=PLUGINS['v2'], name='_v2_human_log.py'):
from _v2_human_log import *