new_contents: import platform
  
  
  def platform_information():
      """ detect platform information from remote host """
      distro, release, codename = platform.linux_distribution()
      return (
          str(distro).rstrip(),
          str(release).rstrip(),
          str(codename).rstrip()
      )
  
  
  def machine_type():
      """ detect machine type """
      return platform.machine()
  
  
  def write_sources_list(url, codename):
      """add ceph deb repo to sources.list"""
      with file('/etc/apt/sources.list.d/ceph.list', 'w') as f:
          f.write('deb {url} {codename} main\n'.format(
                  url=url,
                  codename=codename,
                  ))
  
  
  # remoto magic, needed to execute these functions remotely
  if __name__ == '__channelexec__':
      for item in channel:  # noqa
          channel.send(eval(item))  # noqa
  
subject: add a few remotes functions in hosts