-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
SUMMARY
When running module retrieve with a TAG, the command that is executed seems to forget the URL of the repo.
Without the TAG everything seems to work fine.
ISSUE TYPE
- Bug Report
COMPONENT NAME
ansible.scm.retrieve
ANSIBLE VERSION
ansible [core 2.17.5]
config file = /Users/mrainer/Documents/dev/ansible/networking/playbooks/avd/single-dc-l3ls-new/ansible.cfg
configured module search path = ['/Users/mrainer/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/mrainer/venv/avd/lib/python3.11/site-packages/ansible
ansible collection location = /Users/mrainer/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/mrainer/venv/avd/bin/ansible
python version = 3.11.7 (main, Dec 4 2023, 18:10:11) [Clang 15.0.0 (clang-1500.1.0.2.5)] (/Users/mrainer/venv/avd/bin/python3.11)
jinja version = 3.1.4
libyaml = True
COLLECTION VERSION
tested with 1.2.2, 2.0, 3.0
same result for all of them
Collection Version
----------- -------
ansible.scm 3.0.0
CONFIGURATION
OS / ENVIRONMENT
all OS
STEPS TO REPRODUCE
- name: Pull Repo from SCM
ansible.scm.git_retrieve:
origin:
url: "{{ git_url }}"
token: "{{ git_token }}"
tag: "oct22"
parent_directory: "{{ git_dir }}"
branch:
name: "{{ git_branch }}"
duplicate_detection: false
register: _repo
run_once: true
check_mode: false
EXPECTED RESULTS
this is the command without a given TAG:
"command": "git -C ./tmp -c 'http.extraheader=AUTHORIZATION: basic <TOKEN>' clone --depth=1 --progress --no-single-branch https://github.com/maxrainer/ansible-avd-sot.git",
ACTUAL RESULTS
git -C ./tmp -c 'http.extraheader=AUTHORIZATION: basic ' clone --depth=1 --progress --branch oct22
fatal: [dc1-spine1]: FAILED! => {"branch_name": "", "branches": [], "changed": true, "msg": "Failed to clone repository: https://github.com/maxrainer/ansible-avd-sot.git", "name": "", "output": [{"command": "git -C ./tmp -c 'http.extraheader=AUTHORIZATION: basic <TOKEN>' clone --depth=1 --progress --branch oct22", "env": "", "return_code": 129, "stderr_lines": ["fatal: You must specify a repository to clone.",
Metadata
Metadata
Assignees
Labels
No labels