Store the storprep bootstrap tool in /tmp
Change-Id: Idc483c23fc83b9eb31f800ee5c9607e64e67ae31
diff --git a/playbooks/sp-init.yaml b/playbooks/sp-init.yaml
index 56d5729..274c22b 100644
--- a/playbooks/sp-init.yaml
+++ b/playbooks/sp-init.yaml
@@ -18,6 +18,9 @@
- hosts: localhost
connection: local
+ vars:
+ host_id: "{{ hostvars['tempest']['nodepool']['external_id'] }}"
+ storprep_filename: "/tmp/storprep-bootstrap-{{ host_id }}.sh"
tasks:
- name: ctrl-sp-whoami-hostname
shell:
@@ -25,11 +28,15 @@
- name: ctrl-sp-fetch-storprep
shell:
- cmd: curl -C - -o storprep-bootstrap.sh -- https://spfactory.storpool.com/sp-osci/storprep-bootstrap-sh.txt
+ cmd: curl -C - -o '{{ storprep_filename }}' -- https://spfactory.storpool.com/sp-osci/storprep-bootstrap-sh.txt
- name: ctrl-sp-run-storprep
shell:
- cmd: sh storprep-bootstrap.sh -- -n lab-charmed-testing-storage -s lab-vlan400 -- {{ hostvars['tempest']['nodepool']['external_id'] }}
+ cmd: sh '{{ storprep_filename }}' -- -n lab-charmed-testing-storage -s lab-vlan400 -- {{ host_id }}
+
+ - name: ctrl-sp-rm-storprep
+ shell:
+ cmd: rm -- '{{ storprep_filename }}'
- hosts: all
tasks: