From a3e333454755ac99d3b64aedd7edb36fc51a8216 Mon Sep 17 00:00:00 2001 From: Peter Gehres Date: Mon, 23 Sep 2013 14:08:16 -0700 Subject: [PATCH] Refactored implementation to make use of caching and to limit the number of connections to external cobbler server for performance. Added use of cobbler.ini file to configure settings. Tested against Cobbler 2.4.0 --- plugins/inventory/cobbler.ini | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 plugins/inventory/cobbler.ini diff --git a/plugins/inventory/cobbler.ini b/plugins/inventory/cobbler.ini new file mode 100644 index 00000000000..b7b63595dec --- /dev/null +++ b/plugins/inventory/cobbler.ini @@ -0,0 +1,20 @@ +# Ansible Cobbler external inventory script settings +# + +[cobbler] + +host = http://PATH_TO_COBBLER_SERVER/cobbler_api + +# API calls to Cobbler can be slow. For this reason, we cache the results of an API +# call. Set this to the path you want cache files to be written to. Two files +# will be written to this directory: +# - ansible-cobbler.cache +# - ansible-cobbler.index +cache_path = /tmp + +# The number of seconds a cache file is considered valid. After this many +# seconds, a new API call will be made, and the cache file will be updated. +cache_max_age = 900 + + +