From 0da70720ea163f7f3eb0e77f64b65213a1b96978 Mon Sep 17 00:00:00 2001 From: Valentin Gologuzov Date: Fri, 3 Apr 2015 18:39:16 +0200 Subject: [PATCH] [copr] updating terminatepb --- .../files/provision/terminatepb_nova.yml | 17 +++++++++++++++++ roles/copr/backend/templates/copr-be.conf.j2 | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 roles/copr/backend/files/provision/terminatepb_nova.yml diff --git a/roles/copr/backend/files/provision/terminatepb_nova.yml b/roles/copr/backend/files/provision/terminatepb_nova.yml new file mode 100644 index 0000000000..8d4a2ee0a9 --- /dev/null +++ b/roles/copr/backend/files/provision/terminatepb_nova.yml @@ -0,0 +1,17 @@ +- name: terminate instance + hosts: 127.0.0.1 + gather_facts: False + + vars_files: + - nova_cloud_vars.yml + + tasks: + - name: terminate nova_compute + local_action: + module: nova_compute + auth_url: "{{OS_AUTH_URL}}" + login_username: "{{OS_USERNAME}}" + login_password: "{{OS_PASSWORD}}" + login_tenant_name: "{{OS_TENANT_NAME}}" + name: "{{ vm_name }}" + state: absent diff --git a/roles/copr/backend/templates/copr-be.conf.j2 b/roles/copr/backend/templates/copr-be.conf.j2 index ab8fa7b57d..c2f834db04 100644 --- a/roles/copr/backend/templates/copr-be.conf.j2 +++ b/roles/copr/backend/templates/copr-be.conf.j2 @@ -21,7 +21,7 @@ group0_archs=i386,x86_64 group0_spawn_playbook=/home/copr/provision/builderpb_nova.yml # path to ansible playbook which terminate builder # default is /etc/copr/terminate_playbook.yml -group0_terminate_playbook=/home/copr/provision/terminatepb.yml +group0_terminate_playbook=/home/copr/provision/terminatepb_nova.yml group0_max_workers=4