Giter VIP home page Giter VIP logo

ansible-manage-lvm's Introduction

Role Name

An Ansible role to manage LVM Groups/Logical Volumes.

NOTE: Can be used to create, extend or resize LVM Groups and volumes.

Requirements

Devices/disks to be members of the LVM setup must be identified prior to using this role.

NOTE: Ensure that you select the correct devices/disks.

NOTE: To create an LVM VG w/out creating LVM LVOLS...define lvname w/ var as None as in the below example.

Role Variables

---
# defaults file for ansible-manage-lvm
lvm_groups: []
  # - vgname: ubuntu-vg
  #   disks:
  #     - /dev/sda5
  #     - /dev/sdc
  #     - /dev/sdd
  #   # defines if VG should exist or be removed
  #   # true or false
  #   create: true
  #   lvnames:
  #     - lvname: swap_1
  #       # Define size of lvol
  #       # 100%FREE, 10g, 1024 (megabytes by default)
  #       size: 5g
  #       # Defines additional lvcreate options (e.g. stripes, stripesize, etc)
  #       opts: ''
  #       # Defines if lvol should exist or be removed
  #       # true or false
  #       create: true
  #       # Defines filesystem to format lvol as
  #       filesystem: swap
  #       # Defines if filesystem should be mounted
  #       mount: false
  #       # Defines mountpoint for lvol
  #       mntp: []
  #       # Defines additional mount options (e.g. noatime, noexec, etc)
  #       mopts: ''
  #     - lvname: root
  #       size: 40g
  #       create: true
  #       filesystem: ext4
  #       mount: true
  #       mntp: /
  # - vgname: test-vg
  #   disks:
  #     - /dev/sdb
  #   create: true
  #   lvnames:
  #     - lvname: test_1
  #       size: 5g
  #       create: true
  #       filesystem: ext4
  #       mount: true
  #       mntp: /mnt/test_1
  #     - lvname: test_2
  #       size: 10g
  #       create: true
  #       filesystem: ext4
  #       mount: true
  #       mntp: /mnt/test_2
  # - vgname: cinder-volumes
  #   disks:
  #     - /dev/cciss/c0d1
  #   create: true
  #   lvnames:
  #   # Set to None to only create LVM VG w/out creating LVM LVOLS
  #    - None

# Defines if LVM will be managed by role
# default is false to ensure nothing is changed by accident.
manage_lvm: false

Dependencies

None

Example Playbook

---
- hosts: test-nodes
  vars:
    lvm_groups:
      - vgname: test-vg
        disks:
          - /dev/sdb
          - /dev/sdc
        create: true
        lvnames:
          - lvname: test_1
            size: 5g
            create: true
            filesystem: ext4
            mount: true
            mntp: /mnt/test_1
          - lvname: test_2
            size: 10g
            create: true
            filesystem: ext4
            mount: true
            mntp: /mnt/test_2
    manage_lvm: true
    pri_domain_name: 'test.vagrant.local'
  roles:
    - role: ansible-manage-lvm
  tasks:

License

BSD

Author Information

Larry Smith Jr.

ansible-manage-lvm's People

Contributors

davidcaste avatar emper0r avatar faisalnizam avatar markgoddard avatar mikap83 avatar mrlesmithjr avatar oneswig avatar rohitkothari avatar stefanheimberg avatar zoobert avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.