Commit Graph

323 Commits (46956f0273c9a9775ed1adcaf62790f11037ed72)

Author SHA1 Message Date
Alvaro Aleman bb9c6694a7 Allow the Openstack dynamic inventory to discover ansible_user (#17944) 7 years ago
Gerard Lynch d9d983160d support OS_CLOUD in openstack dynamic inventory
allow a user to limit to a single cloud in clouds.yaml, and support
per-cloud caching.
7 years ago
Alvaro Aleman fe5e1a4bc4 OS dynamic inventory: respect OS_CLOUD env var 7 years ago
Do Hoang Khiem 3b12a85750 Add node private & public ips to gce groups (#12539) 7 years ago
Sebastian Cruz 223f94ec56 Fix missing option in #27848 (#27892) 7 years ago
Sebastian Cruz ce5e4dfc38 Add option to group ec2 instances by platform. (#27848)
All credits to https://github.com/felipecvo

See PR: https://github.com/ansible/ansible/pull/14246
7 years ago
Eric L 1fe14da226 Add possibility to interpret global parameters value as JSON with rich_params flag (#26180) 7 years ago
Adam Johnson 3f85aa3abd Use a real list comprehension rather than list() around a generator (#25594)
It's faster and more idiomatic.
7 years ago
Tian You 9364fa202f [cloud] Group RDS instances by tag keys in ec2 dynamic inventory (#24763) 7 years ago
jctanner 3b20585ada Fix 23417 (#27770)
* Expose user_metadat to ansible

* Fixed exception when no userData
7 years ago
Will Weber bfbdb3f3f0 assumption made that dopy only dep in dopy (#27536) 7 years ago
Nick Ball edf31f56af Linode inventory improvements: Add _meta/hostvars to inventory output. Add a 'linode' host group with all the hosts (#19329) 7 years ago
Toshio Kuratomi 225fa5d092 Fix undefined variables, basestring usage, and some associated python3 issues 7 years ago
Brian Coca 8f8e53acbe updated readme with vault and 2.4 inv plugins (#26361)
* updated readme with vault and 2.4 inv plugins

* fixed as per feedback

* Edits

Need clarification for lines 10 and 11.
7 years ago
Toshio Kuratomi edccfd5908 Fix undefined variable in libcloud dyn inv script
References #27193
7 years ago
Greg Dahlman 1d8854b045 Python 3 fix for consul_io inventory (#26510)
* Python 3 fix for consul_io inventory

* Remove configparser CamelCase try statement

* revert to python2.6 compatible try;except

* Fix pip8 error E302
7 years ago
Tomáš Karásek a5c41dcd49 Add grouping by hostname for the Packet inventory (#21069)
* Add grouping by hostname for the Packet inventory

* remove space after eol
7 years ago
Abhijeet Kasurde f7c8e7bdab Update vmware_inventory (#26308)
Fix adds
* Exception handling
* Unit tests

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Josh Smift 290d84f904 Update ansible_ssh_host->ansible_host in ec2.py dynamic inventory (#17113) 7 years ago
Toshio Kuratomi ff22528b07 Consolidate boolean/mk_boolean conversion functions into a single location
Consolidate the module_utils, constants, and config functions that
convert values into booleans into a single function in module_utils.

Port code to use the module_utils.validate.convert_bool.boolean function
isntead of mk_boolean.
7 years ago
Alejandro Bednarik 2420bca0b5 Add GPl License header to rackhd inventory file. (#24354) 7 years ago
Ryan S. Brown 7cee903118 [cluster] Name Consul dynamic inventory config consistently w/ the script 7 years ago
Brian Coca 365f3dc9d9 switched to elif 7 years ago
Lorin Hochstein b17da1fae9 ec2.py: Better error messages for OptInRequired
Improve error messages for RDS and ElastiCache failures for code OptInRequired.
7 years ago
Matt Clay 2e85272cd5 PEP 8 fixes. 7 years ago
Ronny 955f8923e7 Update dynamic inventory zabbix.py (#19862)
Added _meta to improve the speed when using this dynamic inventory file
7 years ago
Toshio Kuratomi e238ae999b Cyptography pr 20566 rebase (#25560)
Make pyca/cryptography the preferred backend for cryptographic needs (mainly vault) falling back to pycrypto

pyca/cryptography is already implicitly a dependency in many cases
through paramiko (2.0+) as well as the new openssl_publickey module,
which requires pyOpenSSL 16.0+. Additionally, pyca/cryptography is
an optional dep for better performance with vault already.

This commit leverages cryptography's padding, constant time comparisons,
and CBC/CTR modes to reduce the amount of code ansible needs to
maintain.

* Handle wrong password given for VaultAES format

* Do not display deprecation warning for cryptography on python-2.6

* Namespace all of the pycrypto imports and always import them

  Makes unittests better and the code less likely to get stupid mistakes
  (like using HMAC from cryptogrpahy when the one from pycrypto is needed)

* Add back in atfork since we need pycrypto to reinitialize its RNG just in case we're being used with old paramiko

* contrib/inventory/gce: Remove spurious require on pycrypto

(cherry picked from commit 9e16b9db275263b3ea8d1b124966fdebfc9ab271)

* Add cryptography to ec2_win_password module requirements
  * Fix python3 bug which would pass text strings to a function which
    requires byte strings.

* Attempt to add pycrypto version to setup deps

* Change hacking README for dual pycrypto/cryptography

* update dependencies for various CI scripts

* additional CI dockerfile/script updates

* add paramiko to the windows and sanity requirement set

  This is needed because ansible lists it as a requirement. Previously
  the missing dep wasn't enforced, but cryptography imports pkg_resources
  so you can't ignore a requirement any more

* Add integration test cases for old vault and for wrong passwords

* helper script for manual testing of pycrypto/cryptography

* Skip the pycrypto tests so that users without it installed can still run the unittests

* Run unittests for vault with both cryptography and pycrypto backend
7 years ago
loqutus 8edcef7a84 fix comment in inventory/digital_ocean.py (#25828) 7 years ago
Abhijeet Kasurde b89cb95609 Fix spelling mistakes (comments only) (#25564)
Original Author : klemens <ka7@github.com>

Taking over previous PR as per
https://github.com/ansible/ansible/pull/23644#issuecomment-307334525

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Carsten Clasohm cd31f4a102 foreman.py: create Ansible groups from Satellite 6 host collections (#25269)
* create Ansible groups from host collections

* fix paging logic in _get_json

* replace Satellite with Foreman

* improve comment for environment variables

* enable host collections by default

* use requests params instead of urllib.quote_plus

* disable host collections by default

* change organization filter

* clean up load_cache methods

* remove usage of function defaults

* replace environment variables with host_filters
7 years ago
James Elford bc9dbf38b0 python 3 compatibility: import guard around ConfigParser
In python3 `ConfigParser` has become `configparser`. Added
an import guard that aliases it back to the old name.
7 years ago
Eric L eb53f3c129 Fix inventory script for Foreman where group by pattern are not prope… (#25173)
* Fix inventory script for Foreman where group by pattern are not properly safe-guarded.

* Fix pep8 error about tab mixed with blanks.
7 years ago
Sloane Hertel e67cdd448e [cloud] EC2 dynamic inventory default filename is documented as ec2.ini - fixes #24396 (#24515)
* the default filename is ec2.ini

(to override that use the env var EC2_INI_PATH)

* allow fallback to ec2.ini
7 years ago
Dag Wieers 758cfeb73e contrib: PEP8 compliancy (#24680)
- Make PEP8 compliant
7 years ago
Abhijeet Kasurde 3a82246d82 Misc typo fix in fleet inventory (#25174)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Michael b65ebf3519 Fixed import of urlencode and pathname2url from urllib for python3 (#24424) 7 years ago
Jorge Quintás d3c94e82a5 take into account if cache file exists when loading data from digitalocean even with --force-cache 7 years ago
Matt Martz d3249e7875 pep8 fixes for contrib (#24344) 7 years ago
Elijah Lynn c7ae6b9fd5 [cloud][inventory] Get tags for RDS instances. (#23989)
* Get tags for RDS instances.

Boto3 only at this time.

Relates to #11569, #14464.

* Add a check for boto3

* Fix HAS_BOTO3 error
7 years ago
Ondra Machacek 2c58ac1833 inventory: ovirt4: Add support for devices without IP (#24287) 7 years ago
Tom Melendez 9d5c399313 Added subnetwork parameter to inventory instance dictionary. (#23984) 7 years ago
Matt Clay 48eeab8a53 Fix errors reported by pylint. (#23282)
* Fix pylint misplaced-bare-raise errors.
* Fix pylint return-in-init error.
* Fix pylint bad-format-character error.
* Fix pylint too-many-format-args errors.
* Fix pylint too-few-format-args errors.
* Fix pylint truncated-format-string error.
7 years ago
Toshio Kuratomi 6bad4e57bd Migrate most uses of if type() to if isinstance()
Also convert those checks to use abcs instead of dict and list.

Make a sentinel class for strategies to report when they've reache the end
7 years ago
Wayne Witzel III 1a1e12cf46 fetch spacewalk.ini from the environment if set 7 years ago
Tim Rupp 2d8c5e6b8f [openstack] Adds the non-deprecated ansible_host var (#23153)
OpenStack dynamic inventory is still using the deprecated
ansible_ssh_host. This patch adds ansible_host until such
time as ansible_ssh_host is removed
7 years ago
rafstef 25019fe70c Fix vmware property filter (#23228)
Fixes errors on properties that do not exist.
7 years ago
Matt Martz 495a1340a6 Address lxd inventory pep8 error (#23021) 7 years ago
Francisco Ros 0fa797030e Brook inventory (#16122)
* Do not ask for templates in Brook inventory if they do not exist

* Add availability zone variable to Brook inventory

* Add provider id variable to Brook inventory

* Error output sent to stderr in Brook inventory
7 years ago
Andrew Clarke 73438de862 A basic lxd dynamic inventory script (#15848)
* A basic start on an lxd dynamic inventory script

The script is a fairly basic start on an lxd dynamic inventory script. Only tested on ubuntu 16.04 and currently only reports ipv4 container addresses. Improvements to come.

* Updated formatting, indenting and python3 support

Updated to work on python3

* Additional options read from the ini file

Added options for connection and group to the ini file and modified to use these.

Host returned is now the name by default. For non-lxd connection, the ansible_host var is populated with the ip address.

* Additional options for group and connection

* Minor change to re-run tests
7 years ago
Toshio Kuratomi 2fff690caa Update module_utils.six to latest (#22855)
* Update module_utils.six to latest

We've been held back on the version of six we could use on the module
side to 1.4.x because of python-2.4 compatibility.  Now that our minimum
is Python-2.6, we can update to the latest version of six in
module_utils and get rid of the second copy in lib/ansible/compat.
7 years ago