ansible/test/integration/targets/git/tasks/main.yml
Laurent Coustet e396715d7b
git - add single_branch option (#28465)
In some usecases, we want to be able to clone a single branch
of a repository, without using --depth (which implies --single-branch).

* Use branch name when available
  -  update description of parameter
  - consolidate branch or tag checking for easy reuse

* Add changelog
* Use static task imports rather than dynamic includes
* Add integration tests for single_branch
* Account for older versions of git
* Minor tweak to warnings

Co-authored-by: Laurent Coustet <laurent.coustet@clarisys.fr>
Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-06-29 15:40:54 -04:00

41 lines
1.4 KiB
YAML

# test code for the git module
# (c) 2014, James Tanner <tanner.jc@gmail.com>
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
- import_tasks: setup.yml
- import_tasks: setup-local-repos.yml
- import_tasks: formats.yml
- import_tasks: missing_hostkey.yml
- import_tasks: no-destination.yml
- import_tasks: specific-revision.yml
- import_tasks: submodules.yml
- import_tasks: change-repo-url.yml
- import_tasks: depth.yml
- import_tasks: single-branch.yml
- import_tasks: checkout-new-tag.yml
- include_tasks: gpg-verification.yml
when:
- not gpg_version.stderr
- gpg_version.stdout
- git_version.stdout is version("2.1.0", '>=')
- import_tasks: localmods.yml
- import_tasks: reset-origin.yml
- import_tasks: ambiguous-ref.yml
- import_tasks: archive.yml
- import_tasks: separate-git-dir.yml
- import_tasks: forcefully-fetch-tag.yml