jtudelag 2018-02-28 18:53:57 +01:00 committed by Sébastien Han
parent 9181c94adf
commit 691f7c5146
4 changed files with 32 additions and 0 deletions

View File

@ -469,6 +469,10 @@
tags:
remove_img
- name: remove ceph aliases
file:
path: /etc/profile.d/ceph-aliases.sh
state: absent
- name: remove installed packages

View File

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

View File

@ -6,6 +6,9 @@
- name: 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
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

View File

@ -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 }} ${@}
}