blob: 052262c05147312554b51d27762e32e22d8a610f [file] [log] [blame]
Mohammed Naserff42bb32023-06-03 13:42:14 -04001# Copyright (c) 2023 VEXXHOST, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
Mohammed Naserf8833b22024-06-26 09:46:57 -040015- name: Add backports PPA
16 ansible.builtin.apt_repository:
Mohammed Naser38891802024-06-27 17:43:47 -040017 repo: "{{ multipathd_repository }}"
vexxhost-bot3de00d12024-07-12 16:21:46 +020018 register: _add_multipathd_ppa
19 retries: 10
20 delay: 2
21 until: _add_multipathd_ppa is not failed
vexxhost-bot9ca62d42024-07-13 10:00:30 +020022 when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'jammy'
Mohammed Naserf8833b22024-06-26 09:46:57 -040023
24- name: Install the multipathd package
25 ansible.builtin.package:
26 name: multipath-tools
Mohammed Naserf3152222024-07-19 00:40:24 -040027 state: latest # noqa: package-latest
Mohammed Naserf8833b22024-06-26 09:46:57 -040028 notify:
Mohammed Naserde35c272024-06-27 13:00:25 -040029 - Restart "multipathd"
Mohammed Naserf8833b22024-06-26 09:46:57 -040030
Mohammed Naserff42bb32023-06-03 13:42:14 -040031- name: Install the configuration file
32 ansible.builtin.template:
33 src: multipath.conf.j2
34 dest: /etc/multipath.conf
35 owner: root
36 group: root
37 mode: "0644"
38 notify:
Mohammed Naserde35c272024-06-27 13:00:25 -040039 - Restart "multipathd"