Add sudo command for non-root account to mount osd

Generally we specify the user is root when deploying ceph, it is no
problem. But if we have the need to use a non-root account, the deployment
will fail because the non-root account can't use the mount command.
I think it is necessary to add sudo for non-root account, when we can't use
the root account to deploy ceph because of security needs, we can use
non-root account to deploy ceph.

Change-Id: Iea1f30bcf8edbe15dc65909bbae780b55a669067
Closes-Bug: #1668823
This commit is contained in:
wangwei 2017-02-28 22:06:15 -05:00
parent f0811d96e3
commit 6f825382ca

View File

@ -19,6 +19,8 @@
name: "/var/lib/ceph/osd/{{ item['fs_uuid'] }}"
opts: "{{ ceph_osd_mount_options }}"
with_items: "{{ osds }}"
become: true
become_method: sudo
- name: Gathering OSD IDs
command: "cat /var/lib/ceph/osd/{{ item['fs_uuid'] }}/whoami"