首页 > 其他 > 详细

ansible切换目录

时间:2019-01-18 21:43:40      阅读:1667      评论:0      收藏:0      [点我收藏+]

切换目录并且创建文件

1、使用shell模块操作

[root@master ~]# ansible k8s -m shell -a "chdir=/rubbish touch test.conf"

2、使用command操作

[root@master ~]# ansible k8s -m command -a "chdir=/rubbish touch test.conf"

 

ansible切换目录

原文:https://www.cnblogs.com/effortsing/p/10289796.html

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