mirror of https://github.com/ceph/ceph-ansible.git
cephadm: use cephadm_ssh_user for ssh user
Use cephadm_ssh_user to set custom user (not root) for cephadm to ssh to the hosts
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 0b78faa723
)
pull/6941/head
parent
4b5a0c0443
commit
c3fe1a6206
|
@ -219,11 +219,17 @@
|
|||
environment:
|
||||
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
||||
|
||||
- name: allow cephadm key for root account
|
||||
- name: allow cephadm key for {{ cephadm_ssh_user | default('root') }} account
|
||||
authorized_key:
|
||||
user: root
|
||||
user: "{{ cephadm_ssh_user | default('root') }}"
|
||||
key: '{{ cephadm_pubpkey.stdout }}'
|
||||
|
||||
- name: set cephadm ssh user to {{ cephadm_ssh_user | default('root') }}
|
||||
command: "{{ cephadm_cmd }} shell -- ceph --cluster {{ cluster }} cephadm set-user {{ cephadm_ssh_user | default('root') }}"
|
||||
changed_when: false
|
||||
run_once: true
|
||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||
|
||||
- name: run cephadm prepare-host
|
||||
command: cephadm prepare-host
|
||||
changed_when: false
|
||||
|
|
Loading…
Reference in New Issue