5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Defines deployment design and assigns role to server groups
38 # If we can't get python2 installed before any module is used we will fail
39 # so just try what we can to get it installed
40 - name: check for python2
44 register: systempython2
46 - name: install python2 for debian based systems
47 raw: sudo apt-get -y install python-simplejson
50 - systempython2.stat.exists is undefined or systempython2.stat.exists == false
52 - name: install python2 for fedora
53 raw: sudo dnf -y install python creates=/usr/bin/python
56 - systempython2.stat.exists is undefined or systempython2.stat.exists == false
58 - name: gather and delegate facts
60 delegate_to: "{{ item }}"
62 with_items: "{{ groups['all'] }}"
64 - name: install required packages for fedora > 23
65 raw: sudo dnf -y install python2-dnf libselinux-python ntp
67 - ansible_distribution == 'Fedora'
68 - ansible_distribution_major_version|int >= 23
85 - { role: ceph-config, when: "ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous" }
86 - { role: ceph-mgr, when: "ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous" }
130 - { role: ceph-config, when: "ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous" }
131 - { role: ceph-nfs, when: "ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous" }
166 - { role: ceph-config, when: "ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous" }
167 - { role: ceph-iscsi-gw, when: "ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous" }