Ansible:无法在特殊模式下定义var

Ansible:无法在特殊模式下定义var,ansible,Ansible,我只想定义一个名为“a”且值为“b”的变量 与ansible 2.3.2.0一起使用: $ ansible test -m shell -a 'a="b"; echo $a' test | SUCCESS | rc=0 >> b 与ansible 2.3.2.0配合使用 $ ansible test -m shell -a 'a="b"; echo $a' test | SUCCESS | rc=0 >> b 这是我的主机[rcp]原子这是我的主机[rcp]原子

我只想定义一个名为“a”且值为“b”的变量

ansible 2.3.2.0一起使用:

$ ansible test -m shell -a 'a="b"; echo $a'
test | SUCCESS | rc=0 >>
b

与ansible 2.3.2.0配合使用

$ ansible test -m shell -a 'a="b"; echo $a'
test | SUCCESS | rc=0 >>
b

这是我的主机[rcp]原子这是我的主机[rcp]原子