ansible模块--archive模块

网友投稿 605 2022-10-10

ansible模块--archive模块

ansible模块--archive模块

path:源路径,准备打包的文件dest:打成什么格式的包,放到什么位置mode:权限

[root@ansible tmp]# ansible mysql -m archive -a 'path=/var/log/*.log dest=/tmp/logs.tar.gz'192.168.56.88 | CHANGED => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "archived": [ "/var/log/boot.log", "/var/log/yum.log" ], "arcroot": "/var/log/", "changed": true, "dest": "/tmp/logs.tar.gz", "expanded_exclude_paths": [], "expanded_paths": [ "/var/log/boot.log", "/var/log/yum.log" ], "gid": 0, "group": "root", "missing": [], "mode": "0644", "owner": "root", "size": 149, "state": "file", "uid": 0}

带权限打包

[root@ansible tmp]# ansible mysql -m archive -a 'path=/var/log/*.log dest=/tmp/logs.tar.gz mode=777'192.168.56.88 | CHANGED => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "archived": [ "/var/log/boot.log", "/var/log/yum.log" ], "arcroot": "/var/log/", "changed": true, "dest": "/tmp/logs.tar.gz", "expanded_exclude_paths": [], "expanded_paths": [ "/var/log/boot.log", "/var/log/yum.log" ], "gid": 0, "group": "root", "missing": [], "mode": "0777", "owner": "root", "size": 149, "state": "file", "uid": 0}

ansible

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Wafer - 企业级微信小程序全栈方案(wafer和die的区别)
下一篇:微信小程序云开发-旅游邀请函(旅游小程序简介)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~