Skip to content

Add support for ceph clusters using podman #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/cephadm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ All Ceph hosts must be in the `ceph` group.

* General
* `cephadm_ceph_release`: Ceph release to deploy (default: quincy)
* `cephadm_container_engine`: Whether to use docker_login or podman_login (default: docker)
* `cephadm_fsid`: FSID to use for cluster (default: empty - cephadm will generate FSID)
* `cephadm_recreate`: If existing cluster should be destroyed and recreated (default: false)
* `cephadm_custom_repos`: If enabled - the role won't define yum/apt repositories. If using Ubuntu 22.04 this should be set to true. (default: false)
Expand Down
2 changes: 2 additions & 0 deletions roles/cephadm/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ cephadm_osd_spec: []
cephadm_radosgw_services: []
# Ingress
cephadm_ingress_services: []
# Container Engine
cephadm_container_engine: "docker"
4 changes: 4 additions & 0 deletions roles/cephadm/tasks/prechecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
- name: Set cephadm_bootstrap
set_fact:
cephadm_bootstrap: "{{ ansible_facts.services | dict2items | selectattr('key', 'match', '^ceph.*') | list | length == 0 }}"

- name: Check if specified container engine is installed
command: "which {{ cephadm_container_engine }}"
changed_when: false
14 changes: 13 additions & 1 deletion roles/cephadm/tasks/prereqs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,22 @@
state: present
become: true

- name: Log into Docker registry
containers.podman.podman_login:
registry: "{{ cephadm_registry_url }}"
username: "{{ cephadm_registry_username }}"
password: "{{ cephadm_registry_password }}"
when:
- cephadm_registry_username | length > 0
- cephadm_container_engine == 'podman'
become: true

- name: Log into Docker registry
docker_login:
registry: "{{ cephadm_registry_url }}"
username: "{{ cephadm_registry_username }}"
password: "{{ cephadm_registry_password }}"
when: cephadm_registry_username | length > 0
when:
- cephadm_registry_username | length > 0
- cephadm_container_engine == 'docker'
become: true