kaarolch / ansible-role-storage-init

Ansible storage initialization role for RedHat/CentOS server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status License Ansible Role Name Ansible Role counter

Ansible-role-storage-init

Simple role to initialize LVM volumes on host. This role was created to automate machines bootstrapping. Role is dedicated to initial setup of LVM and increase existing volumes or fs.

If something is missing please create a issue on github

Default Behavior

Please check config.yml

Designing defaults:

  • Scanning SCSI bus to find new devices (used default bus 0-7).
  • Resizing existing LVM physical volumes.
  • Resizing file system.

Shrinking operation is not support by the file system module and we do not plan to add some extra logic for it.

Role Variables

All variables present here: main.yml.

Example Playbook

- hosts: test_group
  vars:
    lvm_vgs:
     - name: extra
       disks:
       - /dev/vdb
       - /dev/vdc

    lvm_volumes:
     - name: docker
       vg: extra
       size: 3G
       fstype: xfs
       path: "/var/lib/docker"
       opts: "-n ftype=1"
     - name: test
       vg: extra
       size: 2G
       fstype: ext4
       path: "/var/lib/test"
  roles:
    - novomatic-tech/storage-init

License

MIT

Author Information

This role was created in 2018 for Novomatic Technologies Poland purposes.

About

Ansible storage initialization role for RedHat/CentOS server

License:MIT License


Languages

Language:Shell 68.8%Language:Python 31.2%