]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph_custom_repo: define apt and rpm key for custom repo
authorAnthony Rusdi <33247310+antrusd@users.noreply.github.com>
Sun, 25 Aug 2019 18:47:32 +0000 (01:47 +0700)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Fri, 11 Sep 2020 00:37:15 +0000 (20:37 -0400)
This commit also remove the notify on new added debian repo,
force update_cache to yes and define sample ceph_custom_key vars.

Signed-off-by: Anthony Rusdi <33247310+antrusd@users.noreply.github.com>
(cherry picked from commit 4c592066b7c1caaec700af347fc9edf2109c1659)

group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-common/tasks/installs/debian_custom_repository.yml
roles/ceph-common/tasks/installs/redhat_custom_repository.yml
roles/ceph-defaults/defaults/main.yml

index 918dcce256f2185da7c6daf553d07631d7a29e57..ecf8b539cd895bb90a650141f5e429894fa31996 100644 (file)
@@ -222,6 +222,7 @@ dummy:
 # a URL to the .repo file to be installed on the targets.  For deb,
 # ceph_custom_repo should be the URL to the repo base.
 #
+#ceph_custom_key: https://server.domain.com/ceph-custom-repo-key.asc
 #ceph_custom_repo: https://server.domain.com/ceph-custom-repo
 
 
index fe42feb9a52ddf3ef3655442a40b9306b3465acc..417868951a07e8bf738f217649438dbb09d26e85 100644 (file)
@@ -222,6 +222,7 @@ ceph_iscsi_config_dev: false
 # a URL to the .repo file to be installed on the targets.  For deb,
 # ceph_custom_repo should be the URL to the repo base.
 #
+#ceph_custom_key: https://server.domain.com/ceph-custom-repo-key.asc
 #ceph_custom_repo: https://server.domain.com/ceph-custom-repo
 
 
index ccd822c9d8fb56c47878a164d61643ca8827e7c6..10c5ea38f94e726d7014b7fd5067f11a59c40a84 100644 (file)
@@ -1,7 +1,14 @@
 ---
+- name: configure debian custom apt key
+  apt_key:
+    url: "{{ ceph_custom_key }}"
+    state: present
+  register: result
+  until: result is succeeded
+  when: ceph_custom_key is defined
+
 - name: configure debian custom repository
   apt_repository:
     repo: "deb {{ ceph_custom_repo }} {{ ansible_distribution_release }} main"
     state: present
-    update_cache: no
-  notify: update apt cache if a repo was added
\ No newline at end of file
+    update_cache: yes
index 27326292751df7da51b8d4ffedfeab65edf9685e..5bdefa2c3228fbdb6ab190d862e284ddd63e3238 100644 (file)
@@ -1,4 +1,12 @@
 ---
+- name: configure red hat custom rpm key
+  rpm_key:
+    key: "{{ ceph_custom_key }}"
+    state: present
+  register: result
+  until: result is succeeded
+  when: ceph_custom_key is defined
+
 - name: configure red hat custom repository
   get_url:
     url: "{{ ceph_custom_repo }}"
index 5d88e79e07ae0db5dbaba8bf37a0b2ec3384d387..2ccfa047a44dd983368068984dfa4e97bdcdc566 100644 (file)
@@ -214,6 +214,7 @@ ceph_iscsi_config_dev: true # special repo for deploying iSCSI gateways
 # a URL to the .repo file to be installed on the targets.  For deb,
 # ceph_custom_repo should be the URL to the repo base.
 #
+ceph_custom_key: https://server.domain.com/ceph-custom-repo-key.asc
 ceph_custom_repo: https://server.domain.com/ceph-custom-repo