ceph-ansible/roles/ceph-container-common/tasks/main.yml

43 lines
1.3 KiB
YAML
Raw Normal View History

---
- name: include prerequisites.yml
include_tasks: prerequisites.yml
- name: get docker version
block:
- name: get docker version
command: docker --version
changed_when: false
check_mode: no
register: ceph_docker_version
- name: set_fact ceph_docker_version ceph_docker_version.stdout.split
set_fact:
ceph_docker_version: "{{ ceph_docker_version.stdout.split(' ')[2] }}"
when: container_binary == 'docker'
- name: container registry authentication
command: '{{ container_binary }} login -u {{ ceph_docker_registry_username }} -p {{ ceph_docker_registry_password }} {{ ceph_docker_registry }}'
changed_when: false
no_log: true
when: ceph_docker_registry_auth | bool
- name: include fetch_image.yml
include_tasks: fetch_image.yml
tags: fetch_container_image
- name: get ceph version
command: >
{{ container_binary }} run --rm --net=host --entrypoint /usr/bin/ceph
{{ ceph_client_docker_registry }}/{{ ceph_client_docker_image }}:{{ ceph_client_docker_image_tag }}
--version
changed_when: false
check_mode: no
register: ceph_version
- name: set_fact ceph_version ceph_version.stdout.split
set_fact:
ceph_version: "{{ ceph_version.stdout.split(' ')[2] }}"
- name: include release.yml
include_tasks: release.yml