You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/contrib/inventory
Josh Preston 2a2d866c0d add cloudforms inventory script (#17037)
* 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.
8 years ago
..
abiquo.ini Fix some typos (#16498) 8 years ago
abiquo.py Fix urlopen usage to use open_url instead 9 years ago
apache-libcloud.py Replace type() checks with isinstance() 9 years ago
azure_rm.ini Upgrade to azure 2.0.0rc5 and add locations parameter. 8 years ago
azure_rm.py add default location and env override (#16854) 8 years ago
brook.ini Brook inventory (#15264) 9 years ago
brook.py errors now print to stderr 9 years ago
cloudforms.ini add cloudforms inventory script (#17037) 8 years ago
cloudforms.py add cloudforms inventory script (#17037) 8 years ago
cloudstack.ini poreted log_plays, syslog_json and osx_say callbacks to v2 9 years ago
cloudstack.py Fix filtering by project in Cloudstask inventory 9 years ago
cobbler.ini add cobbler api authentication options 9 years ago
cobbler.py add cobbler api authentication options 9 years ago
collins.ini poreted log_plays, syslog_json and osx_say callbacks to v2 9 years ago
collins.py Fix urlopen usage to use open_url instead 9 years ago
consul.ini poreted log_plays, syslog_json and osx_say callbacks to v2 9 years ago
consul_io.py update documentation (#15838) 9 years ago
digital_ocean.ini [contrib] Add option to define group vars in DigitalOcean dynamic inventory script 9 years ago
digital_ocean.py The output of the digital ocean script was invalid for ID and droplet name groups. Hosts is now an array of strings rather than a string for these groups. (#16297) 8 years ago
docker.py Update and fix typos in docker inventory docstrings. (#15616) 9 years ago
docker.yml Update and fix typos in docker inventory docstrings. (#15616) 9 years ago
ec2.ini Paginate DB cluster responses in AWS RDS dynamic inventory 8 years ago
ec2.py Paginate DB cluster responses in AWS RDS dynamic inventory 8 years ago
fleet.py Use print() as function under contrib/ 9 years ago
freeipa.py Use print() as function under contrib/ 9 years ago
gce.ini Adding instance_states option to gce inventory 8 years ago
gce.py Added the ability to filter gce grouped_instances by region/zone (#14138) 8 years ago
jail.py Use print() as function under contrib/ 9 years ago
landscape.py poreted log_plays, syslog_json and osx_say callbacks to v2 9 years ago
libcloud.ini poreted log_plays, syslog_json and osx_say callbacks to v2 9 years ago
libvirt_lxc.py Correct connection type returned by libvirt_lxc inventory script 9 years ago
linode.ini poreted log_plays, syslog_json and osx_say callbacks to v2 9 years ago
linode.py When the linode inventory is generated the linode label is used as the 9 years ago
lxc_inventory.py Add inventory script for LXC containers 8 years ago
nagios_ndo.ini Add Nagios NDO inventory plugin 9 years ago
nagios_ndo.py Add Nagios NDO inventory plugin 9 years ago
nova.ini poreted log_plays, syslog_json and osx_say callbacks to v2 9 years ago
nova.py Replace .iteritems() with six.iteritems() 9 years ago
nsot.py Removed version argument from argparse 9 years ago
nsot.yaml Added NSoT Inventory script to pull from Device resources 9 years ago
openshift.py Fix urlopen usage to use open_url instead 9 years ago
openstack.py Strip group names of whitespaces, so we can use space after comma in openstack's groups metadata field. (#16843) 8 years ago
openstack.yml Allow fail_on_errors in openstack inventory 9 years ago
openvz.py Fixing typo 9 years ago
ovirt.ini poreted log_plays, syslog_json and osx_say callbacks to v2 9 years ago
ovirt.py Fix indentation in ovirt.py inventory 9 years ago
proxmox.py If the notes don't contain JSON, add the string to the notes key of _meta 9 years ago
rackhd.py Bug Fix 9 years ago
rax.ini Add rax cache age ini documentation 9 years ago
rax.py Add a config option for rackspace inventory cache 9 years ago
rudder.ini Add Rudder inventory plugin 9 years ago
rudder.py made python 3 compatible 9 years ago
serf.py poreted log_plays, syslog_json and osx_say callbacks to v2 9 years ago
softlayer.py Use print() as function under contrib/ 9 years ago
spacewalk.ini Added support for ini-file. 9 years ago
spacewalk.py Fix CACHE_DIR mode in contrib/inventory/spacewalk.py 9 years ago
ssh_config.py Use print() as function under contrib/ 9 years ago
vagrant.py Use print() as function under contrib/ 9 years ago
vbox.py Output proper JSON from vbox dynamic inventory contrib script 9 years ago
vmware.ini vmware inventory script enhancements (#17106) 8 years ago
vmware.py vmware inventory script enhancements (#17106) 8 years ago
vmware_inventory.ini correct ini variable name (#16901) 8 years ago
vmware_inventory.py vmware_inventory.py excude more properties and fix debug printing on unicode (#16769) 8 years ago
windows_azure.ini Updates to Windows Azure inventory script from Tower. Includes changes from https://github.com/ansible/ansible/pull/8403. 9 years ago
windows_azure.py Allow to work with latest Azure Python SDK (#15467) 9 years ago
zabbix.ini poreted log_plays, syslog_json and osx_say callbacks to v2 9 years ago
zabbix.py Added additional ini file search path into contrib/inventory/zabbix.py 9 years ago
zone.py Use print() as function under contrib/ 9 years ago