Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only update submodules when recursive is true #7033

Merged

Conversation

bibliotechy
Copy link
Contributor

Issue Type:

“Bug Report” / “Bugfix Pull Request”

Ansible Version:

ansible 1.6 (devel a5e7492) last updated 2014/04/15 21:12:13 (GMT -400)

Environment:

Ubuntu 12.04

Summary:

Setting the git recursive parameter to no does not stop a repo with submodules from having all of the submodules cloned. While the --recursive flag is added to the clone command , the main function calls switch_version which automatically runs submodule_update without checking the recursive parameter.

This pull request adds that logic that only updates the submodules when the recursive parameter is set.

Steps To Reproduce:

With a git repo with submodules, run

git: repo=reponame dest=place/to/put/it recursive=no

Expected Results:

I expect my base module to be cloned / pulled, but for none of the submodules contents to be present. The path that the submodules point to should exist, but that should bot have the content from their repos

Actual Results:

Before PR:
All submodules are fully updated, with all contents present.

After PR
Expected Result

@eroldan
Copy link
Contributor

eroldan commented Apr 25, 2014

I think i've a better approach to the submodules ansible interface. Check this pull request #6752
What do you think?

@jimi-c jimi-c merged commit ef1a8e4 into ansible:devel May 9, 2014
@jimi-c
Copy link
Member

jimi-c commented May 9, 2014

Merged, thanks!

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 5, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants