Is it possible to execute "git submodule update" without "command:" or "shell:" with Ansible?

Viewed 2578

So I've been given the task of updating a certain directory over Ansible and I can't seem to find a way to execute git submodule update with git:.

Is there really no other way to do git submodule update without using command: or shell:?

My current code:

# Command to execute: git remote update
- name: Git Update
  git:
    repo: "{{ git_ssh_key }}"
    dest:  ~/some/directory
    update: yes
    version: master

# Command to execute: git reset --hard origin/master
- name: Git reset
  command: git reset --hard origin/master
  args: 
    chdir: ~/some/directory

# Command to execute: git submodule update
- name: Git Submodule Update
  [Here is where I need your help to execute "git submodule update"]

Any help is greatly appreciated.

1 Answers
Related