]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
cephadm: install cephadm from repository
authorSeena Fallah <seenafallah@gmail.com>
Wed, 15 Sep 2021 12:53:04 +0000 (17:23 +0430)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 13 Oct 2021 06:10:05 +0000 (08:10 +0200)
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 582293625237c1c02dd28a05097783a2c42e665e)

infrastructure-playbooks/cephadm.yml
tox.ini

index 396ee844ba380c691d251882e289cfdbe746d200..95b7feefc918d2b8e45536e78f5198922b579530 100644 (file)
         tasks_from: registry.yml
       when: ceph_docker_registry_auth | bool
 
+    - name: configure repository for installing cephadm
+      vars:
+        ceph_origin: repository
+        ceph_repository: community
+      block:
+        - name: validate repository variables
+          import_role:
+            name: ceph-validate
+            tasks_from: check_repository.yml
+
+        - name: configure repository
+          import_role:
+            name: ceph-common
+            tasks_from: "configure_repository.yml"
+
     - name: install cephadm requirements
       package:
         name: ['python3', 'lvm2']
       register: result
       until: result is succeeded
 
-    - name: create a cephadm container
-      command: "{{ container_binary }} create --name cephadm {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
-      changed_when: false
-
-    - name: cp the cephadm cli file
-      command: "{{ container_binary }} cp cephadm:/usr/sbin/cephadm /usr/sbin/cephadm"
-      args:
-        creates: /usr/sbin/cephadm
-
-    - name: remove the cephadm container
-      command: "{{ container_binary }} rm cephadm"
-      changed_when: false
+    - name: install cephadm
+      package:
+        name: cephadm
+      register: result
+      until: result is succeeded
 
     - name: set_fact cephadm_cmd
       set_fact:
diff --git a/tox.ini b/tox.ini
index def8cda16653d16601d5280e18b346254e9c8c30..9124558c011faa2b615ea1215ca356f7c64fd354 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -251,13 +251,11 @@ commands=
   ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/cephadm-adopt.yml --extra-vars "\
       ireallymeanit=yes \
       delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \
-      ceph_repository=dev \
   "
   # idempotency test
   ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/cephadm-adopt.yml --extra-vars "\
       ireallymeanit=yes \
       delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \
-      ceph_repository=dev \
   "
 
 [testenv]