]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
change the partition's ownership 1718/head
authoryanyx <yanyx@umcloud.com>
Thu, 27 Jul 2017 03:55:30 +0000 (11:55 +0800)
committeryanyx <yanyx@umcloud.com>
Thu, 27 Jul 2017 03:55:30 +0000 (11:55 +0800)
infrastructure-playbooks/make-osd-partitions.yml

index d348cb38056f39cfa9d3628f53408765a248b202..7dee4cc9a9ad3944e84ff6cf11a3b1f5b238e428 100644 (file)
     with_subelements:
     - "{{ devices }}"
     - partitions
+
+  - set_fact:
+      owner: 167
+      group: 167
+    when:
+      - ansible_os_family == "RedHat"
+  
+  - set_fact:
+      owner: 64045
+      group: 64045
+    when:
+      - ansible_os_family == "Debian"
+
+  - name: change partitions ownership
+    file:
+      path: "/dev/{{item.0.device_name}}{{item.1.index}}"
+      owner: "{{ owner | default('root')}}"
+      group: "{{ group | default('disk')}}"
+    with_subelements:
+      - "{{ devices }}"
+      - partitions
\ No newline at end of file