parameters: (ctx, config)
docstring: Distribute a sufficient config and keyring for clients
docstring_summary: Distribute a sufficient config and keyring for clients
docstring_tokens: Distribute a sufficient config and keyring for clients
function: def distribute_config_and_admin_keyring(ctx, config):
      """
      Distribute a sufficient config and keyring for clients
      """
      cluster_name = config['cluster']
      log.info('Distributing (final) config and client.admin keyring...')
      for remote, roles in ctx.cluster.remotes.items():
          remote.write_file(
              '/etc/ceph/{}.conf'.format(cluster_name),
              ctx.ceph[cluster_name].config_file,
              sudo=True)
          remote.write_file(
              path='/etc/ceph/{}.client.admin.keyring'.format(cluster_name),
              data=ctx.ceph[cluster_name].admin_keyring,
              sudo=True)
      try:
          yield
      finally:
          ctx.cluster.run(args=[
              'sudo', 'rm', '-f',
              '/etc/ceph/{}.conf'.format(cluster_name),
              '/etc/ceph/{}.client.admin.keyring'.format(cluster_name),
          ])
function_tokens: def distribute_config_and_admin_keyring ( ctx , config ) : cluster_name = config [ 'cluster' ] log . info ( 'Distributing (final) config and client.admin keyring...' ) for remote , roles in ctx . cluster . remotes . items ( ) : remote . write_file ( '/etc/ceph/{}.conf' . format ( cluster_name ) , ctx . ceph [ cluster_name ] . config_file , sudo = True ) remote . write_file ( path = '/etc/ceph/{}.client.admin.keyring' . format ( cluster_name ) , data = ctx . ceph [ cluster_name ] . admin_keyring , sudo = True ) try : yield finally : ctx . cluster . run ( args = [ 'sudo' , 'rm' , '-f' , '/etc/ceph/{}.conf' . format ( cluster_name ) , '/etc/ceph/{}.client.admin.keyring' . format ( cluster_name ) , ] )