diff --git a/ansible/roles/xroad-base/tasks/ubuntu.yml b/ansible/roles/xroad-base/tasks/ubuntu.yml index 88bbcebc73..db8210b0de 100644 --- a/ansible/roles/xroad-base/tasks/ubuntu.yml +++ b/ansible/roles/xroad-base/tasks/ubuntu.yml @@ -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 @@ -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 diff --git a/ansible/vars_files/local_repo.yml b/ansible/vars_files/local_repo.yml index c1632f71d4..44196798fa 100644 --- a/ansible/vars_files/local_repo.yml +++ b/ansible/vars_files/local_repo.yml @@ -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" diff --git a/ansible/vars_files/remote_repo.yml b/ansible/vars_files/remote_repo.yml index 5eda558480..35b7cee627 100644 --- a/ansible/vars_files/remote_repo.yml +++ b/ansible/vars_files/remote_repo.yml @@ -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}}"