Forge Home


the custom types needed to manage partitions and partition tables.


20,286 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.2.0 (latest)
  • 0.1.0
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Mar 27th 2015
This version is compatible with:
  • Puppet Enterprise >=2.7.20
  • Puppet >=2.7.20
  • , , ,
This module has been deprecated by its author since Jun 13th 2019.

The reason given was: No longer maintained

The author has suggested enterprisemodules-partition as its replacement.

Start using this module


hajee/partition — version 0.2.0 Mar 27th 2015

Build Status

####Table of Contents

Powered By EasyType

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with partition
  4. Usage - Configuration options and additional functionality
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module


This module contains the custom types to manage partitions and partition tables. It implemements most of the linux parted functionality.

##Module Description

This module contains custom types that can help you manage DBA objects in an Oracle database. It runs after the database is installed. IT DOESN'T INSTALL the Oracle database software. With this module, you can setup a database to receive an application. You can:


###What partition affects

The types in this module will change disks. Most of the functionality is destructive. Just like adding or changing partitions normaly is. So be careful. Be sure to have a goof backup of the devices you want these types to manage.

###Setup Requirements

This module is based on easy_type. So you need to install easy_type, and this module.

puppet module install hajee/easy_type
puppet module install hajee/partition


The module contains the following types:

partition and partition_table

Here are a couple of examples on how to use them.


partition_table {'/dev/sda':
  ensure  => 'msdos',

This puppet statement create's a msdos partition table on device /dev/sda. Any partitions available on the disk before this statement, are wipped. You can use the following partition types:

  • bsd
  • loop (raw disk access)
  • gpt
  • mac
  • msdos
  • pc98
  • sun


partition { '/dev/hda:1':
  ensure    => 'present',
  boot      => 'true',
  end       => '107MB',
  fs_type   => 'ext3',
  lvm       => 'false',
  part_type => 'primary',
  start     => '32.3kB',

When you add a gpt partition, you have to set the partition name. If you specify a partition_type, it is simply ignored.

partition { '/dev/hda:1':
  ensure    => 'present',
  boot      => 'true',
  end       => '107MB',
  part_name => 'my_part',
  start     => '32.3kB',

This pupet code manages the first partition on /dev/hda. To check what all properties mean, checkout the documentation.


This module is developed on a CentOS 5 system. It uses parted to do the actual work. Because parted uses it's own units for start and end parameters, you have to be careful to match the unit's it returns when using a parted -l versus what's in your manifest. I intend to improve on tis, but it's not there yet.


This is an open projects, and contributions are welcome.

###OS support

Currently we have tested:

  • CentOS 5.8
  • CentOS 6.5

It would be great if we could get it working and tested on:

  • Debian
  • Ubuntu
  • ....


Sorry, not tests yet.