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
milo-minderbinder 77d73808e6 fix setting config with DOCKER_CONFIG_FILE ()
Fixes 

Fixed issue preventing a caller from setting a docker
configuration file (e.g. docker.yml) by specifing the
config file path in the `DOCKER_CONFIG_FILE` environment
variable. Previously, the cli argument parser set a default value for
the `--config-file` argument which would prevent ever checking the
environment variable, regardless of whether or not the `--config-file`
argument even specified a valid file.

This commit adds a global `DEFAULT_DOCKER_CONFIG_FILE` variable, which
points to the current default `docker.yml` config in the
contrib/inventory directory. Now, when this script is called from the
command line, the config file passed with the cli `--config-file` arg
will be given the highest precedence; if it is absent, this script will
then check if the `DOCKER_CONFIG_FILE` env var is set, and load the
config file specified if possible. If neither the environment variable
or cli argument are specified, then the script will attempt to parse the
config file `docker.yml` in this script's directory (if present).

If either the `DOCKER_CONFIG_FILE` environment variable or the
`--config-file` argument are given but point to a nonexistant file, then
the script will print an error message and exit with an error code.

It is *not* an error condition if the fallback `docker.yml` does not
exist.
2018-10-30 15:39:32 -04:00
..
abiquo.ini
abiquo.py
apache-libcloud.py
apstra_aos.ini
apstra_aos.py
azure_rm.ini
azure_rm.py
brook.ini
brook.py
cloudforms.ini
cloudforms.py
cloudstack.ini
cloudstack.py
cobbler.ini
cobbler.py
collins.ini
collins.py
consul_io.ini Misc typo fixes () 2018-09-21 14:43:22 +01:00
consul_io.py Add environmental variables to allow for the script to be run without consul_io.ini. This allows it to run dynamically without any prerequisite config file () 2018-09-19 18:19:35 -04:00
digital_ocean.ini
digital_ocean.py fix digitalocean inventory tags endpoint () 2018-10-06 22:20:11 -04:00
docker.py fix setting config with DOCKER_CONFIG_FILE () 2018-10-30 15:39:32 -04:00
docker.yml
ec2.ini
ec2.py ec2 inventory: python 3.7 compatibility () 2018-09-05 09:27:35 +10:00
fleet.py
foreman.ini
foreman.py Handle non-ascii characters in foreman.py () 2018-10-15 21:40:51 -04:00
freeipa.py
gce.ini
gce.py
infoblox.py
infoblox.yaml
jail.py
landscape.py
libcloud.ini
libvirt_lxc.py
linode.ini
linode.py
lxc_inventory.py
lxd.ini
lxd.py
mdt.ini
mdt_dynamic_inventory.py
nagios_livestatus.ini
nagios_livestatus.py
nagios_ndo.ini
nagios_ndo.py
nsot.py
nsot.yaml
openshift.py
openstack.yml The keyword 'cloud' has been deprecated in favor of the 'profile' keyword by os-client-config. () 2018-09-20 11:31:19 -05:00
openstack_inventory.py
openvz.py
ovirt.ini
ovirt.py
ovirt4.py
packet_net.ini
packet_net.py
proxmox.py
rackhd.py
rax.ini
rax.py
rhv.py
rudder.ini
rudder.py
scaleway.ini
scaleway.py
serf.py
softlayer.py Fix bugs in softlayer dynamic inventory () 2018-09-19 18:10:15 -04:00
spacewalk.ini
spacewalk.py
ssh_config.py Python 3.8 collections compatibility fixes. 2018-10-08 11:26:37 -07:00
stacki.py
stacki.yml
vagrant.py
vbox.py
vmware.ini
vmware.py Python 3.8 collections compatibility fixes. 2018-10-08 11:26:37 -07:00
vmware_inventory.ini
vmware_inventory.py
zabbix.ini
zabbix.py
zone.py