need clarification on git module update option

68 views
Skip to first unread message

Cliffano Subagio

unread,
Dec 2, 2014, 3:30:16 AM12/2/14
to ansible...@googlegroups.com
Hi,

I would like to get some clarification on the intention of update option in git module.

My original understanding:
- when update=yes, then repo will be cloned once and then updated via git pull every time
- when update=no, then repo will be cloned once but would never be updated with git pull and it will just return repo information


After the change:
- when update=yes, the behaviour is still the same as my original understanding
- when update=no, then the module will never be cloned it will just return repo information. this is the confusing part because 'update' by definition indicates updating an already cloned repo. The change also means that it's no longer possible to clone the repo once only without further updates, which I think would be a common use case.

The documentation on http://docs.ansible.com/git_module.html only mentions "If no, just returns information about the repository without updating."
Is it the intention that update=no means to never clone?
If so, is there any other way to support clone once and never update?

Cheers,
Cliff.

Toshio Kuratomi

unread,
Dec 2, 2014, 8:15:28 PM12/2/14
to ansible...@googlegroups.com
I don't know the proper answer to your question, the docs definitely
could be interpreted either way right now. And there does seem to be
a use case for update=no not doing an initial clone but you're not the
first person to request update=no to do an initial clone:

https://github.com/ansible/ansible-modules-core/issues/426



-Toshio
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/a0a716ee-3560-4d7c-b8b4-0e14e4d468b6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Cliffano Subagio

unread,
Dec 2, 2014, 8:38:14 PM12/2/14
to ansible...@googlegroups.com
Thanks for the pointer to that issue. I'll move the discussion there.

Toshio Kuratomi

unread,
Dec 2, 2014, 11:47:18 PM12/2/14
to ansible...@googlegroups.com

Oh sorry, I didn't mean to push the discussion onto the ticket - just pointing out that it exists so other people are interested in it.   Mailing lists are often better than tickets for discussing how we want things to behave.  Then we can use the ticket to hammer out implementation of that behavior.

Apologies,
-Toshio

Reply all
Reply to author
Forward
0 new messages