git module question

12 views
Skip to first unread message

Mauricio Tavares

unread,
Jan 3, 2020, 2:36:34 PM1/3/20
to ansible...@googlegroups.com
What is the equivalent of [1]

git submodule update --init

using the git [2] module? Would "update: yes" (the default) as in

- git:
repo: 'https://foosball.example.org/path/to/repo.git'
dest: /srv/checkout
update: yes

suffice?

[1] https://git-scm.com/docs/git-submodule
[2] https://docs.ansible.com/ansible/latest/modules/git_module.html

Florian Floimair

unread,
Jan 7, 2020, 10:32:00 AM1/7/20
to Ansible Project
Sounds reasonable to me. The important part for submodules is the "recursive" parameter which is by default set to yes.
Whether the git module implicitly uses --init on the first run I have never actually tried.
Reply all
Reply to author
Forward
0 new messages