Skip to content

Commit

Permalink
Merge pull request #2446 from nordic-institute/XRDDEV-2742-dev
Browse files Browse the repository at this point in the history
chore: separate xroad deps repo into separate ansible task
  • Loading branch information
ricardas-buc authored Nov 28, 2024
2 parents 589efa2 + cb94dde commit 247cd88
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ansible/roles/xroad-base/tasks/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@

- name: Add X-Road apt repo key
shell: "curl -sL {{ ubuntu_apt_key }} | sudo gpg --dearmor --batch --yes -o {{ ubuntu_apt_key_file }}"
when: package_source == "remote" and (ansible_distribution == "Ubuntu")

- name: Add X-Road dependencies apt repo key
shell: "curl -sL {{ ubuntu_deps_apt_key }} | sudo gpg --dearmor --batch --yes -o {{ ubuntu_deps_apt_key_file }}"
when: ansible_distribution == "Ubuntu"

- name: Remove old repo config
Expand All @@ -38,7 +42,7 @@
update_cache: yes
with_items:
- "{{ ubuntu_apt_repo_with_option }}"
- "deb [{{ubuntu_apt_option}}] https://artifactory.niis.org/artifactory/xroad-dependencies-deb xroad external"
- "{{ ubuntu_deps_apt_repo_with_option }}"
when: ansible_distribution == "Ubuntu"

- name: enable UTF-8 locales
Expand Down
5 changes: 5 additions & 0 deletions ansible/vars_files/local_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ ubuntu_apt_option: "signed-by={{ubuntu_apt_key_file}}"
ubuntu_apt_repo: "deb [trusted=yes] file:///xroad /"
ubuntu_apt_repo_with_option: "{{ubuntu_apt_repo}}"

ubuntu_deps_apt_key: "https://artifactory.niis.org/api/gpg/key/public"
ubuntu_deps_repo_url: "https://artifactory.niis.org/artifactory/xroad-dependencies-deb"
ubuntu_deps_apt_key_file: "/usr/share/keyrings/xroad-deps.gpg"
ubuntu_deps_apt_option: "signed-by={{ubuntu_deps_apt_key_file}}"
ubuntu_deps_apt_repo_with_option: "deb [{{ubuntu_deps_apt_option}}] {{ubuntu_deps_repo_url}} xroad external"

rhel_repo_baseurl: "file:///xroad"
rhel_repo_gpgcheck: "no"
Expand Down
6 changes: 6 additions & 0 deletions ansible/vars_files/remote_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ ubuntu_apt_key_file: "/usr/share/keyrings/xroad.gpg"
ubuntu_apt_option: "signed-by={{ubuntu_apt_key_file}}"
ubuntu_apt_repo_with_option: "deb [{{ubuntu_apt_option}}] {{ubuntu_repo_url}} {{ansible_distribution_release}}-current main"

ubuntu_deps_apt_key: "https://artifactory.niis.org/api/gpg/key/public"
ubuntu_deps_repo_url: "https://artifactory.niis.org/artifactory/xroad-dependencies-deb"
ubuntu_deps_apt_key_file: "/usr/share/keyrings/xroad-deps.gpg"
ubuntu_deps_apt_option: "signed-by={{ubuntu_deps_apt_key_file}}"
ubuntu_deps_apt_repo_with_option: "deb [{{ubuntu_deps_apt_option}}] {{ubuntu_deps_repo_url}} xroad external"

rhel_repo_baseurl: "{{xroad_repo_baseurl}}/xroad-release-rpm/rhel/{{ansible_distribution_major_version}}/current"
rhel_repo_gpgcheck: "yes"
rhel_repo_gpgkey: "{{xroad_repo_key}}"
Expand Down

0 comments on commit 247cd88

Please sign in to comment.