Skip to content

Commit ce67d63

Browse files
Merge pull request #225 from Tompage1994/fix-controller-224
Fix credential for project
2 parents 444e475 + 0eb3368 commit ce67d63

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.github/playbooks/configs/projects.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,11 @@ controller_projects:
1919
scm_url: https://github.com/ansible/ansible-examples.git
2020
description: ansible-examples
2121
organization: Satellite
22+
- name: Test Inventory source project with credential
23+
scm_type: git
24+
scm_url: https://github.com/ansible/ansible-examples.git
25+
description: ansible-examples
26+
organization: Satellite
27+
credential: gitlab-personal-access-token for satqe_auto_droid
28+
wait: false
2229
...

changelogs/fragments/bug-224.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
bugfixes:
3+
- Fixed issue where `credential` was not working for project and instead the old `scm_credential` option remained.

roles/projects/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
local_path: "{{ __controller_project_item.local_path | default(omit, true) }}"
1111
scm_branch: "{{ __controller_project_item.scm_branch | default(omit, true) }}"
1212
scm_refspec: "{{ __controller_project_item.scm_refspec | default(omit, true) }}"
13-
credential: "{{ __controller_project_item.scm_credential | default(__controller_project_item.credential.name | default(omit, true)) }}"
13+
credential: "{{ __controller_project_item.credential.name | default(__controller_project_item.credential | default(__controller_project_item.scm_credential | default(omit, true))) }}"
1414
scm_clean: "{{ __controller_project_item.scm_clean | default(omit) }}"
1515
scm_delete_on_update: "{{ __controller_project_item.scm_delete_on_update | default(omit) }}"
1616
scm_track_submodules: "{{ __controller_project_item.scm_track_submodules | default(omit) }}"

0 commit comments

Comments
 (0)