Remove the notion of ANSIBLE_LIBRARY from setup and docs

The "modules" directory from plugins had already been removed.
This is no longer required since Ansible made it optional to have
a module for an action plugin [1].

[1]: https://github.com/ansible/ansible/pull/18208

Change-Id: Idd75ece28d10e1ec81c1752e599fd5d8d2826198
This commit is contained in:
David Moreau Simard 2018-11-28 11:17:13 -05:00
parent 9ae86fbaa5
commit d767884bdf
No known key found for this signature in database
GPG Key ID: CBEB466764A9E621
6 changed files with 4 additions and 37 deletions

View File

@ -22,4 +22,3 @@ path = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
action_plugins = os.path.abspath(os.path.join(path, 'plugins/actions'))
callback_plugins = os.path.abspath(os.path.join(path, 'plugins/callbacks'))
library = os.path.abspath(os.path.join(path, 'plugins/modules'))

View File

@ -16,14 +16,13 @@
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
from . import callback_plugins, action_plugins, library
from . import callback_plugins, action_plugins
config = """
[defaults]
callback_plugins={}
action_plugins={}
library={}
""".format(callback_plugins, action_plugins, library)
""".format(callback_plugins, action_plugins)
if __name__ == "__main__":
print(config.strip())

View File

@ -16,15 +16,14 @@
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
from . import callback_plugins, action_plugins, library
from . import callback_plugins, action_plugins
import os
from distutils.sysconfig import get_python_lib
exports = """
export ANSIBLE_CALLBACK_PLUGINS={}
export ANSIBLE_ACTION_PLUGINS={}
export ANSIBLE_LIBRARY={}
""".format(callback_plugins, action_plugins, library)
""".format(callback_plugins, action_plugins)
if 'VIRTUAL_ENV' in os.environ:
""" PYTHONPATH may be exported when 'ara' module is installed in a

View File

@ -1,22 +0,0 @@
# Copyright (c) 2018 Red Hat, Inc.
#
# This file is part of ARA Records Ansible.
#
# ARA 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.
#
# ARA 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 ARA. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
from . import library
if __name__ == "__main__":
print(library)

View File

@ -32,9 +32,6 @@ They can be used like so::
$ python -m ara.setup.callback_plugins
/usr/lib/python2.7/site-packages/ara/plugins/callbacks
$ python -m ara.setup.library
/usr/lib/python2.7/site-packages/ara/plugins/modules
Using ansible.cfg
~~~~~~~~~~~~~~~~~
@ -45,14 +42,12 @@ the appropriate locations::
[defaults]
callback_plugins=/usr/lib/python2.7/site-packages/ara/plugins/callbacks
action_plugins=/usr/lib/python2.7/site-packages/ara/plugins/actions
library=/usr/lib/python2.7/site-packages/ara/plugins/modules
Or alternatively, if you have a customized `ansible.cfg`_ file, you can retrieve
only what you need using the other helpers such as the following:
- ``python -m ara.setup.callback_plugins``
- ``python -m ara.setup.action_plugins``
- ``python -m ara.setup.library``
.. _ansible.cfg: https://docs.ansible.com/ansible/intro_configuration.html#configuration-file
@ -67,7 +62,6 @@ ARA provides a helper module that prints out the necessary export commands::
$ python -m ara.setup.env
export ANSIBLE_CALLBACK_PLUGINS=/usr/lib/python2.7/site-packages/ara/plugins/callbacks
export ANSIBLE_ACTION_PLUGINS=/usr/lib/python2.7/site-packages/ara/plugins/actions
export ANSIBLE_LIBRARY=/usr/lib/python2.7/site-packages/ara/plugins/modules
Note that the module doesn't actually run those exports, you'll want to run them
yourself, add them in a bash script or a bashrc, etc.

View File

@ -112,14 +112,12 @@ fi
echo "python -m ara.setup.path: $(python -m ara.setup.path)"
echo "python -m ara.setup.callback_plugins: $(python -m ara.setup.callback_plugins)"
echo "python -m ara.setup.action_plugins: $(python -m ara.setup.action_plugins)"
echo "python -m ara.setup.library: $(python -m ara.setup.library)"
echo "python -m ara.setup.env: $(python -m ara.setup.env)"
echo "python -m ara.setup.ansible: $(python -m ara.setup.ansible)"
# Setup ARA
export ANSIBLE_CALLBACK_PLUGINS="$(python -m ara.setup.callback_plugins)"
export ANSIBLE_ACTION_PLUGINS="$(python -m ara.setup.action_plugins)"
export ANSIBLE_LIBRARY="$(python -m ara.setup.library)"
export ARA_DATABASE="${DATABASE}"
# Run linters