你好,我想将以下内容作为Ansible任务执行以在本地拉取最新的提交ID:
- name: get latest git commit id
local_action: "command git rev-parse HEAD"
register: git_commit_id
但我使用了
command
,导致出现警告。因为git
是ansible核心模块: http://docs.ansible.com/ansible/git_module.html。我该如何使用git模块来执行此操作?
local_action: "shell git rev-parse HEAD warn=no"
- Ankit