From be9c5d50f4bf39e6fcc130d18b1c3d84130a3229 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Mon, 14 Sep 2015 18:27:48 -0500 Subject: [PATCH] adds the config_template to tempest The change modifies the tempest template tasks such that it's now using the config_template action plugin. This change will make so that config files can be dynamically updated, by a deployer, at run time, without requiring the need to modify the in tree templates or defaults. Partially implements: blueprint tunable-openstack-configuration Change-Id: I3b664fcec14bf01f9916ced0b8595a57d4873f79 --- playbooks/roles/os_tempest/defaults/main.yml | 3 +++ .../os_tempest/tasks/tempest_post_install.yml | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/os_tempest/defaults/main.yml b/playbooks/roles/os_tempest/defaults/main.yml index 793cda74f8..9ddc703d3d 100644 --- a/playbooks/roles/os_tempest/defaults/main.yml +++ b/playbooks/roles/os_tempest/defaults/main.yml @@ -107,3 +107,6 @@ tempest_images: tempest_enable_instance_password: True tempest_pip_instructions: "--isolated" + +## Tunable overrides +tempest_tempest_conf_overrides: {} diff --git a/playbooks/roles/os_tempest/tasks/tempest_post_install.yml b/playbooks/roles/os_tempest/tasks/tempest_post_install.yml index c26e4eb184..9965d1140b 100644 --- a/playbooks/roles/os_tempest/tasks/tempest_post_install.yml +++ b/playbooks/roles/os_tempest/tasks/tempest_post_install.yml @@ -78,6 +78,23 @@ - tempest-image - tempest-image-unarchive +- name: Copy tempest config + config_template: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + owner: "root" + group: "root" + mode: "0644" + config_overrides: "{{ item.config_overrides }}" + config_type: "{{ item.config_type }}" + with_items: + - src: "tempest.conf.j2" + dest: "{{ tempest_git_dest }}/etc/tempest.conf" + config_overrides: "{{ tempest_tempest_conf_overrides }}" + config_type: "ini" + tags: + - tempest-config + - name: Generate tempest Config template: src: "{{ item.src }}" @@ -86,7 +103,6 @@ group: "root" mode: "{{ item.mode|default('0644') }}" with_items: - - { src: "tempest.conf.j2", dest: "{{ tempest_git_dest }}/etc/tempest.conf" } - { src: openstack_tempest_gate.sh.j2, dest: /opt/openstack_tempest_gate.sh, mode: "0755" } tags: - tempest-config