Code Monkey home page Code Monkey logo

rhel_vmware_disk_manager's Introduction

Ansible role rhel_vmware_disk_manager

1- Add vmware disk, partition, lvg, lvol, format, mount and * extend * lv for rhel 7 and 8 (option a or b or c or d or e or f)
2- Existing LV / mountpoint extension. the vg in question must have enough space, please check before (option g)

Required

Have access to the python API vmware pyvmomi / python 3.6
Have the latest copy of vmware_guest_disk_facts_beta.py
Limit ansible must be the server in question (with FQDN)
The os system disk must be scsi_id: 0 and unit_number: 0 (this should be the default)

Dependences

Have access to the python API vmware pyvmomi

Limitations

Set_fact tasks have "ignore_errors: true". set_fact is not ignored if option g
Existing LV / mountpoint extension (option g), the vg in question must have enough space
Only 4 SCSI controllers are allowed per virtual machine.
You must take precautions when specifying scsi_controller = 0 and unit_number = 0 because this disk may contain an operating system.
The os system disk must be scsi_id: 0 and unit_number: 0 (default)
unit_number (integer): disk unit number. Valid values range from 0 to 15. Only 15 disks are allowed per SCSI controller.

Client variables

The following variables can be defined by the customer

| Variable | Example | Comments (type) |
| rhel_vmware_disk_manager__vmdisk_name | serverx | Server name (without FQDN) |
| rhel_vmware_disk_manager__vmdisk_size_gb | 100 | Disk size in gig |
| rhel_vmware_disk_manager__lv_size_gb | 96 | Space in gig at the end of the LV |
| rhel_vmware_disk_manager__vmdisk_vg_name | domvg006 | VG's name (vgappl or system most of the time) |
| rhel_vmware_disk_manager__vmdisk_lv_name | domlv006 | Name of the LV. EX: "lvoptvmware" for /opt/vmware |
| rhel_vmware_disk_manager__vmdisk_path_name | /dompath006 | The path for the mountpoint. EX: for /opt/vwware |
| rhel_vmware_disk_manager__vmdisk_path_option | defaults | mp opts Ex:"rw,relatime,seclabel,attr2,inode64,noquota" |
| rhel_vmware_disk_manager__vmdisk_fs_type | xfs | Type of filesystem (xfs most of the time) eg ext4 or xfs|
| rhel_gestion_disk_vmware__options | f | User choice a-b-c-d-e-f-g |

POSSIBLE CHOICE:  
a: Adding a disk (raw device)
b: Adding a disk + partition
c: Adding a disk + partition + add the disk to the requested VG
d: Addition of a disk + partition + add the disk to the requested VG + Creation of the requested LV
e: Adding a disk + partition + adding the disk to the requested VG + Creating the requested LV + formatting the filesystem
f: Adding a disk + partition + adding the disk to the requested VG + Creating the requested LV + formatting the filesystem + mount the mountpoint
g: Existing mountpoint only (the vg in question must have enough space, please check before) LVEXTEND

For other variables for the role, see the file defaults / main.yml

Author

Dominic D'Apice (https://github.com/dapiced)

Reference

[https://docs.ansible.com/ansible/latest/modules/vmware_guest_disk_module.html]
[https://docs.ansible.com/ansible/latest/modules/vmware_guest_disk_facts_module.html]
[https://github.com/ansible/ansible/pull/58117/files] (vmware_guest_disk_facts_module beta)
[https://docs.ansible.com/ansible/latest/modules/vmware_vm_facts_module.html]

rhel_vmware_disk_manager's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

joaomjoia

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.