From: yanyx Date: Wed, 2 Aug 2017 03:01:26 +0000 (+0800) Subject: fix for nvme part path X-Git-Tag: v3.0.0rc1~9^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1738%2Fhead;p=ceph-ansible.git fix for nvme part path --- diff --git a/infrastructure-playbooks/make-osd-partitions.yml b/infrastructure-playbooks/make-osd-partitions.yml index 7dee4cc9a..0fc6892d2 100644 --- a/infrastructure-playbooks/make-osd-partitions.yml +++ b/infrastructure-playbooks/make-osd-partitions.yml @@ -82,4 +82,18 @@ group: "{{ group | default('disk')}}" with_subelements: - "{{ devices }}" - - partitions \ No newline at end of file + - partitions + when: + item.0.device_name | match('/dev/([hsv]d[a-z]{1,2}){1,2}$') + + - name: change partitions ownership + file: + path: "/dev/{{item.0.device_name}}p{{item.1.index}}" + owner: "{{ owner | default('root')}}" + group: "{{ group | default('disk')}}" + with_subelements: + - "{{ devices }}" + - partitions + when: + item.0.device_name | match('/dev/(cciss/c[0-9]d[0-9]|nvme[0-9]n[0-9]){1,2}$') +... \ No newline at end of file