ZhangZhihui's Blog  

2020年12月14日

摘要: [WARNING]: Consider using the replace, lineinfile or template module rather than running 'sed'. If you need to use command because replace, lineinfile 阅读全文
posted @ 2020-12-14 17:15 ZhangZhihuiAAA 阅读(336) 评论(0) 推荐(0) 编辑
 
摘要: scnzzh@ZUBT1:~/zzh$ cat test.yml - name: Test Play hosts: zubt1 tasks: - name: test shell: pwd register: result - debug: msg: "{{ result.stdout }}" sc 阅读全文
posted @ 2020-12-14 15:49 ZhangZhihuiAAA 阅读(129) 评论(0) 推荐(0) 编辑
 
摘要: - hosts: zubt1 tasks: - name: Get current user shell: whoami register: current_user_nobecome - name: Get current user with become is true shell: whoam 阅读全文
posted @ 2020-12-14 11:59 ZhangZhihuiAAA 阅读(187) 评论(0) 推荐(0) 编辑