Merge "Install required packages for NFS/CephFS mounts"
This commit is contained in:
commit
bcbd5344cf
@ -13,5 +13,22 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Gather variables for each operating system
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
||||
- "{{ ansible_os_family | lower }}.yml"
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Install required distro packages for mounts
|
||||
package:
|
||||
name: "{{ systemd_mount_packages }}"
|
||||
state: present
|
||||
|
||||
- include_tasks: systemd_mounts.yml
|
||||
with_items: "{{ systemd_mounts }}"
|
||||
|
5
vars/debian.yml
Normal file
5
vars/debian.yml
Normal file
@ -0,0 +1,5 @@
|
||||
systemd_nfs_packages:
|
||||
- nfs-common
|
||||
|
||||
systemd_ceph_packages:
|
||||
- ceph-fuse
|
@ -19,3 +19,14 @@ systemd_mount_states:
|
||||
started: reload-or-restart
|
||||
stopped: stopped
|
||||
absent: stopped
|
||||
|
||||
systemd_mount_packages: |-
|
||||
{% set packages = [] %}
|
||||
{% set mount_types = systemd_mounts | map(attribute='type') | list %}
|
||||
{% if 'nfs' in mount_types %}
|
||||
{% set _ = packages.extend(systemd_nfs_packages) %}
|
||||
{% endif %}
|
||||
{% if 'ceph' in mount_types %}
|
||||
{% set _ = packages.extend(systemd_ceph_packages) %}
|
||||
{% endif %}
|
||||
{{ packages }}
|
||||
|
5
vars/redhat.yml
Normal file
5
vars/redhat.yml
Normal file
@ -0,0 +1,5 @@
|
||||
systemd_nfs_packages:
|
||||
- nfs-utils
|
||||
|
||||
systemd_ceph_packages:
|
||||
- ceph-fuse
|
Loading…
x
Reference in New Issue
Block a user