Commit Graph

154 Commits (434c949d0349ce680ae4e2b3f9503f4e08d33d3b)

Author SHA1 Message Date
Florian Haas 0e6fc9de3a Add inventory script for LXC containers
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.
8 years ago
Brian Coca 3121e352f7 fixed group assignment in DO inventory (#16102)
* fixed group assignment in DO inventory

* changed sets to lists as we are appending dicts

* deeper fix as original data structure was flawed
8 years ago
jctanner 018d3c3118 Add a new vmware inventory script backed by pyvmomi (#15967)
Add a new dynamic vmware inventory script backed by pyvmomi
8 years ago
Adrian Likins 675561e116 fix vault-keyring.py 'No [vault] section' error
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
8 years ago
Adam Chainz 064ed63843 Fix ec2 inventory for potentially inconsistent data (#12642) 8 years ago
Victor Costan 8d3da09eae contrib/inventory/ec2.py can read AWS credentials from ec2.ini (#15378) 8 years ago
Chris Mague aaaab42456 update documentation (#15838) 8 years ago
James Cammarata 37737ca6c1 Merge pull request #15466 from alikins/pr_10555_cobbler_auth_rebase
add cobbler api authentication options
8 years ago
Matt Hite fbfc24fb40 New inventory_ip_type option in gce inventory tool 8 years ago
Chris Houseknecht 21f2556662 Update and fix typos in docker inventory docstrings. (#15616) 8 years ago
Brian Coca 783dc2f0f6 errors now print to stderr 8 years ago
Francisco Ros 574163c949 Brook inventory (#15264)
* Initial work on Brook.io dynamic inventory

* Handle error cases in Brook.io dynamic inventory

* Remove defaults from brook.ini

* Update Brook.io dynamic inventory for libbrookv0.3

Use authentication api to obtain a valid JWT from an API Token.

* Remove defaults from brook.ini
8 years ago
Jorge Nerín 3a3e69f830 Fix substituting dots for underscores when using ips (#15578)
ec2.py was substituting the dots on ip addresses when not using hostnames like:
  "ec2": [
    "10_10_1_1", 

now it's:
  "ec2": [
    "10.10.1.1",
8 years ago
Matt Martz 5549292d69 Use exception as syntax in inventory, as it doesn't require py24 (#15554) 8 years ago
Brian Coca 6a983b0fc4 fixed misspelled var 8 years ago
Chris Houseknecht 221b1c9fd0 Refactored docker inventory. (#15485) 8 years ago
Chris Houseknecht 2b7f4395d6 Allow to work with latest Azure Python SDK (#15467)
* Allow to work with latest Azure Python SDK

* Fixed so that errors are sent to stderr
8 years ago
chouseknecht af5e4abf66
Rename azure inventory script. Fix bug preventing AD user login via environment vars. 8 years ago
Jerry Zhao 9278591758 add cobbler api authentication options
add cobbler api authentication options: username and password, which
can be provided if authentication is enabled or cobbler api is behind
a proxy that needs authentication.
8 years ago
chouseknecht a5bed1570e Adding new Azure inventory script. 8 years ago
David Shrewsbury 22467a0de8 Merge pull request #15232 from donovan/fix-openstack-config-file-name
add openstack.yml to CONFIG_FILES to be consistent with documentation
8 years ago
David Chan 5b81853c04 Fix CACHE_DIR mode in contrib/inventory/spacewalk.py 8 years ago
Donovan Jones 2268ea9a7f add openstack.yml to CONFIG_FILES to be consistent with documentation 8 years ago
Abhijit Menon-Sen 4db7e12898 Merge pull request #12113 from msabramo/contrib_inventory_consul_io_add_logging
Add optional logging to consul_io inventory script
8 years ago
Matt Martz bb6e05a176 Fix indentation in ovirt.py inventory 8 years ago
Abhijit Menon-Sen 9005f91bb0 Merge pull request #15068 from OwenTuz/issue-15067
Name the AWS inventory cache based on the profile in use
8 years ago
Brian Coca 6bf92e7398 Merge pull request #15037 from vladpanainte/gce_fix
remove logging warning from GCE inventory
8 years ago
Owen Tuz 3b8d753121 Avoid cache conflicts when using multiple AWS accounts 8 years ago
Brian Coca d026bc5e17 Merge pull request #14471 from willdurand/contrib-do-inventory
[contrib] Add option to define group vars in DigitalOcean dynamic inventory script
8 years ago
James Cammarata c9da48d5ba Merge branch 'destination_format' of https://github.com/a13m/ansible into a13m-destination_format 8 years ago
Brian Coca e1ee2ed5a5 Merge pull request #13550 from KrzysiekJ/connect_to_region-wrap
Use wrapped connect_to_region everywhere in ec2.py
8 years ago
Brian Coca 8838ed055c Merge pull request #14872 from bcoca/ec2_inv_page_rds
page rds instances
8 years ago
James Cammarata 93542b3666 Merge pull request #14964 from keedya/devel
Fixing bug in the output format when displaying 2 or more hosts
8 years ago
Brian Coca eceabec71f page rds instances
fix #14861
8 years ago
Toshio Kuratomi 959711b56e Merge pull request #14993 from karmab/ovirt_connection_fix
Fixes ovirt inventory to only override credentials when keys exist
8 years ago
karimb 421fb6df8b Fixes ovirt inventory to only override credentials from environment when keys exist 8 years ago
Vlad Panainte 8259c091d6 fix logging 8 years ago
Abhijit Menon-Sen ad0e707f97 Merge pull request #7395 from hkariti/ec2_hostname_variable
Add hostname_variable to ec2 inventory script
8 years ago
James Cammarata 6265d6fd2a Merge pull request #14870 from zyegfryed/patch-1
Fix filtering by project in Cloudstask inventory
8 years ago
Hagai Kariti 8a17da299f Clean up lines with only whitespaces in ec2.py 8 years ago
Hagai Kariti 53756af546 Added hostname_variable to ec2 inventory 8 years ago
Abhijit Menon-Sen f0af07a5f4 Merge pull request #14761 from enbritely/fix-ec2-inventory
Fix AWS EC2 inventory script instance_filters read
8 years ago
Clark Boylan 7d5650219d Fix openstack inventory for multiple servers
Fix openstack inventory for when we have multiple servers with the same
name but different IDs. Instead of giving every server with the same
name the details for the first server returned with that name add the
individual servers as they are returned.

This was a logic bug where in a loop over a list of servers we always
added the first server in that list despite having more than one server.
8 years ago
Andre Keedy d180e0e05f Bug Fix
-Corrected the format in case of  multiple hosts

Remove empty spaces
8 years ago
Monty Taylor 82c150b72f Detect empty cache files in openstack inventory
There are cases where it makes more sense to zero out a cache file as a
form of invalidation instead of removing it. Detect those approrpriately
8 years ago
Sébastien Fievet 83e748e315 Fix filtering by project in Cloudstask inventory 8 years ago
Brian Coca 061d35bbe3 Merge pull request #14297 from keedya/devel
Add rackHd inventory script
8 years ago
Joe 21ba6e9ce8 Do not use name `tag` for intance filter 8 years ago
Joe 5975296770 Fix AWS EC2 external inventory script config read
EC2 inventory scripts reads configuration from an INI file. The `instance_filters` option controls which EC2 instances are retrieved for inventory. Filling this option and running the inventory script with Python 3 crashes with the following error:

```python
Traceback (most recent call last):
  File "./contrib/inventory/ec2.py", line 1328, in <module>
    Ec2Inventory()
  File "./contrib/inventory/ec2.py", line 163, in __init__
    self.read_settings()
  File "./contrib/inventory/ec2.py", line 393, in read_settings
    for instance_filter in config.get('ec2', 'instance_filters', '').split(','):
TypeError: get() takes 3 positional arguments but 4 were given
```

The problem is the last parameter of config.get() call, because `fallback` keyword argument is not specified.

The fix handles epmpty `instance_filers` in case of Python 2&3
8 years ago
Monty Taylor c737bd48bc Deduplicate true duplicate entries in the openstack inventory
There are cases where the host list back from the cloud comes back
duplicated. This causes us to report those with UUIDs, which we do to
support truly different servers with the same name. However, in the case
where duplicate host entries have the same UUID, we can know it's a data
hiccup.
8 years ago