fixes to config/setting retrieval

- better variable precedence management
- universal plugin option handling
- also updated comments for future directions
- leverage fragments for plugins
- removed fact namespacing
- added 'firendly name' field
- updated missing descriptions
- removed some unused yaml entries, updated others to reflect possible future
- documented more plugins
- allow reading docs using alias
- short licenses
- corrected args for 'all plugins'
- fixed -a option for ansible-doc
- updated vars plugins to allow docs
- fixed 'gathering'
- only set options IF connection
- added path list and renamed pathspec mostly the diff is , vs : as separator
- readded removed config entries that were deprecated but had no message ... and deprecated again
- now deprecated entries give warning when set
This commit is contained in:
Brian Coca 2017-08-20 11:20:30 -04:00 committed by Toshio Kuratomi
parent f88750d665
commit 075ead8fb0
70 changed files with 1862 additions and 1292 deletions

View file

@ -1,18 +1,41 @@
# Ansible CallBack module for Jabber (XMPP)
# Copyright (C) 2016 maxn nikolaev.makc@gmail.com
#
# This module 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.
#
# This program 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 this program. If not, see http://www.gnu.org/licenses/
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
'''
DOCUMENTATION:
callback: jabber
type: notification
short_description: post task events to a jabber server
description:
- The chatty part of ChatOps with a Hipchat server as a target
- This callback plugin sends status updates to a HipChat channel during playbook execution.
version_added: "2.2"
requirements:
- xmpp (python lib https://github.com/ArchipelProject/xmpppy)
options:
server:
description: connection info to jabber server
required: True
env:
- name: JABBER_SERV
user:
description: Jabber user to authenticate as
required: True
env:
- name: JABBER_USER
password:
description: Password for the user to the jabber server
required: True
env:
- name: JABBER_PASS
to:
description: chat identifier that will recieve the message
required: True
env:
- name: JABBER_TO
'''
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
@ -48,9 +71,9 @@ class CallbackModule(CallbackBase):
self.j_pass = os.getenv('JABBER_PASS')
self.j_to = os.getenv('JABBER_TO')
if (self.j_user or self.j_pass or self.serv) is None:
if (self.j_user or self.j_pass or self.serv or self.j_to) is None:
self.disabled = True
self._display.warning('Jabber CallBack want JABBER_USER and JABBER_PASS env variables')
self._display.warning('Jabber CallBack wants the JABBER_SERV, JABBER_USER, JABBER_PASS and JABBER_TO environment variables')
def send_msg(self, msg):
"""Send message"""