-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathredeploy-devstack-vm.yml
37 lines (29 loc) · 1.01 KB
/
redeploy-devstack-vm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- name: clean up devstack VM
hosts: all
remote_user: "{{ regular_user }}"
tasks:
- name: destroy the devstack VM
command: vagrant destroy -f
args:
chdir: "{{ workspace }}/Vagrant"
- name: run Vagrant on target to launch devstack VM
command: vagrant up --no-provision
args:
chdir: "{{ workspace }}/Vagrant"
- name: install and run devstack on the VM
command: vagrant provision
args:
chdir: "{{ workspace }}/Vagrant"
- name: fetch admin credentials file
command: ansible ubuntu-devstack -m fetch -a 'src=adminrc dest=adminrc flat=true'
args:
chdir: "{{ workspace }}/Vagrant"
register: result
changed_when: result.rc ==0 and result.stdout | regex_findall('changed.* true')
- name: fetch demo credentials file
command: ansible ubuntu-devstack -m fetch -a 'src=demorc dest=demorc flat=true'
args:
chdir: "{{ workspace }}/Vagrant"
register: result
changed_when: result.rc ==0 and result.stdout | regex_findall('changed.* true')