blob: bc51810581d2f995b0cc9a66ccc12858fea9fbd7 [file] [log] [blame]
Gorka Eguileor87d48022023-01-18 10:23:34 +01001- hosts: tempest
2 vars:
3 mpath_package: "{{ 'device-mapper-multipath' if ansible_os_family == 'RedHat' else 'multipath-tools' }}"
4 tasks:
5 - name: Install multipath package on RedHat systems
6 package:
7 name: "{{ mpath_package }}"
8 state: present
9 become: yes
10
11 - name: Create configuration
12 command: mpathconf --enable --with_multipathd y --user_friendly_names n --find_multipaths y
13 args:
14 creates: /etc/multipath.conf
15 become: yes
16
17 - name: Start and enable on boot the multipath daemon
18 service:
19 name: multipathd
20 state: started
21 enabled: yes
22 become: yes