]> git-server-git.apps.pok.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>
Thu, 29 Aug 2019 14:25:10 +0000 (10:25 -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>
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
plugins/actions/validate.py
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 0f54a051830cad301ffbf3fd90fc651e6c0da59b..ebf82e9cddbb9acab897c34a7cd3cdab30ec0967 100644 (file)
@@ -235,6 +235,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 515db4b41ded8d3256fab7538288d19021bdccd6..5c52b2f8c9061ff664f5f4c9654193e43bdb103e 100644 (file)
@@ -235,6 +235,7 @@ ceph_rhcs_version: 4
 # 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 df42d558d153b01e9d8122766860d3cf474a8141..5c690d1839af1b3804f02dd7c36066e3d01bedd9 100644 (file)
@@ -266,7 +266,10 @@ ceph_repository_obs = (
     ("ceph_obs_repo", types.string),
 )
 
-ceph_repository_custom = ("ceph_custom_repo", types.string)
+ceph_repository_custom = (
+    ("ceph_custom_key", types.string),
+    ("ceph_custom_repo", types.string),
+)
 
 ceph_repository_uca = (
     ("ceph_stable_openstack_release_uca", types.string),
index f3a35b4f35924a9e9b7b49ad27c8af6cf384c52e..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
+    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 27b7f650c038d8c372b789a7cd991d161bcb4cf6..61bd1db495d98bb7d6d5a3997731c273af26ddd1 100644 (file)
@@ -227,6 +227,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