cephadm: install cephadm from repository

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 5822936252)
pull/6948/head
Seena Fallah 2021-09-15 17:23:04 +04:30 committed by Guillaume Abrioux
parent 7b19748304
commit 191ec4f40f
2 changed files with 20 additions and 14 deletions

View File

@ -102,24 +102,32 @@
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:

View File

@ -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]