ansible中变量使用

[root@localhost ansible]# cat var.yml
---
- hosts: k1
remote_user: root
vars:
var1: "ls -l />/root/wang20201029.log"
tasks:
- name: ls
shell: "{{var1}}"

posted @ 2020-10-29 14:55  水中鱼2018  阅读(73)  评论(0编辑  收藏  举报