Switch branches/tags
Find file History
milo-minderbinder and ansibot fix setting config with DOCKER_CONFIG_FILE (#23096)
Fixes #23095

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.
Latest commit 77d7380 Oct 30, 2018
Permalink
..
Failed to load latest commit information.
abiquo.ini Fix some typos (#16498) Jun 29, 2016
abiquo.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
apache-libcloud.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
apstra_aos.ini [inventory/aos] Few fixes and small tweaks (#22259) Mar 3, 2017
apstra_aos.py Surround top-level function and class definitions with two blank lines. Jul 31, 2018
azure_rm.ini add group_by_os_family in azure dynamic inventory (#40702) Aug 9, 2018
azure_rm.py Fix #43917 (#43929) Aug 13, 2018
brook.ini Clean up shebangs for various files. Nov 3, 2016
brook.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
cloudforms.ini Add ability to select to prefer IPv4 addresses for ansible_ssh_host (#… Feb 1, 2018
cloudforms.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
cloudstack.ini poreted log_plays, syslog_json and osx_say callbacks to v2 Jul 10, 2015
cloudstack.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
cobbler.ini add cobbler api authentication options Apr 18, 2016
cobbler.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
collins.ini Fix auth in collins.py inventory Nov 23, 2016
collins.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
consul_io.ini Misc typo fixes (#45969) Sep 21, 2018
consul_io.py Add environmental variables to allow for the script to be run without… Sep 19, 2018
digital_ocean.ini [contrib] Add option to define group vars in DigitalOcean dynamic inv… Feb 14, 2016
digital_ocean.py fix digitalocean inventory tags endpoint (#46192) Oct 7, 2018
docker.py fix setting config with DOCKER_CONFIG_FILE (#23096) Oct 30, 2018
docker.yml Update and fix typos in docker inventory docstrings. (#15616) Apr 27, 2016
ec2.ini Prefer readthedocs.io instead of readthedocs.org for doc links (#41537) Jun 18, 2018
ec2.py ec2 inventory: python 3.7 compatibility (#43716) Sep 4, 2018
fleet.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
foreman.ini Add scan_new_hosts feature in ansible foreman inventory (#33743) Dec 14, 2017
foreman.py Handle non-ascii characters in foreman.py (#46779) Oct 16, 2018
freeipa.py FreeIPA inventory (ipalib 4.6.2): avoid exception (#34356) Feb 26, 2018
gce.ini Adding multiple project support for GCE (#39473) May 11, 2018
gce.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
infoblox.py Contrib infoblox exattrs Fixes #35409 (#35410) Jan 31, 2018
infoblox.yaml adds infoblox dynamic inventory script (#35328) Jan 25, 2018
jail.py pep8 fixes for contrib (#24344) May 9, 2017
landscape.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
libcloud.ini poreted log_plays, syslog_json and osx_say callbacks to v2 Jul 10, 2015
libvirt_lxc.py pep8 fixes for contrib (#24344) May 9, 2017
linode.ini Add public_ip option to linode dynamic inventory (#17390) Sep 9, 2016
linode.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
lxc_inventory.py Surround top-level function and class definitions with two blank lines. Jul 31, 2018
lxd.ini A basic lxd dynamic inventory script (#15848) Mar 27, 2017
lxd.py Fix shebangs and file modes and update tests. (#40563) May 22, 2018
mdt.ini Move mdt dynamic inventory plugin into contrib/inventory where it Nov 7, 2016
mdt_dynamic_inventory.py Surround top-level function and class definitions with two blank lines. Jul 31, 2018
nagios_livestatus.ini Fix spelling mistakes (comments only) (#25564) Jun 12, 2017
nagios_livestatus.py Surround top-level function and class definitions with two blank lines. Jul 31, 2018
nagios_ndo.ini Add Nagios NDO inventory plugin Sep 1, 2015
nagios_ndo.py Surround top-level function and class definitions with two blank lines. Jul 31, 2018
nsot.py Surround top-level function and class definitions with two blank lines. Jul 31, 2018
nsot.yaml Added NSoT Inventory script to pull from Device resources Sep 15, 2015
openshift.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
openstack.yml The keyword 'cloud' has been deprecated in favor of the 'profile' key… Sep 20, 2018
openstack_inventory.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
openvz.py pep8 fixes for contrib (#24344) May 9, 2017
ovirt.ini ovirt: Clarify secrets configuration (#39501) May 1, 2018
ovirt.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
ovirt4.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
packet_net.ini Add grouping by hostname for the Packet inventory (#21069) Jul 18, 2017
packet_net.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
proxmox.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
rackhd.py Add GPl License header to rackhd inventory file. (#24354) Jul 10, 2017
rax.ini Add rax cache age ini documentation Jan 20, 2016
rax.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
rhv.py Add dynamic inventory for oVirt version 4 and RHV version 4 (#17910) Nov 17, 2016
rudder.ini minor spelling changes Dec 13, 2016
rudder.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
scaleway.ini contrib(inventory): fix Scaleway inventory used w/env variable token (#… Feb 5, 2018
scaleway.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
serf.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
softlayer.py Fix bugs in softlayer dynamic inventory (#28178) Sep 19, 2018
spacewalk.ini Added support for ini-file. Jul 31, 2015
spacewalk.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
ssh_config.py Python 3.8 collections compatibility fixes. Oct 8, 2018
stacki.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
stacki.yml Stacki inventory (#19608) Jan 17, 2017
vagrant.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
vbox.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
vmware.ini vmware inventory script enhancements (#17106) Aug 17, 2016
vmware.py Python 3.8 collections compatibility fixes. Oct 8, 2018
vmware_inventory.ini VMware: blacklist custom fields in vmware_inventory.py (#36877) Jul 18, 2018
vmware_inventory.py VMware: remove unused imports (#43804) Aug 9, 2018
zabbix.ini Zabbix inventory improvement (#42669) Jul 14, 2018
zabbix.py Remove use of simplejson throughout code base (#43548) Aug 10, 2018
zone.py pep8 fixes for contrib (#24344) May 9, 2017