def save
      Dir.chdir(@gl_admin.working_dir) do
        #Process config file (if loaded, i.e. may be modified)
        if @config
          new_conf = @config.to_file(@confdir)
          @gl_admin.add(new_conf)
        end

        #Process ssh keys (if loaded, i.e. may be modified)
        if @ssh_keys
          files = list_keys(@keydir).map{|f| File.basename f}
          keys = @ssh_keys.values.map{|f| f.map {|t| t.filename}}.flatten

          to_remove = (files - keys).map { |f| File.join(@keydir, f)}
          @gl_admin.remove(to_remove)

          @ssh_keys.each_value do |key|
            #Write only keys from sets that has been modified
            next if key.respond_to?(:dirty?) && !key.dirty?
            key.each do |k|
              @gl_admin.add(k.to_file(@keydir))
            end
          end
        end
      end
    end
def save
      Dir.chdir(@gl_admin.working_dir) do
        #Process config file (if loaded, i.e. may be modified)
        if @config
          new_conf = @config.to_file(@confdir)
          @gl_admin.add(new_conf)
        end

        #Process ssh keys (if loaded, i.e. may be modified)
        if @ssh_keys
          files = list_keys(@keydir).map{|f| File.basename f}
          keys = @ssh_keys.values.map{|f| f.map {|t| t.filename}}.flatten

          to_remove = (files - keys).map { |f| File.join(@keydir, f)}
          @gl_admin.remove(to_remove)

          @ssh_keys.each_value do |key|
            #Write only keys from sets that has been modified
            next if key.respond_to?(:dirty?) && !key.dirty?
            key.each do |k|
              @gl_admin.add(k.to_file(@keydir))
            end
          end
        end
      end
    end
Writes all changed aspects out to the file system
will also stage all changes