blob: 6bd31e78ee885298015188d85c1f5766d2f798bb [file] [log] [blame]
- hosts: localhost
connection: local
vars:
host_id: "{{ hostvars['controller']['nodepool']['external_id'] }}"
storprep_filename: "/tmp/storprep-bootstrap-{{ host_id }}.sh"
tasks:
- name: storprep
when: do_storprep is defined and do_storprep
block:
- name: ctrl-sp-whoami-hostname
shell:
cmd: hostname || true
- name: ctrl-sp-fetch-storprep
shell:
cmd: curl -C - -o '{{ storprep_filename }}' -- https://spfactory.storpool.com/sp-osci/storprep-bootstrap-sh.txt
- name: run_storprep
block:
- name: Create a Temporary Directory
ansible.builtin.tempfile:
state: directory
prefix: storprep-bootstrap.
register: tmpdir
- name: Provision OpenStack Data
no_log: true
ansible.builtin.copy:
content: "{{ OPENSTACK_DATA['v'] }}"
dest: "{{ tmpdir.path }}/clouds.yaml"
mode: '0600'
- name: ctrl-sp-run-storprep
shell:
cmd: sh '{{ storprep_filename }}' -d '{{ tmpdir.path }}' -- -n lab-charmed-testing-storage -s lab-vlan400 -- {{ host_id }}
always:
- name: Remove the Temporary Directory
ansible.builtin.file:
path: "{{ tmpdir.path }}"
state: absent
when: tmpdir.path is defined
- name: ctrl-sp-rm-storprep
shell:
cmd: rm -- '{{ storprep_filename }}'
- name: ctrl-sp-processes
shell:
cmd: ps awwfux
- hosts: tempest
vars:
homedir: "{{ ansible_env.HOME }}"
tasks:
- name: sp-examine-pwd
shell:
cmd: pwd
- name: sp-examine-ls-homedir
shell:
cmd: ls -l {{ homedir }}
- name: sp-examine-ls-homedir-src
shell:
cmd: ls -l {{ homedir }}/src
- name: sp-examine-ls-homedir/src/spfactory.storpool.com
shell:
cmd: ls -l {{ homedir }}/src/spfactory.storpool.com
- name: Apply the StorPool patches
shell:
cmd: "{{ homedir }}/src/spfactory.storpool.com/sp-osci/tools/bin/git-if-needed -s {{ homedir }}/src/spfactory.storpool.com/sp-osci/patches/series -S am"
chdir: /opt/stack
when: sp_experimental is not defined or not sp_experimental
become: true
become_user: stack
- name: Apply the StorPool experimental patches
shell:
cmd: "{{ homedir }}/src/spfactory.storpool.com/sp-osci/tools/bin/git-if-needed -s {{ homedir }}/src/spfactory.storpool.com/sp-osci/patches/series.experimental -S am"
chdir: /opt/stack
when: sp_experimental is defined and sp_experimental
become: true
become_user: stack
- name: Apply the StorPool patches to the other place
shell:
cmd: "{{ homedir }}/src/spfactory.storpool.com/sp-osci/tools/bin/git-if-needed -s {{ homedir }}/src/spfactory.storpool.com/sp-osci/patches/series am"
chdir: "{{ homedir }}/src/opendev.org"
when: sp_experimental is not defined or not sp_experimental
- name: Apply the StorPool experimental patches to the other place
shell:
cmd: "{{ homedir }}/src/spfactory.storpool.com/sp-osci/tools/bin/git-if-needed -s {{ homedir }}/src/spfactory.storpool.com/sp-osci/patches/series.experimental am"
chdir: "{{ homedir }}/src/opendev.org"
when: sp_experimental is defined and sp_experimental
# - name: Set up the random StorPool volume prefix
# shell:
# cmd: "{{ homedir }}/src/spfactory.storpool.com/sp-osci/tools/bin/sp_rand_init"
# become: true
- hosts: all
tasks:
- name: sp-processes
shell:
cmd: ps awwfux