Merge "Fix check for existing nvdimm namespaces"
This commit is contained in:
commit
4b1dce2c70
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Due to the use of a folding block operator instead of the literal block
|
||||||
|
operator the check for existing namespaces does not work correct and
|
||||||
|
namespaces get created on subsequent deploy runs even if they already
|
||||||
|
exist. Now namespaces won't get created if the are already there.
|
|
@ -15,15 +15,15 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
- name: list current namespaces
|
- name: list current namespaces
|
||||||
shell: >-
|
shell: |
|
||||||
ndctl list -X | jq ".[].name"
|
ndctl list -X | jq -r ".[].name"
|
||||||
register: namespaces
|
register: namespaces
|
||||||
changed_when: false
|
changed_when: false
|
||||||
- name: create namespace
|
- name: create namespace
|
||||||
command: >-
|
command: >-
|
||||||
ndctl create-namespace -s {{ input[0] }} -m devdax -M mem -n {{ input[1] }}
|
ndctl create-namespace -s {{ input[0] }} -m devdax -M mem -n {{ input[1] }}
|
||||||
when:
|
when:
|
||||||
- namespaces.stdout is defined
|
- namespaces.stdout_lines is defined
|
||||||
- input[1] not in namespaces.stdout
|
- input[1] not in namespaces.stdout_lines
|
||||||
register: ret
|
register: ret
|
||||||
changed_when: ret.rc == 0
|
changed_when: ret.rc == 0
|
||||||
|
|
Loading…
Reference in New Issue