-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathceph.yml
42 lines (33 loc) · 1.24 KB
/
ceph.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
- hosts: ceph
gather_facts: yes
tags: client
vars_files:
- vars/main.yml
tasks:
- name: copy consul zip file
copy: src=files/{{ consul_pkg }} dest={{ consul_temp }}
register: consul_copy
- name: copy consul zip file
command: echo "consul copy failed"
when: consul_copy | failed
- name: unarchive consul
unarchive: src={{ consul_temp }}/{{ consul_pkg }} dest={{ consul_bin_path }} copy=no
register: unarchive_consul
when: consul_copy | success
- name: Create client directory
file: path={{ consul_client_dir }} state=directory
when: unarchive_consul | success
- name: Create script directory
file: path={{ consul_scritp_dir }} state=directory
when: unarchive_consul | success
- name: copy script to script directory
copy: src=files/ceph_script/ dest={{ consul_scritp_dir }} mode=0777
when: unarchive_consul | success
- name: copy client template
template: src=templates/ceph.j2 dest={{ consul_client_dir }}/config.json
when: unarchive_consul | success
- name: consul boot scritp
template: src=templates/consul-client.j2 dest=/etc/init/consul.conf
when: unarchive_consul | success
- name: start consul server
command: start consul