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
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
2016-03-02 19:44:25 +01:00
..
abiquo.ini poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -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
cloudstack.ini poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
cloudstack.py Use print() as function under contrib/ 2015-08-28 09:18:13 +03:00
cobbler.ini poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
cobbler.py Replace .iteritems() with six.iteritems() 2015-09-03 09:23:27 +03: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 Replace .iteritems() with six.iteritems() 2015-09-03 09:23:27 +03:00
digital_ocean.ini Set the default use_private_network setting to False 2015-10-02 19:18:37 -04:00
digital_ocean.py Added an option to use the private network IP address 2015-10-02 19:16:44 -04:00
docker.py Use print() as function under contrib/ 2015-08-28 09:18:13 +03:00
docker.yml poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
ec2.ini Add an expand_csv_tags setting to ec2.ini 2015-11-12 08:48:53 +05:30
ec2.py Fix AWS EC2 external inventory script config read 2016-03-02 19:44:25 +01: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 poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
gce.py Use print() as function under contrib/ 2015-08-28 09:18:13 +03: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 Use print() as function under contrib/ 2015-08-28 09:18:13 +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 Optionally only use UUIDs for openstack hosts on duplicates 2015-12-14 10:19:43 -05:00
openstack.yml Optionally only use UUIDs for openstack hosts on duplicates 2015-12-14 10:19:43 -05: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 Use print() as function under contrib/ 2015-08-28 09:18:13 +03:00
proxmox.py Fix urlopen usage to use open_url instead 2015-09-16 20:40:17 -07: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 Replace .iteritems() with six.iteritems() 2015-09-03 09:23:27 +03: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 poreted log_plays, syslog_json and osx_say callbacks to v2 2015-07-10 10:30:33 -04:00
vmware.py Python 3: use six.text_type instead of unicode 2015-09-04 08:40:10 +03: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 Use print() as function under contrib/ 2015-08-28 09:18:13 +03: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