running an ansible local task in a remote playbook

戏子无情 提交于 2019-12-03 22:32:20

The format for local_action is:

local_action: <module_name> <arguments>

In your example, Ansible thinks you are trying to use the git module and throws an error because you don't have the correct arguments for the git module. Here is how it should look:

local_action: shell git branch | awk '/^\*/{print $2}'

Source: http://docs.ansible.com/playbooks_delegation.html#delegation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!