Skip to content

Instantly share code, notes, and snippets.

@bodepd
Created October 7, 2014 06:57
Show Gist options
  • Save bodepd/4138e3aad28d2828cf52 to your computer and use it in GitHub Desktop.
Save bodepd/4138e3aad28d2828cf52 to your computer and use it in GitHub Desktop.
exec { 'ceph-admin-key':
command => "ceph-authtool /etc/ceph/keyring \
--create-keyring \
--name=client.admin \
--add-key \
$(ceph --name mon. --keyring ${mon_data_real}/keyring \
auth get-or-create-key client.admin \
mon 'allow *' \
osd 'allow *' \
mds allow)",
creates => '/etc/ceph/keyring',
require => [Package['ceph'],Service["ceph-mon.${name}"]],
onlyif => "ceph --admin-daemon /var/run/ceph/ceph-mon.${name}.asok \
mon_status|egrep -v '\"state\": \"(leader|peon)\"'",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment