From e579659699b4571a69990efc5861914e4701a4f6 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Sat, 22 Apr 2017 22:19:27 +0800 Subject: Unify workdir - use role variable `workdir` - download dependencies to remote workdir with checksum Change-Id: I2a7991e014e365fec532520c2b57a3fe480914d8 Signed-off-by: Yujun Zhang --- .../ansible_roles/qtip-workspace/defaults/main.yml | 1 + .../qtip-workspace/files/custom/ansible.cfg | 4 +++- .../qtip-workspace/files/custom/group_vars/all.yml | 3 ++- .../qtip-workspace/files/defaults/teardown.yml | 19 +++++++++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 resources/ansible_roles/qtip-workspace/files/defaults/teardown.yml (limited to 'resources/ansible_roles/qtip-workspace') diff --git a/resources/ansible_roles/qtip-workspace/defaults/main.yml b/resources/ansible_roles/qtip-workspace/defaults/main.yml index 01923073..102a706e 100644 --- a/resources/ansible_roles/qtip-workspace/defaults/main.yml +++ b/resources/ansible_roles/qtip-workspace/defaults/main.yml @@ -17,3 +17,4 @@ installer_master_group: workspace: "workspace" qtip_package: ../../.. +qtip_cache: .qtip-cache \ No newline at end of file diff --git a/resources/ansible_roles/qtip-workspace/files/custom/ansible.cfg b/resources/ansible_roles/qtip-workspace/files/custom/ansible.cfg index 220cf0b3..a80d4ae4 100644 --- a/resources/ansible_roles/qtip-workspace/files/custom/ansible.cfg +++ b/resources/ansible_roles/qtip-workspace/files/custom/ansible.cfg @@ -223,7 +223,9 @@ filter_plugins = {{ qtip_package }}/qtip/ansible_library/plugins/filter # wanting to use, for example, IP information from one group of servers # without having to talk to them in the same playbook run to get their # current IP information. -#fact_caching = memory +fact_caching = jsonfile +fact_caching_connection = {{ qtip_cache }} +fact_caching_timeout = 86400 # retry files diff --git a/resources/ansible_roles/qtip-workspace/files/custom/group_vars/all.yml b/resources/ansible_roles/qtip-workspace/files/custom/group_vars/all.yml index d85eaabf..0f9016b4 100644 --- a/resources/ansible_roles/qtip-workspace/files/custom/group_vars/all.yml +++ b/resources/ansible_roles/qtip-workspace/files/custom/group_vars/all.yml @@ -11,7 +11,8 @@ qtip_resources: "{{ qtip_package }}/resources" qtip_results: results qtip_fixtures: fixtures qtip_dump: dump -qtip_cache: .cache +qtip_cache: "{{ qtip_cache }}" +qtip_workdir: "qtip-workdir-{{ lookup('pipe', 'date +%Y%m%d-%H%M') }}" installer_master_group: fuel: fuel-masters apex: apex-underclouds diff --git a/resources/ansible_roles/qtip-workspace/files/defaults/teardown.yml b/resources/ansible_roles/qtip-workspace/files/defaults/teardown.yml new file mode 100644 index 00000000..4d51b64f --- /dev/null +++ b/resources/ansible_roles/qtip-workspace/files/defaults/teardown.yml @@ -0,0 +1,19 @@ +############################################################################## +# Copyright (c) 2017 ZTE Corporation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +- hosts: compute + + vars_prompt: + - name: remove_workdir + prompt: "WARNING: remove work dir from system under test? (yes|no)" + default: no + + roles: + # teardown environment + - { role: qtip, tasks: teardown } -- cgit 1.2.3-korg