首页 > 其他 > 详细

Saltstack module container_resource 详解

时间:2020-03-28 20:47:23      阅读:47      评论:0      收藏:0      [点我收藏+]

container_resource.cache_file

Wrapper for cp.cache_file which raises an error if the file was unable to
be cached.

CLI Example:

    salt myminion container_resource.cache_file salt://foo/bar/baz.txt

container_resource.run

Common logic for running shell commands in containers

path
    path to the container parent (for LXC only)
    default: /var/lib/lxc (system default)

CLI Example:

    salt myminion container_resource.run mycontainer ‘ps aux‘ container_type=docker exec_driver=nsenter output=stdout

container_resource.copy_to

Common logic for copying files to containers

path
    path to the container parent (for LXC only)
    default: /var/lib/lxc (system default)

CLI Example:

    salt myminion container_resource.copy_to mycontainer /local/file/path /container/file/path container_type=docker exec_driver=nsenter

Saltstack module container_resource 详解

原文:https://www.cnblogs.com/randomlee/p/Saltstack_module_container_resource.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!