zaxos.lvm-ansible-role

Build-Status Ansible Galaxy

lvm-ansible-role

Ansible-Rolle zur Erstellung und Montage einzelner LVM-Volumes.

Voraussetzungen

  • CentOS/RHEL 7
  • Ansible >= 2.5

Installation

$ ansible-galaxy install zaxos.lvm-ansible-role

Beispiel-Playbook

- hosts: servers
  vars:
    lvm_volumes:
    - vg_name: vg_data
      lv_name: lv_data
      disk: sdb
      filesystem: xfs
      mount: /mnt
            
  roles:
    - role: zaxos.lvm-ansible-role

Beispiel-Volume

- vg_name: vg_data  # erforderlich, Name der Volume-Gruppe #
  lv_name: lv_data  # erforderlich, Name des logischen Volumes #
  disk: sdb  # erforderlich #
  filesystem: xfs  # optional, Standard ist 'xfs' #
  filesystem_mkfs_opts: "-n ftype=1"  # optional #
  mount: /mnt  # erforderlich #
  state: present/absent  # optional, Standard ist 'present', auf 'absent' setzen für die Entfernung #
  lv_size: 100%VG  # optional, Standard ist '100%VG' #
  create_partition: False  # optional, Standard ist 'False', auf 'True' setzen, um eine GPT-Partition vor der VG-Erstellung zu erstellen #
  mounted: True  # optional, Standard ist 'True', auf 'False' setzen, um die Partition zu demontieren #
  owner: "root"  # optional, Standard ist "root" #
  group: "root"  # optional, Standard ist "root" #
  mode: "0644"  # optional, Standard ist "0755" #
  mount_options: defaults  # optional, Standard ist 'defaults' #

Rollen-Variablen

Einige Variablen, die überprüft werden sollten::

  • lvm_volumes: Liste der Volumes.
  • lvm_auto_remount: Standardwert ist "True". Wenn auf "True" gesetzt, wird der alte Montage-Pfad eines Volumes automatisch demontiert und aus fstab entfernt, wenn der Montage-Pfad geändert wird.
Über das Projekt

Ansible role to create and mount single lvm volumes

Installieren
ansible-galaxy install zaxos.lvm-ansible-role
Lizenz
gpl-2.0
Downloads
25.2k