code: def migrate_passwords_to_leader_storage(self, excludes=None):
          
          if not is_leader():
              log("Skipping password migration as not the lead unit",
                  level=DEBUG)
              return
          dirname = os.path.dirname(self.root_passwd_file_template)
          path = os.path.join(dirname, '*.passwd')
          for f in glob.glob(path):
              if excludes and f in excludes:
                  log("Excluding %s from leader storage migration" % (f),
                      level=DEBUG)
                  continue
  
              key = os.path.basename(f)
              with open(f, 'r') as passwd:
                  _value = passwd.read().strip()
  
              try:
                  leader_set(settings={key: _value})
  
                  if self.delete_ondisk_passwd_file:
                      os.unlink(f)
              except ValueError:
                  # NOTE cluster relation not yet ready - skip for now
                  pass
docs: Migrate any passwords storage on disk to leader storage.