Skip to content

Commit

Permalink
feat: ✨ inject ca bundle in ci variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudTA committed May 30, 2023
1 parent 3b51219 commit ac11110
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions roles/gitlab/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@
group: "{{ projectsRootDir | join('/') }}"
purge: false
variables:
- name: CATALOG_PATH
value: "{{ projectsRootDir | join('/') }}/catalog"
- name: VAULT_KV
value: forge-dso
- name: CATALOG_PATH
value: "{{ projectsRootDir + 'catalog' | flatten | join('/') }}"
- name: PROJECTS_ROOT_DIR
value: "{{ projectsRootDir | join('/') }}"
- name: "NEXUS_HOST_URL"
Expand All @@ -210,7 +210,7 @@
variable_type: "file"
value: "{{ npm_file }}"

- name: "Set or update some CI/CD variables"
- name: "Set or update proxy CI/CD variables"
community.general.gitlab_group_variable:
api_url: "https://{{ GITLAB_DOMAIN }}"
api_token: "{{ gitlab_token }}"
Expand All @@ -235,3 +235,15 @@
value: "{{ HTTPS_PROXY }}"
- name: "no_proxy"
value: "{{ NO_PROXY }}"

- name: "Set or update CA_BUNDLE variable"
community.general.gitlab_group_variable:
api_url: "https://{{ GITLAB_DOMAIN }}"
api_token: "{{ gitlab_token }}"
validate_certs: "{{ additionals_ca | ternary(false, true) }}"
group: "{{ projectsRootDir | join('/') }}"
purge: false
state: "{{ additionals_ca | ternary('present', 'absent') }}"
variables:
- name: "CA_BUNDLE"
value: "{{ ca_pem }}"

0 comments on commit ac11110

Please sign in to comment.