码迷,mamicode.com
首页 > 其他好文 > 详细

ansible切换目录

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

标签:root   dir   roo   shel   切换目录   模块   man   nbsp   shell   

切换目录并且创建文件

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切换目录

标签:root   dir   roo   shel   切换目录   模块   man   nbsp   shell   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!