2 # Defines deployment design and assigns role to server groups
10 any_errors_fatal: true
17 delegate_facts_host: True
18 dashboard_enabled: False
21 DEBIAN_FRONTEND: noninteractive
24 # If we can't get python2 installed before any module is used we will fail
25 # so just try what we can to get it installed
26 - name: check for python2
30 register: systempython2
32 - name: install python2 for debian based systems
33 raw: sudo apt-get -y install python-simplejson
36 - systempython2.stat is undefined or systempython2.stat.exists == false
38 # Ansible will try to auto-install python-apt, in some systems this might be
39 # python3-apt, or python-apt, and it has caused whole runs to fail because
40 # it is trying to do an interactive prompt
41 - name: install python-apt and aptitude in debian based systems
42 raw: sudo apt-get -y install "{{ item }}"
49 - name: install python2 for fedora
50 raw: sudo dnf -y install python creates=/usr/bin/python
53 - systempython2.stat is undefined or systempython2.stat.exists == false
55 - name: install python2 for opensuse
56 raw: sudo zypper -n install python-base creates=/usr/bin/python2.7
59 - systempython2.stat is undefined or systempython2.stat.exists == false
64 - not delegate_facts_host | bool
66 - name: gather and delegate facts
68 delegate_to: "{{ item }}"
70 with_items: "{{ groups['all'] }}"
73 - delegate_facts_host | bool
75 - name: install required packages for fedora > 23
76 raw: sudo dnf -y install python2-dnf libselinux-python ntp
78 - ansible_facts['distribution'] == 'Fedora'
79 - ansible_facts['distribution_major_version']|int >= 23
81 - name: check if it is atomic host
83 path: /run/ostree-booted
86 - name: set_fact is_atomic
88 is_atomic: '{{ stat_ostree.stat.exists }}'
104 any_errors_fatal: true
106 dashboard_enabled: False
117 - name: rsync ceph-volume to test nodes on centos
119 src: "{{ toxinidir }}/../../../../ceph_volume"
120 dest: "/usr/lib/python3.6/site-packages"
123 - ansible_facts['os_family'] == "RedHat"
124 - inventory_hostname in groups.get(osd_group_name, [])
126 - name: rsync ceph-volume to test nodes on ubuntu
128 src: "{{ toxinidir }}/../../../../ceph_volume"
129 dest: "/usr/lib/python2.7/dist-packages"
132 - ansible_facts['os_family'] == "Debian"
133 - inventory_hostname in groups.get(osd_group_name, [])
135 - name: run ceph-config role
139 - name: run ceph-mon role
143 - inventory_hostname in groups.get(mon_group_name, [])
145 - name: run ceph-mgr role
149 - inventory_hostname in groups.get(mgr_group_name, [])
151 - name: run ceph-osd role
155 - inventory_hostname in groups.get(osd_group_name, [])