1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/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.
2016-08-18 14:37:31 -07:00
..
abiquo.ini Fix some typos (#16498) 2016-06-29 14:31:25 -04:00
abiquo.py Fix urlopen usage to use open_url instead 2015-09-16 20:40:17 -07:00
apache-libcloud.py Replace type() checks with isinstance() 2015-09-04 09:47:17 +03:00
azure_rm.ini Upgrade to azure 2.0.0rc5 and add locations parameter. 2016-07-09 01:42:39 -04:00
azure_rm.py add default location and env override (#16854) 2016-08-04 09:54:44 -07:00
brook.ini Brook inventory (#15264) 2016-04-25 11:42:57 -04:00
brook.py errors now print to stderr 2016-04-25 11:43:54 -04:00
cloudforms.ini add cloudforms inventory script (#17037) 2016-08-18 14:37:31 -07:00
cloudforms.py add cloudforms inventory script (#17037) 2016-08-18 14:37:31 -07:00
cloudstack.ini poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
cloudstack.py Fix filtering by project in Cloudstask inventory 2016-03-09 11:19:39 +07:00
cobbler.ini add cobbler api authentication options 2016-04-18 17:29:03 -04:00
cobbler.py add cobbler api authentication options 2016-04-18 17:29:03 -04:00
collins.ini poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
collins.py Fix urlopen usage to use open_url instead 2015-09-16 20:40:17 -07:00
consul.ini poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
consul_io.py update documentation (#15838) 2016-05-16 10:44:35 -04:00
digital_ocean.ini [contrib] Add option to define group vars in DigitalOcean dynamic inventory script 2016-02-14 17:04:26 +01:00
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) 2016-06-15 09:49:14 -04:00
docker.py Update and fix typos in docker inventory docstrings. (#15616) 2016-04-27 17:17:34 -04:00
docker.yml Update and fix typos in docker inventory docstrings. (#15616) 2016-04-27 17:17:34 -04:00
ec2.ini Paginate DB cluster responses in AWS RDS dynamic inventory 2016-08-15 14:27:48 -04:00
ec2.py Paginate DB cluster responses in AWS RDS dynamic inventory 2016-08-15 14:27:48 -04:00
fleet.py Use print() as function under contrib/ 2015-08-28 09:18:13 +03:00
freeipa.py Use print() as function under contrib/ 2015-08-28 09:18:13 +03:00
gce.ini Adding instance_states option to gce inventory 2016-06-17 10:11:23 -04:00
gce.py Added the ability to filter gce grouped_instances by region/zone (#14138) 2016-07-14 22:10:39 -04:00
jail.py Use print() as function under contrib/ 2015-08-28 09:18:13 +03:00
landscape.py poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
libcloud.ini poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
libvirt_lxc.py Correct connection type returned by libvirt_lxc inventory script 2015-11-13 15:43:12 +01:00
linode.ini poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
linode.py When the linode inventory is generated the linode label is used as the 2016-02-10 18:54:52 -05:00
lxc_inventory.py Add inventory script for LXC containers 2016-06-03 23:22:56 +03:00
nagios_ndo.ini Add Nagios NDO inventory plugin 2015-09-01 17:10:37 +02:00
nagios_ndo.py Add Nagios NDO inventory plugin 2015-09-01 17:10:37 +02:00
nova.ini poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
nova.py Replace .iteritems() with six.iteritems() 2015-09-03 09:23:27 +03:00
nsot.py Removed version argument from argparse 2015-11-18 14:01:30 -08:00
nsot.yaml Added NSoT Inventory script to pull from Device resources 2015-09-15 00:53:34 -07:00
openshift.py Fix urlopen usage to use open_url instead 2015-09-16 20:40:17 -07:00
openstack.py Strip group names of whitespaces, so we can use space after comma in openstack's groups metadata field. (#16843) 2016-08-04 09:45:15 -07:00
openstack.yml Allow fail_on_errors in openstack inventory 2016-04-05 20:31:54 +10:00
openvz.py Fixing typo 2015-10-26 17:13:00 -04:00
ovirt.ini poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
ovirt.py Fix indentation in ovirt.py inventory 2016-03-22 20:33:40 -05:00
proxmox.py If the notes don't contain JSON, add the string to the notes key of _meta 2016-01-24 01:10:47 -08:00
rackhd.py Bug Fix 2016-03-14 16:40:39 -04:00
rax.ini Add rax cache age ini documentation 2016-01-20 15:27:06 -05:00
rax.py Add a config option for rackspace inventory cache 2016-01-20 15:03:56 -05:00
rudder.ini Add Rudder inventory plugin 2015-08-28 10:25:18 +02:00
rudder.py made python 3 compatible 2015-11-13 21:57:28 -08:00
serf.py poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
softlayer.py Use print() as function under contrib/ 2015-08-28 09:18:13 +03:00
spacewalk.ini Added support for ini-file. 2015-07-31 14:18:59 +02:00
spacewalk.py Fix CACHE_DIR mode in contrib/inventory/spacewalk.py 2016-04-01 20:35:19 -04:00
ssh_config.py Use print() as function under contrib/ 2015-08-28 09:18:13 +03:00
vagrant.py Use print() as function under contrib/ 2015-08-28 09:18:13 +03:00
vbox.py Output proper JSON from vbox dynamic inventory contrib script 2015-09-26 18:25:58 +02:00
vmware.ini vmware inventory script enhancements (#17106) 2016-08-17 17:44:15 -04:00
vmware.py vmware inventory script enhancements (#17106) 2016-08-17 17:44:15 -04:00
vmware_inventory.ini correct ini variable name (#16901) 2016-08-01 17:34:06 -04:00
vmware_inventory.py vmware_inventory.py excude more properties and fix debug printing on unicode (#16769) 2016-07-20 09:46:50 -04:00
windows_azure.ini Updates to Windows Azure inventory script from Tower. Includes changes from https://github.com/ansible/ansible/pull/8403. 2015-08-10 17:35:47 -04:00
windows_azure.py Allow to work with latest Azure Python SDK (#15467) 2016-04-21 23:18:45 -04:00
zabbix.ini poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
zabbix.py Added additional ini file search path into contrib/inventory/zabbix.py 2015-10-08 11:44:27 +03:00
zone.py Use print() as function under contrib/ 2015-08-28 09:18:13 +03:00