ansible/test/integration/targets/git/tasks/main.yml
Abhijeet Kasurde a047fe0e4c Correct usage for shutil.rmtree (#31541)
* Correct usage for shutil.rmtree

Fix adds correct usage of shutil.rmtree in git module

Fixes: #31225

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Include archive tests so they get run

* Use new include syntax

* Cleanup syntax on git tests

- use multi-line YAML
- remove unneeded {{ }} around vars in conditionals
- remove unneeded quotes
- add task file name to task names for easier troubleshooting when things fail

* Make archive tests work for RHEL/CentOS 6

The older versions of Jinja2 in RHEL/CentOS 6 required assertion tasks using the map filter to be skipped.

The older version of git required gzip compression to be skipped on RHEL/CentOS 6.

* Account for ansible_distribution_major_version missing
2017-10-13 10:30:15 -04:00

38 lines
1.3 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/>.
- include_tasks: setup.yml
- include_tasks: setup-local-repos.yml
- include_tasks: formats.yml
- include_tasks: missing_hostkey.yml
- include_tasks: no-destination.yml
- include_tasks: specific-revision.yml
- include_tasks: submodules.yml
- include_tasks: change-repo-url.yml
- include_tasks: depth.yml
- include_tasks: checkout-new-tag.yml
- include_tasks: gpg-verification.yml
when:
- not gpg_version.stderr
- gpg_version.stdout
- git_version.stdout | version_compare("2.1.0", '>=')
- include_tasks: localmods.yml
- include_tasks: reset-origin.yml
- include_tasks: ambiguous-ref.yml
- include_tasks: archive.yml