https://github.com/alphahydrae/ansible-separate-git-dir-bug
Setup to reproduce a bug with Ansible's Git module
https://github.com/alphahydrae/ansible-separate-git-dir-bug
Last synced: 4 months ago
JSON representation
Setup to reproduce a bug with Ansible's Git module
- Host: GitHub
- URL: https://github.com/alphahydrae/ansible-separate-git-dir-bug
- Owner: AlphaHydrae
- Created: 2019-02-11T13:37:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-11T14:12:31.000Z (over 7 years ago)
- Last Synced: 2025-03-13T04:42:56.375Z (over 1 year ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ansible `separate_git_dir` bug
Running the `git` module with the `separate_git_dir` option fails and wipes out
the contents of the bare repository if the `dest` directory does not exist. It
works fine when both the `separate_git_dir` and the `dest` directories do not
exist, or when both already exist.
Issue: https://github.com/ansible/ansible/issues/52026
## Requirements
* [Vagrant](https://www.vagrantup.com/) 2.2.3
* [VirtualBox](https://www.virtualbox.org/) (or other provider supported by Vagrant)
* [Ansible](https://www.ansible.com/) 2.7.6
## Usage
To reproduce the bug:
```bash
# Set up the virtual machine (will run the playbook once with no error)
git clone https://github.com/AlphaHydrae/ansible-separate-git-dir-bug
cd ansible-separate-git-dir-bug
vagrant up
# Run the playbook again (will produce the bug)
vagrant provision
```
To re-test:
```bash
# Clean up the directories and run the playbook twice
vagrant ssh -c 'sudo rm -fr /tmp/checkout /tmp/repo' && vagrant provision && vagrant provision
```