buildpackages: provision a small build machine for tests

Signed-off-by: Loic Dachary <loic@dachary.org>
This commit is contained in:
Loic Dachary 2016-03-19 10:57:50 +01:00
parent 6429e2b703
commit 1cc657798a
2 changed files with 18 additions and 0 deletions

View File

@ -2,6 +2,11 @@
overrides:
ansible.cephlab:
playbook: users.yml
buildpackages:
machine:
disk: 10 # GB
ram: 1000 # MB
cpus: 1
roles:
- [client.0]
tasks:

View File

@ -123,12 +123,25 @@ def task(ctx, config):
ram: 15000 # MB
cpus: 16
- install:
When a buildpackages task is already included, the values it contains can be
overriden with:
overrides:
buildpackages:
machine:
disk: 10 # GB
ram: 1000 # MB
cpus: 1
"""
log.info('Beginning buildpackages...')
if config is None:
config = {}
assert isinstance(config, dict), \
'task only accepts a dict for config not ' + str(config)
overrides = ctx.config.get('overrides', {})
misc.deep_merge(config, overrides.get('buildpackages', {}))
d = os.path.join(os.path.dirname(__file__), 'buildpackages')
os_type = misc.get_distro(ctx)
os_version = misc.get_distro_version(ctx)