mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Allow user to specify a configuration file in VMPOOLER_CONFIG_FILE
variable Previously, there were two ways to configure Vmpooler, either by changing the contents of vmpooler.yaml or by assigning the raw YAML to the VMPOOLER_CONFIG environment variable. This commit adds a new environment variable called VMPOOLER_CONFIG_FILE that can be assigned the name of a config file to use. Also fixes #240 by whitelisting the Symbol class when calling YAML.safe_load in Vmpooler.config.
This commit is contained in:
parent
28922df28e
commit
878c93f646
8 changed files with 152 additions and 13 deletions
41
spec/fixtures/vmpooler.yaml
vendored
Normal file
41
spec/fixtures/vmpooler.yaml
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
:providers:
|
||||
:dummy:
|
||||
|
||||
:redis:
|
||||
server: 'localhost'
|
||||
|
||||
:auth:
|
||||
provider: dummy
|
||||
|
||||
:tagfilter:
|
||||
url: '(.*)\/'
|
||||
|
||||
:config:
|
||||
site_name: 'vmpooler'
|
||||
# Need to change this on Windows
|
||||
logfile: '/var/log/vmpooler.log'
|
||||
task_limit: 10
|
||||
timeout: 15
|
||||
vm_checktime: 15
|
||||
vm_lifetime: 12
|
||||
vm_lifetime_auth: 24
|
||||
allowed_tags:
|
||||
- 'created_by'
|
||||
- 'project'
|
||||
domain: 'company.com'
|
||||
prefix: 'poolvm-'
|
||||
|
||||
# Uncomment the lines below to suppress metrics to STDOUT
|
||||
# :statsd:
|
||||
# server: 'localhost'
|
||||
# prefix: 'vmpooler'
|
||||
# port: 8125
|
||||
|
||||
:pools:
|
||||
- name: 'pool01'
|
||||
size: 5
|
||||
provider: dummy
|
||||
- name: 'pool02'
|
||||
size: 5
|
||||
provider: dummy
|
||||
Loading…
Add table
Add a link
Reference in a new issue