Instead of hard-coding "-i /etc/ceph/ceph.osd.#{osd_index}.keyring", I would use node[:ceph][:clustername]:

  -i /etc/ceph/#{node[:ceph][:clustername]}.osd.#{osd_index}.keyring