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)
# 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
# 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
---
+- 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
---
+- 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 }}"
# 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