summaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAgeFilesLines
* docker: fix sanity errors (#60047)Felix Fontein2019-08-091-1/+5
| | | | | | | | | | * Remove sanity check errors. * More linting. * Forgot to update places. * Remove choices which aren't provided in argspec.
* vmware_inventory: do not ignore validate_certsGonéri Le Bouder2019-07-261-1/+13
| | | | | | Python 2.7.9 < does not have the `ssl.SSLContext` attribute. If `validate_certs` is `True`, we cannot validate the SSL connection, and we need to raise an error.
* Typo fixes (#59227)Abhijeet Kasurde2019-07-191-1/+1
| | | Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Update contrib script documentation (#58883)Sloane Hertel2019-07-101-1/+1
| | | * Update contrib script documentation - new inventory solutions should be plugins, not scripts
* VMware: rename VMWare to VMware (#58535)Gonéri Le Bouder2019-06-301-1/+1
| | | Follow the nomenclature convention decided in https://github.com/ansible/ansible/pull/56814
* Fix ec2.py dynamic inventory script when pulling down RDS cluster ↵lju2019-06-251-9/+10
| | | | | | | | information (#48075) * Fixes #26481 * Pass lint tests
* VMware: Python3 migrations for vmware_inventory.py (#47538)Rowin Andruscavage2019-06-251-6/+6
| | | | | | | | | * Sort and pretty print json output and cache file * Enable Python3 test for vmware_inventory.py Fixes: #46727 Signed-off-by: Rowin Andruscavage <8740187+MTN-RowinAndruscavage@users.noreply.github.com> Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Add Python 3 support to ovirt4 inventory script. (#57824)Ryan Kraus2019-06-211-3/+3
| | | | | | | Python 3 only allows strings through the config parser. This is fine for the URL, Username, and Password since these values are required. The CA File is optional so an empty string is used in leiu of None in the config dictionary.
* Update vagrant.py (#56568)Arnaud2019-05-201-1/+1
| | | `inventory_file` has been renamed to `inventory_path`.
* Renamed SafeConfigParser to ConfigParser in gce inventory script (#54974)junji hashimoto2019-04-101-2/+2
|
* Use ansible.module_utils.six in inventory scripts (#55000)Sam Doran2019-04-0930-89/+45
| | | | | | | | | | | * Use six from ansible.module_utils for inventory scripts Remove skips from sanity test * Change all imports of ConfigParser to use module_utils.six.moves * Remove commented out lines * Fix six imports
* Use six.moves to import configparser in cloudforms script (#54465)Alan Rominger2019-04-081-1/+1
|
* Fix ovirt4.py inventory file for oVirt 4.3 (#54338)mmartinv2019-03-281-1/+1
| | | | | | | | | | | | | | | ovirt4.py inventory file fails with oVirt 4.3 with the following error: Traceback (most recent call last): File "inventory/ovirt", line 259, in <module> main() File "inventory/ovirt", line 250, in main vm_name=args.host, File "inventory/ovirt", line 209, in get_data vms[name] = get_dict_of_struct(connection, vm) File "inventory/ovirt", line 178, in get_dict_of_struct (stat.name, stat.values[0].datum) for stat in stats File "inventory/ovirt", line 178, in <genexpr> (stat.name, stat.values[0].datum) for stat in stats IndexError: list index out of range
* Fix various sonarcloud issuesDag Wieers2019-02-151-17/+4
| | | | | This fixes various reported bugs through sonarcloud at: https://sonarcloud.io/project/issues?id=Rodney-Reis_ansible&resolved=false&types=BUG
* Fix pycodestyle E117 issues.Matt Clay2019-02-132-15/+15
|
* VMware: debug property values (#45410)Abhijeet Kasurde2019-02-041-1/+8
| | | | | | | This fix adds additional information about VM properties Fixes: #43618 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* inventory: vagrant: rename deprectated ansible_ssh_* (#50694)Jonathan Hanson2019-01-091-3/+3
|
* Skip non-management Packet IP addresses (#48168)Dan Nicholson2018-12-201-2/+7
| | | | | | | Non-management (elastic) IP addresses require manual configuration on the host as described in https://help.packet.net/article/54-elastic-ips. Skip those so that only the automatically configured management addresses are used. Otherwise, a non-routable address may be returned in the inventory.
* Docker inventory service/stack groups for docker swarm (#48021)Eric Miller2018-12-171-0/+10
| | | | | | | | * Adding service and stack grouping to docker inventory * Updating documentation * Adding changelog fragment for docker.py inventory script
* Ensure that current uses of BaseException are requiredToshio Kuratomi2018-12-161-1/+3
| | | | | | | | | | * In some cases, it appears that Exception should have been used instead as there's no need to catch sys.exit KeyboardInterrupt and similar. * In a few cases, it appears that BaseException is used because a library we depend on calls sys.exit() contrary to good coding design. Comment those so that we know that those have been audited and found to be correct and change to use (Exception, SystemExit) instead.
* Update bare exceptions to specify Exception.Toshio Kuratomi2018-12-1618-39/+39
| | | | | This will keep us from accidentally catching program-exiting exceptions like KeyboardInterupt and SystemExit.
* Fix AWS STS session detection (#49536)Stef Fen2018-12-061-0/+2
| | | | If CLI has already assumed a IAM Role, then the cli environment has an additional variable: AWS_SESSION_TOKEN This needs to be forwarded to boto to successfully reuse the AWS session in boto.
* cloudstack: inventory: consider more keys optional (#49364)Pierre-Yves Ritschard2018-12-011-8/+30
|
* zabbix inventory: options to read per each host and set ansible_ssh_host ↵Filippo1252018-12-012-9/+59
| | | | (#44107)
* add want_ssh_ansible_host flag to foreman dynamic inventory (#34169)Keith Resar2018-11-152-0/+13
|
* update doc in contrib\inventory\azure_rm.py (#46939)Yunge Zhu2018-11-141-0/+6
| | | | | | * add inventory note * typo
* Ansible Vault and Azure Key Vault vault password script (#44544)Austin Hobbs2018-11-062-0/+607
| | | | | | | | * added new vault password files that can be used with Azure Key Vault * fixed pylint errors * fixed pep 8 violations
* fix setting config with DOCKER_CONFIG_FILE (#23096)milo-minderbinder2018-10-301-24/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #23095 Fixed issue preventing a caller from setting a docker configuration file (e.g. docker.yml) by specifing the config file path in the `DOCKER_CONFIG_FILE` environment variable. Previously, the cli argument parser set a default value for the `--config-file` argument which would prevent ever checking the environment variable, regardless of whether or not the `--config-file` argument even specified a valid file. This commit adds a global `DEFAULT_DOCKER_CONFIG_FILE` variable, which points to the current default `docker.yml` config in the contrib/inventory directory. Now, when this script is called from the command line, the config file passed with the cli `--config-file` arg will be given the highest precedence; if it is absent, this script will then check if the `DOCKER_CONFIG_FILE` env var is set, and load the config file specified if possible. If neither the environment variable or cli argument are specified, then the script will attempt to parse the config file `docker.yml` in this script's directory (if present). If either the `DOCKER_CONFIG_FILE` environment variable or the `--config-file` argument are given but point to a nonexistant file, then the script will print an error message and exit with an error code. It is *not* an error condition if the fallback `docker.yml` does not exist.
* Handle non-ascii characters in foreman.py (#46779)jctanner2018-10-151-4/+18
| | | | | | * Handle non-ascii characters in foreman.py * Add test to validate non-ascii results
* Python 3.8 collections compatibility fixes.Matt Clay2018-10-082-5/+6
| | | | Includes a new pylint blacklist plugin to prevent regressions.
* fix digitalocean inventory tags endpoint (#46192)VitSkakun2018-10-061-1/+1
|
* Misc typo fixes (#45969)Abhijeet Kasurde2018-09-211-3/+3
| | | Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* The keyword 'cloud' has been deprecated in favor of the 'profile' keyword by ↵Larry Singer2018-09-201-1/+1
| | | | os-client-config. (#31389)
* Add environmental variables to allow for the script to be run without ↵jamiesonio2018-09-191-0/+11
| | | | consul_io.ini. This allows it to run dynamically without any prerequisite config file (#30900)
* Fix bugs in softlayer dynamic inventory (#28178)Paul Czarkowski2018-09-191-5/+10
| | | | | | | | * --host hostname did not work due to calling wrong function * softlayer api returns a bunch of extra stuff in the tagReference dict that makes --list output crazy long, like over a terminal buffer for just one server this culls out the extranneous information and only inserts the actual user provided tags to each server.
* DigitalOcean inventory deprecation warning (#45054)ABond2018-09-051-1/+1
| | | | | Handle DeprecationWarning for ConfigParser in python3 Fixes #45053
* ec2 inventory: python 3.7 compatibility (#43716)Simon Wydooghe2018-09-051-10/+10
| | | | | | | ec2 inventory script was throwing errors when using Python 3.7: TypeError: option values must be strings This changes the None ConfigParser options to empty strings instead.
* Fixes ec2.py assume_role. (#37357)Max Cameron2018-09-041-1/+2
| | | | | | * Fixes ec2.py assume_role Previously when connect_to_aws was called it updated the credentials in place. "connect_to_aws" is called multiple times: on the second run it tries to assume the same role it is already using, and potentially failing depending on your iam policies.
* Update vault-keyring to ConfigManager internals (#41967)Yves Martin2018-08-221-2/+2
| | | Fix failure since ConfigManager changes
* Fix #43917 (#43929)Miguel C2018-08-131-1/+1
| | | Support upper/lower case resource groups
* Remove use of simplejson throughout code base (#43548)Matt Martz2018-08-1031-127/+31
| | | | | | | | | | * Remove use of simplejson throughout code base. Fixes #42761 * Address failing tests * Remove simplejson from contrib and other outlying files * Add changelog fragment for simplejson removal
* add group_by_os_family in azure dynamic inventory (#40702)Etienne Deneuve2018-08-092-1/+10
|
* VMware: remove unused imports (#43804)Abhijeet Kasurde2018-08-091-4/+3
| | | | | Idea taken from https://github.com/ansible/ansible/pull/43402 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Surround top-level function and class definitions with two blank lines.Joren Vrancken2018-07-3120-1/+20
|
* Update openstack inventory script to keep basic functionality (#43432)Alan Rominger2018-07-301-1/+6
| | | | | | | | re-applies commit 6667ec447466abf1641787afccf9175369319d1f which fixed the plugin to the script so that it will work with current ansible-inventory. Also redirect stdout before dumping the ouptput, because not doing so will cause JSON parse errors in some cases.
* scaleway: initialise auth_token to none (#43183)Theodotos Andreou2018-07-241-0/+1
| | | Fixes: #43132
* VMware: blacklist custom fields in vmware_inventory.py (#36877)tod-uma2018-07-182-1/+16
| | | | | | | * Provide the ability to blacklist custom fields from having groups created for them. * Updated configuration parameter name
* Zabbix inventory improvement (#42669)Filippo1252018-07-142-1/+9
| | | | | | | | | | * Add validate_certs option to zabbix inventory * Add validation option * Fix pep8 * Add changelog
* Changed 'all' group to 'scaleway' group to avoid conflict with real 'all' ↵Marcos Alano2018-07-051-3/+3
| | | | group. Closes ##35092 (#42367)
* Name of global custom attributes are not managed by the inventory (#41786)smutel2018-07-051-1/+1
|