]> git.proxmox.com Git - ceph.git/blame - ceph/src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml
import 14.2.4 nautilus point release
[ceph.git] / ceph / src / ceph-volume / ceph_volume / tests / functional / playbooks / deploy.yml
CommitLineData
1adf2230
AA
1---
2# Defines deployment design and assigns role to server groups
3
4- hosts:
5 - mons
6 - osds
7 - mgrs
8
9 gather_facts: false
10 any_errors_fatal: true
11 become: true
12
13 tags:
14 - always
15
16 vars:
17 delegate_facts_host: True
494da23a 18 dashboard_enabled: False
1adf2230
AA
19
20 pre_tasks:
21 # If we can't get python2 installed before any module is used we will fail
22 # so just try what we can to get it installed
23 - name: check for python2
24 stat:
25 path: /usr/bin/python
26 ignore_errors: yes
27 register: systempython2
28
29 - name: install python2 for debian based systems
30 raw: sudo apt-get -y install python-simplejson
31 ignore_errors: yes
32 when:
33 - systempython2.stat is undefined or systempython2.stat.exists == false
34
35 - name: install python2 for fedora
36 raw: sudo dnf -y install python creates=/usr/bin/python
37 ignore_errors: yes
38 when:
39 - systempython2.stat is undefined or systempython2.stat.exists == false
40
41 - name: install python2 for opensuse
42 raw: sudo zypper -n install python-base creates=/usr/bin/python2.7
43 ignore_errors: yes
44 when:
45 - systempython2.stat is undefined or systempython2.stat.exists == false
46
47 - name: gather facts
48 setup:
49 when:
50 - not delegate_facts_host | bool
51
52 - name: gather and delegate facts
53 setup:
54 delegate_to: "{{ item }}"
55 delegate_facts: True
56 with_items: "{{ groups['all'] }}"
57 run_once: true
58 when:
59 - delegate_facts_host | bool
60
61 - name: install required packages for fedora > 23
62 raw: sudo dnf -y install python2-dnf libselinux-python ntp
63 when:
64 - ansible_distribution == 'Fedora'
65 - ansible_distribution_major_version|int >= 23
66
11fdf7f2
TL
67 - name: check if it is atomic host
68 stat:
69 path: /run/ostree-booted
70 register: stat_ostree
71
72 - name: set_fact is_atomic
73 set_fact:
74 is_atomic: '{{ stat_ostree.stat.exists }}'
75
76 tasks:
77 - import_role:
78 name: ceph-defaults
79 - import_role:
80 name: ceph-validate
1adf2230
AA
81
82- hosts:
83 - mons
84 - osds
85 - mgrs
86 gather_facts: false
87 become: True
91327a77 88 any_errors_fatal: true
494da23a
TL
89 vars:
90 dashboard_enabled: False
1adf2230 91 tasks:
11fdf7f2
TL
92 - import_role:
93 name: ceph-defaults
94 - import_role:
95 name: ceph-facts
96 - import_role:
97 name: ceph-handler
98 - import_role:
99 name: ceph-common
100
1adf2230
AA
101 - name: rsync ceph-volume to test nodes on centos
102 synchronize:
11fdf7f2 103 src: "{{ toxinidir }}/../../../../ceph_volume"
1adf2230
AA
104 dest: "/usr/lib/python2.7/site-packages"
105 use_ssh_args: true
91327a77
AA
106 when:
107 - ansible_os_family == "RedHat"
108 - inventory_hostname in groups.get(osd_group_name, [])
1adf2230
AA
109
110 - name: rsync ceph-volume to test nodes on ubuntu
111 synchronize:
11fdf7f2 112 src: "{{ toxinidir }}/../../../../ceph_volume"
1adf2230
AA
113 dest: "/usr/lib/python2.7/dist-packages"
114 use_ssh_args: true
91327a77
AA
115 when:
116 - ansible_os_family == "Debian"
117 - inventory_hostname in groups.get(osd_group_name, [])
1adf2230 118
91327a77
AA
119 - name: run ceph-config role
120 import_role:
121 name: ceph-config
122
123 - name: run ceph-mon role
124 import_role:
125 name: ceph-mon
126 when:
127 - inventory_hostname in groups.get(mon_group_name, [])
128
129 - name: run ceph-mgr role
130 import_role:
131 name: ceph-mgr
132 when:
133 - inventory_hostname in groups.get(mgr_group_name, [])
134
135 - name: run ceph-osd role
136 import_role:
137 name: ceph-osd
138 when:
139 - inventory_hostname in groups.get(osd_group_name, [])