]> git.proxmox.com Git - ceph.git/blob - ceph/src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml
update sources to 12.2.8
[ceph.git] / ceph / src / ceph-volume / ceph_volume / tests / functional / playbooks / deploy.yml
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
18
19 pre_tasks:
20 # If we can't get python2 installed before any module is used we will fail
21 # so just try what we can to get it installed
22 - name: check for python2
23 stat:
24 path: /usr/bin/python
25 ignore_errors: yes
26 register: systempython2
27
28 - name: install python2 for debian based systems
29 raw: sudo apt-get -y install python-simplejson
30 ignore_errors: yes
31 when:
32 - systempython2.stat is undefined or systempython2.stat.exists == false
33
34 - name: install python2 for fedora
35 raw: sudo dnf -y install python creates=/usr/bin/python
36 ignore_errors: yes
37 when:
38 - systempython2.stat is undefined or systempython2.stat.exists == false
39
40 - name: install python2 for opensuse
41 raw: sudo zypper -n install python-base creates=/usr/bin/python2.7
42 ignore_errors: yes
43 when:
44 - systempython2.stat is undefined or systempython2.stat.exists == false
45
46 - name: gather facts
47 setup:
48 when:
49 - not delegate_facts_host | bool
50
51 - name: gather and delegate facts
52 setup:
53 delegate_to: "{{ item }}"
54 delegate_facts: True
55 with_items: "{{ groups['all'] }}"
56 run_once: true
57 when:
58 - delegate_facts_host | bool
59
60 - name: install required packages for fedora > 23
61 raw: sudo dnf -y install python2-dnf libselinux-python ntp
62 when:
63 - ansible_distribution == 'Fedora'
64 - ansible_distribution_major_version|int >= 23
65
66 roles:
67 - ceph-defaults
68 - ceph-validate
69
70 - hosts:
71 - mons
72 - osds
73 - mgrs
74 gather_facts: false
75 become: True
76 roles:
77 - role: ceph-defaults
78 tags: ['ceph_update_config']
79 - role: ceph-common
80 - role: ceph-config
81 tags: ['ceph_update_config']
82
83 - hosts: mons
84 gather_facts: false
85 become: True
86 roles:
87 - role: ceph-defaults
88 - role: ceph-common
89 - role: ceph-mon
90
91 - hosts: mgrs
92 gather_facts: false
93 become: True
94 roles:
95 - role: ceph-defaults
96 - role: ceph-common
97 - role: ceph-mgr
98
99 - hosts: osds
100 gather_facts: false
101 become: True
102 tasks:
103 - name: rsync ceph-volume to test nodes on centos
104 synchronize:
105 src: "{{ toxinidir}}/../../../../ceph_volume"
106 dest: "/usr/lib/python2.7/site-packages"
107 use_ssh_args: true
108 when: ansible_os_family == "RedHat"
109
110 - name: rsync ceph-volume to test nodes on ubuntu
111 synchronize:
112 src: "{{ toxinidir}}/../../../../ceph_volume"
113 dest: "/usr/lib/python2.7/dist-packages"
114 use_ssh_args: true
115 when: ansible_os_family == "Debian"
116
117 - hosts: osds
118 gather_facts: false
119 become: True
120 roles:
121 - role: ceph-defaults
122 - role: ceph-common
123 - role: ceph-osd