mirror of https://github.com/ceph/ceph-ansible.git
Adds handy ceph aliases whe containerized installations.
Same approach as openshift-ansible etcdctl: * https://github.com/openshift/openshift-ansible/blob/release-3.7/roles/etcd/tasks/auxiliary/drop_etcdctl.yml * https://github.com/openshift/openshift-ansible/blob/release-3.7/roles/etcd/etcdctl.shpull/2439/head
parent
9181c94adf
commit
691f7c5146
|
@ -469,6 +469,10 @@
|
||||||
tags:
|
tags:
|
||||||
remove_img
|
remove_img
|
||||||
|
|
||||||
|
- name: remove ceph aliases
|
||||||
|
file:
|
||||||
|
path: /etc/profile.d/ceph-aliases.sh
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: remove installed packages
|
- name: remove installed packages
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
- name: configure ceph profile.d aliases
|
||||||
|
template:
|
||||||
|
src: ceph-aliases.sh.j2
|
||||||
|
dest: "/etc/profile.d/ceph-aliases.sh"
|
||||||
|
mode: 0755
|
||||||
|
owner: root
|
||||||
|
group: root
|
|
@ -6,6 +6,9 @@
|
||||||
- name: include start_docker_monitor.yml
|
- name: include start_docker_monitor.yml
|
||||||
include: start_docker_monitor.yml
|
include: start_docker_monitor.yml
|
||||||
|
|
||||||
|
- name: include configure_ceph_command_aliases.yml
|
||||||
|
include: configure_ceph_command_aliases.yml
|
||||||
|
|
||||||
- name: wait for monitor socket to exist
|
- name: wait for monitor socket to exist
|
||||||
command: "{{ docker_exec_cmd }} sh -c 'stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_hostname }}.asok || stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_fqdn }}.asok'"
|
command: "{{ docker_exec_cmd }} sh -c 'stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_hostname }}.asok || stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_fqdn }}.asok'"
|
||||||
register: monitor_socket
|
register: monitor_socket
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Sets up handy aliases for ceph.
|
||||||
|
ceph() {
|
||||||
|
sudo {{ docker_exec_cmd }} ceph --cluster {{ cluster }} ${@}
|
||||||
|
}
|
||||||
|
|
||||||
|
radosgw-admin() {
|
||||||
|
sudo {{ docker_exec_cmd }} radosgw-admin --cluster {{ cluster }} ${@}
|
||||||
|
}
|
||||||
|
|
||||||
|
rados() {
|
||||||
|
sudo {{ docker_exec_cmd }} rados --cluster {{ cluster }} ${@}
|
||||||
|
}
|
||||||
|
|
||||||
|
rbd() {
|
||||||
|
sudo {{ docker_exec_cmd }} rbd --cluster {{ cluster }} ${@}
|
||||||
|
}
|
Loading…
Reference in New Issue