ansible all -m authorized_key -a 'name=automation key="{{lookup('file','/home/automation/.ssh/id.pub') }}' -C
ansible all -m authorized_key -a 'name=automation key="{{lookup('file','/home/automation/.ssh/id.pub') }}' -CD
ansible all -m authorized_key -a 'name=automation key=' {{lookup('file','/home/automation/.ssh/id.pub') }}' -CD
ansible all -m authorized_key -a "name=automation key=' {{lookup('file','/home/automation/.ssh/id.pub') }}" -CD
错误!拆分参数失败,无论是不平衡的 jinja2 块还是引号:name=automation key=' {{lookup('file','/home/automation/.ssh/id.pub') }}
我尝试了所有这些组合,但没有一个有效。
实现这一目标的正确方法是什么?