ansible/test/units/plugins
Jason Vanderhoof 7c8e365dff Conjur Lookup Plugin (#34280)
* Imported lookup plugin from Role

* Plugin cleanup, including:
* Use existing Python YAML parsing
* Remove environment variables as connection options
* Added initial debugging information

* Reworked the lookup plugin using the Python Request library.  As it's available through Ansible, it makes communication with Conjur much more straight forward.

* Removed un-used libraries

* Fixed linting issues

* Standardized output on `format` and insure it works for 2.6, 2.7, and 3.x.

* Use quote_plus from the six library for improved python 2/3 behavior.

* Refactored identity & configuration to prefer user's file. This also includes a refactor to remove an un-needed dictionary merge method.

* Removed `requests` in favor of `ansible.module_utils.urls`.

* Refactored netrc loading to warn if host is not present.

* Tests and a refactor to support easier testing.

* Added reference to website

* Fixed two linting errors

* Fixed an extra line found by linting

* Updated file write to use binary to insure config files are written correctly

* Resolved linting issues

* Refactored config & identity loading to take advantage of plugin options

* Cleanup a bunch of small items caught by linting

* Removed extra line caught by linting

* Swapped in pytest and added some tests with mocked network responses

* Pushing to see if this approach works better...

* Refactored be open_url mocking based on feedback

* Fixed a couple linting issues & refactored mocking into each method to attempt to resolve a failing test

* Use a generic MagicMock for python 2.6

* Fixes doc typo

require -> required

* Use `type: path` in identity_file and config_file

Also removes `expanduser` calls below (which will now be called automatically on
paths.)

* Defines maintainers for conjur_variable plugin

* BOTMETA.yml:
** defines $team_cyberark_conjur as maintainers of Conjur Variable plugin
** adds myself and @jvanderhoof to that team

* Adds URLs to relevant documentation for Conjur Variable lookup plugin

* Clarifies "the server," "the machine" -> "controlling host"

The machine identity used is that of the Ansible controlling host, not any
server being provisioned or instructed. This documentation change aims to make
that relationship clear.

* Adds response code to exception message on authentication failure

* Enhances exception messages to specify the controlling host

These error messages are less likely to confuse a user as to which machine is
associated with the files, identities, and configurations being described.

* Adds ANSIBLE_METADATA for Conjur variable lookup plugin
2018-01-23 10:04:57 -06:00
..
action Set the tempdir on the shell mock object so that it is json serializable 2018-01-22 23:36:34 -08:00
cache Disable abstract-class-instantiated for smoketests 2017-07-25 15:58:23 -07:00
callback Use pop in cb clean results (#33779) 2017-12-11 17:41:12 -05:00
connection Ensure that the become password is written on py3 in the ssh connection plugin. Fixes #34727 2018-01-18 09:32:22 -08:00
filter Rekey on member (#33836) 2017-12-12 19:02:15 -08:00
inventory [cloud] New inventory plugin: aws_ec2 (#34416) 2018-01-22 18:49:57 -05:00
loader_fixtures Don't cache duplicate plugin names (#34420) 2018-01-04 16:47:23 -06:00
lookup Conjur Lookup Plugin (#34280) 2018-01-23 10:04:57 -06:00
shell Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
strategy Cache tasks as they are queued instead of en masse (#34752) 2018-01-15 09:49:58 -06:00
vars Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
test_plugins.py Don't cache duplicate plugin names (#34420) 2018-01-04 16:47:23 -06:00