Commit Graph

249 Commits (18d605a132a9d72802bb51000486d05278a729b7)

Author SHA1 Message Date
Alex Ratner c2feab0606 fix plugin-to-doc naming mismatch, typos, grammar (#36366) 7 years ago
Dag Wieers 07e8fb5dbb
Windows: Clean up documentation (#36684)
This PR includes:
- Further cleanup of BOTMETA.yml
- Cleanup of author github handles
- Use of proper booleans
- One-line license statement
- Copyright format statement
- Smaller cleanups
7 years ago
mikedlr 52f2057472 aws ssm parameter lookup - change to return Nones for missing variables (#36456)
* aws ssm parameter lookup - change to return Nones for missing variables

* aws ssm parameter lookup - fix error case message to dump response

* aws ssm parameter lookup - fix integration test cases
7 years ago
Henri Salo b34ab6a0c4 hashi_vault: fix typo (#36368) 7 years ago
Chris Houseknecht 69be2c169f
Upgrade to openshift client 0.4.0 (#35127) 7 years ago
John R Barker e4c04aa0f3
Fix YAML issue (#36103) 7 years ago
Nick Wilde aa09ed1a88 Fix typo in examples in Lookup/password plugin. (#35022) 7 years ago
Toshio Kuratomi 03c73e2bbb Rename var lookup to vars and add tests 7 years ago
Toshio Kuratomi db29190c28 Allow var lookup plugin to operate on a list of terms
Not sure this has a good use case but it's how nearly all other lookups
work so we should support the common interface.
7 years ago
Toshio Kuratomi 59faad3a6b Fix var lookup plugin to return a list 7 years ago
Pilou a7461179cf Fix lookup plugins documentation (nios, conjur_variable) (#35847)
* conjur_variable lookup plugin doc: fix YAML
* nios lookup plugin doc: fix a typo
7 years ago
mikedlr d31ded47fb Aws ssm multiple fixes (#35569)
* aws ssm parameter lookup test case - fails demonstrating no exception when parameter missing

* aws ssm parameter lookup - fail in case parameter doesn't exist

* aws ssm parameter lookup test case - failing case for nice return from path lookup

* aws ssm parameter lookup - convert incoming taglist to a key-value dictionary

* aws ssm parameter lookup - pep8 / style clean up

* aws_ssm lookup plugin rewrite for more standard interface

* aws_ssm module and lookup - introduce integration test and fix:

* aws_ssm module and lookup - error case integraton test and many PEP8 and other cleanups

* aws ssm parameter lookup - Various fixes in response to review + recursive fix & test

* aws ssm parameter lookup - more in response to review - shertel/abadger

* aws ssm parameter lookup unit test - move to mocker according to abadger

* aws ssm parameter lookup - integrate with new documentation fragment

* aws ssm parameter lookup - accept either aws_profile or boto_profile

* aws ssm parameter lookup - eliminate lookup document fragment until env vars are fixed later
7 years ago
Sloane Hertel fd72e4aef2
Make an aws_credentials documentation fragment for plugins using environment vars (#35578) 7 years ago
Peter Sprygada c2d3b9cbd5
refactors nios api shared code to handle provider better (#35393)
* refactors nios api shared code to handle provider better

This change refactors the shared code to be easily shared between
modules, plugins and dynamic inventory scripts.  All parts now implement
the provider arguments uniformly.

This also provides a centralized fix to suppress urllib3 warnings coming
from the requests library implemented by infoblox_client

* fix up pep8 errors

* fix missing var name
7 years ago
Peter Sprygada f849dc9cad
add extattrs as an option when using nios lookup (#35371) 7 years ago
Peter Sprygada 21169b2228 adds two new infoblox lookup plugins (#35189)
* adds two new infoblox lookup plugins

* nios - lookup plugin to return nios objects to the playbook
* nios_next_ip - lookup plugin to return the next avaiable ip address

* adds some additional examples to nios lookup

* fix up pep8 failures

* updates in response to review comments
7 years ago
Sloane Hertel ff2ad89081
Fix aws_account_attribute lookup credentials bug for access keys (#35242) 7 years ago
Dustin Spicuzza b2dcc9c587 Better error message when file lookup fails (#30894)
* Alert user which debug level will show them useful details
7 years ago
tomo ef6b478d2a add rstrip and lstrip bool flags to file lookup plugin (#31738) 7 years ago
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
7 years ago
Chris Houseknecht 6a75c1a138
Fix name param. Remove logging. (#34881) 7 years ago
Matt Clay 797664d9cb Python 2.6 `str.format()` compatibility fixes. 7 years ago
Ryan Brown 2f66755849 New Lookup Plugin: aws_service_ip_ranges (#32749)
* added ranges lookup

* Add docs

* Use `open_url` from module_utils

* Fix error handling on open_url

* Fix ConnectionError exception import
7 years ago
Matt Martz df909c5726
Fix with_items debug loop example. Fixes #34540 (#34578) 7 years ago
Chris Houseknecht 85ff38d2e2
K8s lookup plugin (#34025)
* Use OpenShift client

* Refactored

* Fix lint issues

* Replace AnsibleError to make the bot happy

* Remove extra space
7 years ago
Jeffrey Zhang e045f46132 Fix doc for with_first_found
the variables in with_first_found should be list rather than dict
7 years ago
Elad Alfassa 1c157a8cf1 Fix env lookup plugin docs (#34235)
The env lookup plugin docs mistakenly mentioned dns TXT records,
and that it requires a DNS resolver library.
7 years ago
John R Barker c50da48049
Fix various RST warnings (#34084)
* Fix various RST warnings

* shorter lines
7 years ago
Brian Coca 2db3d861e0 lookup templated value of a var (#32772)
* lookup templated value of a var
* better dupe loop detection
* corrected invalid test loops
7 years ago
Sloane Hertel 58adf1750e [cloud] New a lookup plugin for AWS account attributes (#33025)
* Add a lookup plugin for AWS account attributes

* PEP8

* Use config system instead of hard coding logic for environment variables

* simplify logic

* Return a flattened dict to make using easier

* Reformat return example
7 years ago
Gaël Lambert 82949f6e6f lookup hashi_vault: Add Vault App role in auth_method (#22403)
Provide Vault App role method to the lookup.

https://www.vaultproject.io/docs/auth/approle.html

Usage :

`{{ lookup('hashi_vault', 'secret=secret/hello:value auth_method=approle role_id=myroleid secret_id=mysecretid url=http://myvault:8200')}}`

You can skip `role_id` and `secret_id` if you set `VAULT_ROLE_ID` and `VAULT_SECRET_ID` environment variables.
7 years ago
Brian Coca 11063dabaf fixed version_added, update clog 7 years ago
Brian Coca 1a7c096954
new redis lookup (#33883)
* new redis lookup

deprecated redis_kv

* typo fix
7 years ago
John R Barker 4d67cdd1f7
Use module formatting (#33413) 7 years ago
Brian Coca 22d983c5c1
get_option instead of internal dict (#33191)
* get_option instead of internal dict

* fix slack issue

* not a pugin, revert get_option
7 years ago
Benjamin Schweizer e4300e8d54 fixed syntax error (#33185) 7 years ago
Brian Coca 6bca5e5a4a
add lookups to config system (#33026)
* add lookups to config system

use etcd as proof of concept

* some doc updates
7 years ago
Brian Coca b70e48a54d fixed issues with lookup url docs 7 years ago
Matt Martz 99d4f5bab4 Remove uses of assert in production code (#32079)
* Remove uses of assert in production code

* Fix assertion

* Add code smell test for assertions, currently limited to lib/ansible

* Fix assertion

* Add docs for no-assert

* Remove new assert from enos

* Fix assert in module_utils.connection
7 years ago
Trentr9 5625720c64 Fix typo in documentation (#32821) 7 years ago
Sloane Hertel 33a704cc61 Add documentation for the aws_ssm lookup plugin. (#32763) 7 years ago
Kenneth D. Evensen 4eccb447cf Lookup plugin for the OpenShift Container Platform. 7 years ago
Brian Coca 0f7fcd2b40
config lookup plugin (#32392)
* config lookup plugin

* added info about ansible-config list

* fixed typoes

* now with option and error handling

* fixed import, better docs
7 years ago
Brian Coca e70c0afc5e now with_dict allows for direct 'lookup' usage
fixes #32067
7 years ago
Sam Doran 6a6ea663ea Return all elements in a more robust way
If a trailing ':' is set or not, always return all secrets from a path. This was a bug mostly fixed by this PR.

Update examples.
7 years ago
igor-pinchuk 6b6746dcee Update hashi_vault.py
Add ability to lookup entire objects in HashiCorp Vault.
When used with auth_method allow skipping SSL verify.
7 years ago
John R Barker 0e36854213 consul_kv: Fix name & formatting (#32132)
* Fix name & formatting
* Fix examples
7 years ago
Brian Coca fd574c069e remove fixme from docs 7 years ago
Marat Bakeev f84b5b6059 Update ssm lookup to support getting parameters by path (#31752) 7 years ago
Ryan Brown e0c2b6bbb4 Rename ssm_parameter_store module and ssm lookup to be prefixed with aws (#31662) 7 years ago