Codebase list cinder-tempest-plugin / c40f9b8 playbooks / install-multipath.yaml
c40f9b8

Tree @c40f9b8 (Download .tar.gz)

install-multipath.yaml @c40f9b8raw · history · blame

- hosts: tempest
  vars:
    mpath_package: "{{ 'device-mapper-multipath' if ansible_os_family == 'RedHat' else 'multipath-tools' }}"
  tasks:
    - name: Install multipath package on RedHat systems
      package:
        name: "{{ mpath_package }}"
        state: present
      become: yes

    - name: Create configuration
      command: mpathconf --enable --with_multipathd y --user_friendly_names n --find_multipaths y
      args:
        creates: /etc/multipath.conf
      become: yes

    - name: Start and enable on boot the multipath daemon
      service:
        name: multipathd
        state: started
        enabled: yes
      become: yes