summaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAgeFilesLines
* Removed dict.iteritems() in several other files.Andrea Tartaglia2016-12-144-13/+13
| | | | | | This is for py3 compatibility #18506 (cherry picked from commit 59227d8c31f49e9aafe97119bbf501262fc8550c)
* Remove itervalues (not available on py3)Toshio Kuratomi2016-12-131-2/+2
| | | | (cherry picked from 51491c990444be4153d8d4e07ced00f8af348ddd)
* Fix auth in collins.py inventoryMichael Schuett2016-11-232-1/+4
| | | | | | | | | This forces basic auth to be used. Using the normal HTTPPasswordMgrWithDefaultRealm password manager from urllib2 fails since collins doesn't send a 401 retry on failure. More about this can be seen here http://stackoverflow.com/questions/2407126/python-urllib2-basic-auth-problem. I added a small comment about the format of the host so others don't waste time like i did. (cherry picked from commit 21813ed83eb899a7c2c78b024abcd9db6ce01023)
* Port has_key to python3 compatible syntaxJames Tanner2016-11-161-7/+7
| | | | (cherry picked from commit 2d2bb626d4f6da834d561cbbb25c158f6837e2cb)
* Resolves #18312 python3 support for ec2.pyTony Kinsley2016-11-031-1/+1
| | | | (cherry picked from commit 73da2663a3d0129f1b329995fe72d2e1c74c4aae)
* Correctly read use_private_network as booleanDaniel Yates2016-10-231-1/+1
| | | | | | | | This fixes the use of public IPs in the discovered hosts by ensuring that the use_private_network check doesn't always evaluate to False if the associated .ini file specifies this option. (cherry picked from commit 39e86ae2bc3a0090d4dca3ae9a7eedfe6b2be5ae)
* Fix improper handling of machine_type in ovirt inventory (#16251)Nijin Ashok2016-10-231-1/+6
| | | | | Currently the machine_type will not work if the instance type is set in ovirt. In that case, inst.get_instance_type will be an object and will fails while converting to json. This only work if the instance type is not set in ovirt where inst.get_instance_type is a Null value. The current change make sure that correct "instance type" is passed when instance is set in ovirt and Null when it's not set in ovirt. (cherry picked from commit 1f3d82dd1809a1d4ba430786a75dccc6b3736ca6)
* vmware_inventory: Make the ceritifate check default, and create a config ↵jctanner2016-09-302-11/+15
| | | | | option (#17830) Fixes #17811
* vmware_inventory: decode strings to ascii if not alphanumeric (#17618)jctanner2016-09-161-1/+4
| | | Fixes #17281
* Changes as per @abadgerKhushil Dep2016-09-141-2/+2
|
* Add enumeration of block devices to ec2_block_devicesKhushil Dep2016-09-141-0/+5
|
* Corrected port designation in INI file (#17543)Davis Phillips2016-09-131-1/+1
|
* Use addresses and names reserved for documentationRobin Schneider2016-09-111-1/+1
| | | | | | | | Trying to preserve the meaning of the examples. Not all occurrences in `docsite/rst/playbooks_lookups.rst` have been changed for instance to allow the unchanged examples to be used for testing. Related to: #17479
* Add public_ip option to linode dynamic inventory (#17390)Jared Sprague2016-09-092-4/+18
| | | | | | * Add public_ip option to linode dynamic inventory * Add an option to use public IP instead of label for linode hosts
* Migrate basestring to a python3 compatible type (#17199)Toshio Kuratomi2016-08-232-4/+5
|
* Use sys.exit(msg) i/o print() and sys.exit() (#15465)Adrian Likins2016-08-2310-37/+22
| | | | Any non-0 exits should be showing an error message to stderr instead of to stdout.
* vmware_inventory script improvements (#17142)jctanner2016-08-191-119/+94
| | | | | | | | * vmware_inventory script improvements * switch instance finding method to use containerview based searches * overhaul the serialization method for objects * Cleanup the debug outputs * Add a warning about performance
* py3 print fixnitzmahone2016-08-181-35/+36
|
* add cloudforms inventory script (#17037)Josh Preston2016-08-182-0/+493
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add cloudforms inventory script based on the foreman inventory script, features: * cached results (default 600 seconds) * paginated host results (default 100 hosts) * ssl verification (default True) * arguments to flush cache and run in debug mode * suggested rework * removed second cache / dict with duplicate info * added purge_actions configuration option to remove the actions from a host (defaults to False) * added prefer_ip_address configuration option so give the option of using ip address instead of name (defaults to True) * removed self variables — just use the arguments directly * added --pretty command line option to pretty print results * renamed _resolve_params to _resolve_host * implement suggestions * removed not used import * added warnings to help debug connection issues * renamed self.cache to self.hosts for clarity * now will use the first ip address as ansible_ssh_host * flipped default for prefer_ip_address config option to false - preserve name, and specify ansible_ssh_host as ip address * added checks and warnings to configuration options, sane defaults for all except required: ** `url` - the first part of the cloudforms server url (https://cfme.example.com) ** `username` - the cloudforms username to log in with ** `password` - the password for the cloudforms user specified * removed redundant call to fetch host information (since we’re paging results, no need to split the calls) * added warning for unexpected responses from CloudForms * debug for returned sting now prints the string instead of forcing to JSON * removed no longer needed methods to fetch host information * using ‘key in list’ instead of ‘list.has_key(key)’ * correctly formatted groups and allowed nested groups * now create groups for `location`, `type` and `vendor`, with appropriate sub-groups and children * made to_safe honor config option to clean group names for ansible consumption * remove prefer_ip_address configuration option no longer needed since we will specify `ansible_ssh_host` as the returned ip address. * removed dns_name no longer needed, will preserve `host[name]` as name in Ansible. * purge actions from hostvars changed purge_actions to True * flake8 suggestion for whitespace * fix undefined r variable in warning output use the correct ret variable * Default purge_actions to True We probably don’t need them, but it is configurable, so just default to remove them. * Add configuration option to nest cloudforms tags disabled by default, the nest_tags option will expand cloudforms tags into a nested group/subgroup structure. Otherwise, it will use the whole tag name. * added purging the actions removed in previous clean up in error. * fixed undefined variable specified the correct variable for logging.
* vmware inventory script enhancements (#17106)jctanner2016-08-172-2/+43
| | | | | | * Allow the user to disable certificate verification * Allow the user to find VMs only in specific clusters
* Merge pull request #16606 from ryansb/rds-cluster-inventory-aioueRyan Brown2016-08-152-0/+79
|\ | | | | Support RDS clusters in AWS dynamic inventory script
| * Paginate DB cluster responses in AWS RDS dynamic inventoryRyan S. Brown2016-08-152-2/+8
| |
| * Respect profiles & credentials for boto3 inventoryRyan S. Brown2016-07-061-3/+6
| | | | | | | | | | Using boto3 directly wasn't properly using profiles set in the `ec2.ini` file, this change uses the `module_utils` boto3_conn instead.
| * Fail softly when boto3 is not installedTom Paine2016-07-061-2/+11
| | | | | | | | | | | | Updated as per @ryansb comments. The EC2 inventory script will now fail with a useful message when boto3 is not installed and the user is trying to read RDS cluster information.
| * Add RDS cluster info to EC2 dynamic inventoryTom Paine2016-07-062-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add db_clusters to the ec2 inventory. Show tags. Only show clusters matching tags in the `.ini`. Set `include_rds_clusters = True` option to enable RDS cluster inventory collection. Example inventory output: ``` { "db_clusters": { "ryansb-cluster-test": { "AllocatedStorage": 1, "AvailabilityZones": [ "us-west-2a", "us-west-2b", "us-west-2c" ], "BackupRetentionPeriod": 1, "DBClusterIdentifier": "ryansb-cluster-test", "DBClusterMembers": [ { "DBClusterParameterGroupStatus": "in-sync", "DBInstanceIdentifier": "ryansb-test", "IsClusterWriter": true, "PromotionTier": 1 }, { "DBClusterParameterGroupStatus": "in-sync", "DBInstanceIdentifier": "ryansb-test-us-west-2b", "IsClusterWriter": false, "PromotionTier": 1 } ], "DBClusterParameterGroup": "default.aurora5.6", "DBSubnetGroup": "default", "DatabaseName": "mydb", "DbClusterResourceId": "cluster-OB6H7JQURFKFD4BYNHG5HSRLBA", "Endpoint": "ryansb-cluster-test.cluster-c9ntgaejgqln.us-west-2.rds.amazonaws.com", "Engine": "aurora", "EngineVersion": "5.6.10a", "MasterUsername": "admin", "Port": 3306, "PreferredBackupWindow": "06:09-06:39", "PreferredMaintenanceWindow": "mon:11:22-mon:11:52", "ReadReplicaIdentifiers": [], "Status": "available", "StorageEncrypted": false, "VpcSecurityGroups": [ { "Status": "active", "VpcSecurityGroupId": "sg-47eaea20" } ] } }, "rds": [ "ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com", "ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com" ], "rds_aurora": [ "ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com", "ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com" ], "rds_parameter_group_default_aurora5_6": [ "ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com", "ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com" ], "ryansb-test": [ "ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com" ], "ryansb-test-us-west-2b": [ "ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com" ], "type_db_r3_large": [ "ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com", "ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com" ], "us-west-2": [ "ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com", "ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com" ], "us-west-2a": [ "ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com" ], "us-west-2b": [ "ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com" ], "vpc_id_vpc_3ca34459": [ "ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com", "ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com" ] } ```
* | add default location and env override (#16854)Andrew Dolby2016-08-041-5/+8
| |
* | Strip group names of whitespaces, so we can use space after comma in ↵Oskar Wyciślak2016-08-041-1/+1
| | | | | | | | openstack's groups metadata field. (#16843)
* | correct ini variable name (#16901)Dick Davies2016-08-011-1/+1
| | | | | | | | | | cache_path is used to calculate cache_dir , the script doesn't actually read cache_dir from this file. This makes the setting work (otherwise it always uses the default).
* | vmware_inventory.py excude more properties and fix debug printing on unicode ↵jctanner2016-07-201-8/+12
| | | | | | | | | | | | | | | | | | (#16769) * Fix broken indentation in vmware inventory * Allow script to be a symlink without breaking ini path. * Add some more properties to the bad_types list * Encode unicode strings to ascii Fixes #16763
* | Added the ability to filter gce grouped_instances by region/zone (#14138)Wayne Witzel III2016-07-141-2/+18
| |
* | Upgrade to azure 2.0.0rc5 and add locations parameter.Chris Houseknecht2016-07-092-27/+39
|/
* Fix some typos (#16498)Shota2016-06-291-1/+1
|
* Merge pull request #16286 from kwoodson/gce_instance_statesRyan Brown2016-06-202-0/+29
|\ | | | | Adding instance_states to gce inventory to align with other inventories.
| * Adding instance_states option to gce inventoryKenny Woodson2016-06-172-0/+29
| |
* | The output of the digital ocean script was invalid for ID and droplet name ↵Adam Thomas2016-06-151-2/+2
|/ | | | groups. Hosts is now an array of strings rather than a string for these groups. (#16297)
* Fixes #16095: Maximumly 199 filter values (#16184)bqbn2016-06-131-1/+6
| | | | | | | | | When making calls to AWS EC2 api with DescribeTags actiion and if the number of filter values is greater than or equal to 200, it results in 400 bad request reply and the error message is: "Error connecting to AWS backend.\n The maximum number of filter values specified on a single call is 200". The change is so that we call get_all_tags with maximum 199 filter values one at a time until all are consumed.
* * Fix broken indentation in vmware inventory (#16177)jctanner2016-06-071-11/+10
| | | * Allow script to be a symlink without breaking ini path.
* Merge pull request #14699 from jhesketh/develMonty Taylor2016-06-072-0/+11
|\ | | | | Set fail_on_cloud_config in openstack inventory
| * Allow fail_on_errors in openstack inventoryJoshua Hesketh2016-04-052-0/+11
| | | | | | | | | | | | | | | | | | Add support for a new option to the openstack inventory. This is so should one cloud be unavailable you can still list hosts from any other openstack clouds you have configured. This is exposed as an option under the extra config part of ansible in the openstack clouds.yaml.
* | Merge pull request #15965 from edevil/python_envChris Houseknecht2016-06-051-2/+2
|\ \ | | | | | | Update interpreter for azure inventory script
| * | Fix whitespace.André Cruz2016-05-231-1/+1
| | |
| * | Use the python executable specified by the environment.André Cruz2016-05-231-1/+1
| | |
* | | Add inventory script for LXC containersFlorian Haas2016-06-031-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables an LXC server's configuration as an inventory source for LXC containers. In LXC, containers can be defined with an "lxc.group" configuration option that is normally used with lxc-autostart -g. Here, we are using the same option to build Ansible inventory groups. In addition to being grouped according to their lxc.group entry (or entries, as LXC allows a single container to be in multiple groups), we also add all containers (including those with no lxc.group entry) to the "all" group.
* | | fixed group assignment in DO inventory (#16102)Brian Coca2016-06-031-15/+32
| | | | | | | | | | | | | | | | | | | | | | | | * fixed group assignment in DO inventory * changed sets to lists as we are appending dicts * deeper fix as original data structure was flawed
* | | Add a new vmware inventory script backed by pyvmomi (#15967)jctanner2016-05-302-0/+639
| | | | | | | | | Add a new dynamic vmware inventory script backed by pyvmomi
* | | fix vault-keyring.py 'No [vault] section' errorAdrian Likins2016-05-241-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vault-keyring.py was using an older version of the ansible.constants.load_config_file() API. The newer version returns a tuple, which caused the config load to fail and a catch all exception to blame it on a missing section. Update to new API, and catch the ConfigParser error specifically. Fixes #15984
* | | Fix ec2 inventory for potentially inconsistent data (#12642)Adam Chainz2016-05-241-0/+12
|/ /
* | contrib/inventory/ec2.py can read AWS credentials from ec2.ini (#15378)Victor Costan2016-05-202-9/+54
| |
* | update documentation (#15838)Chris Mague2016-05-161-4/+6
| |
* | Merge pull request #15466 from alikins/pr_10555_cobbler_auth_rebaseJames Cammarata2016-05-112-2/+17
|\ \ | | | | | | add cobbler api authentication options