Module: VpsAdminOS::Converter::Exporter::Mixin

Included in:
Base, Tar, Zfs
Defined in:
lib/vpsadminos-converter/exporter.rb

Instance Method Summary collapse

Instance Method Details

#dump_configsObject



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/vpsadminos-converter/exporter.rb', line 6

def dump_configs
  tar.mkdir('config', OsCtl::Lib::Exporter::Base::DIR_MODE)
  tar.add_file('config/user.yml', OsCtl::Lib::Exporter::Base::FILE_MODE) do |tf|
    tf.write(YAML.dump(ct.user.dump_config))
  end
  tar.add_file('config/group.yml', OsCtl::Lib::Exporter::Base::FILE_MODE) do |tf|
    tf.write(YAML.dump(ct.group.dump_config))
  end
  tar.add_file('config/container.yml', OsCtl::Lib::Exporter::Base::FILE_MODE) do |tf|
    tf.write(YAML.dump(ct.dump_config))
  end
end