blob: 7765af4f5632d458836e735b146bc208f9c6309d [file] [log] [blame]
Peter Pentchev7b8acdc2022-11-11 11:32:02 +02001- hosts: localhost
2 connection: local
Peter Pentchevafc36372022-11-15 12:22:05 +02003 vars:
Peter Pentchev5243a992022-11-22 15:15:52 +02004 host_id: "{{ hostvars['controller']['nodepool']['external_id'] }}"
Peter Pentchevafc36372022-11-15 12:22:05 +02005 storprep_filename: "/tmp/storprep-bootstrap-{{ host_id }}.sh"
Peter Pentchev7b8acdc2022-11-11 11:32:02 +02006 tasks:
Peter Pentchev18f67c62022-11-14 14:09:09 +02007 - name: ctrl-sp-whoami-hostname
8 shell:
Peter Pentchev03989dd2022-11-15 10:35:42 +02009 cmd: hostname || true
Peter Pentchev18f67c62022-11-14 14:09:09 +020010
Peter Pentchevff460a52022-11-15 11:47:40 +020011 - name: ctrl-sp-fetch-storprep
Peter Pentchev18f67c62022-11-14 14:09:09 +020012 shell:
Peter Pentchevafc36372022-11-15 12:22:05 +020013 cmd: curl -C - -o '{{ storprep_filename }}' -- https://spfactory.storpool.com/sp-osci/storprep-bootstrap-sh.txt
Peter Pentchev18f67c62022-11-14 14:09:09 +020014
Peter Pentchevff460a52022-11-15 11:47:40 +020015 - name: ctrl-sp-run-storprep
Peter Pentchev18f67c62022-11-14 14:09:09 +020016 shell:
Peter Pentchevc3fd7132022-12-07 17:17:24 +020017 cmd: sh '{{ storprep_filename }}' -- -n lab-charmed-testing-storage -s lab-vlan400 -- {{ host_id }}
Peter Pentchevafc36372022-11-15 12:22:05 +020018
19 - name: ctrl-sp-rm-storprep
20 shell:
21 cmd: rm -- '{{ storprep_filename }}'
Peter Pentchev1a318ae2022-11-11 11:24:39 +020022
Peter Pentchev251b1f52022-11-18 10:52:30 +020023 - name: ctrl-sp-processes
24 shell:
25 cmd: ps awwfux
26
Peter Pentchev5243a992022-11-22 15:15:52 +020027- hosts: all
Peter Pentchev251b1f52022-11-18 10:52:30 +020028 tasks:
Peter Pentchev1e7ec642022-11-22 14:25:21 +020029 - name: sp-examine-pwd
30 shell:
31 cmd: pwd
32
33 - name: sp-examine-ls-zuul
34 shell:
35 cmd: ls -l /home/zuul
36
37 - name: sp-examine-ls-zuul-src
38 shell:
39 cmd: ls -l /home/zuul/src
40
41 - name: sp-examine-ls-zuul/src/spfactory.storpool.com
42 shell:
43 cmd: ls -l /home/zuul/src/spfactory.storpool.com
44
Peter Pentchev251b1f52022-11-18 10:52:30 +020045 - name: Apply the StorPool patches
46 shell:
Peter Pentchev4bd0dd12023-01-13 11:35:00 +020047 cmd: /home/zuul/src/spfactory.storpool.com/sp-osci/tools/bin/git-if-needed -s /home/zuul/src/spfactory.storpool.com/sp-osci/patches/series -S am
48 chdir: /opt/stack
49 when: sp_experimental is not defined or not sp_experimental
50 become: true
51 become_user: stack
52
53 - name: Apply the StorPool experimental patches
54 shell:
Peter Pentchev251b1f52022-11-18 10:52:30 +020055 cmd: /home/zuul/src/spfactory.storpool.com/sp-osci/tools/bin/git-if-needed -s /home/zuul/src/spfactory.storpool.com/sp-osci/patches/series.experimental -S am
56 chdir: /opt/stack
Peter Pentchev4bd0dd12023-01-13 11:35:00 +020057 when: sp_experimental is defined and sp_experimental
Peter Pentchev251b1f52022-11-18 10:52:30 +020058 become: true
59 become_user: stack
60
61 - name: Apply the StorPool patches to the other place
62 shell:
Peter Pentchev9c89b012023-01-17 15:39:38 +020063 cmd: /home/zuul/src/spfactory.storpool.com/sp-osci/tools/bin/git-if-needed -s /home/zuul/src/spfactory.storpool.com/sp-osci/patches/series am
Peter Pentchev251b1f52022-11-18 10:52:30 +020064 chdir: /home/zuul/src/opendev.org
Peter Pentchev4bd0dd12023-01-13 11:35:00 +020065 when: sp_experimental is not defined or not sp_experimental
66
67 - name: Apply the StorPool experimental patches to the other place
68 shell:
69 cmd: /home/zuul/src/spfactory.storpool.com/sp-osci/tools/bin/git-if-needed -s /home/zuul/src/spfactory.storpool.com/sp-osci/patches/series.experimental am
70 chdir: /home/zuul/src/opendev.org
71 when: sp_experimental is defined and sp_experimental
Peter Pentchev251b1f52022-11-18 10:52:30 +020072
73# - name: Set up the random StorPool volume prefix
74# shell:
75# cmd: /home/zuul/src/spfactory.storpool.com/sp-osci/tools/bin/sp_rand_init
76# become: true
77
Peter Pentchev7b8acdc2022-11-11 11:32:02 +020078- hosts: all
79 tasks:
Peter Pentchev1a318ae2022-11-11 11:24:39 +020080 - name: sp-processes
81 shell:
82 cmd: ps awwfux