GithubHelp home page GithubHelp logo

dantman / puppet-swap_file Goto Github PK

View Code? Open in Web Editor NEW

This project forked from petems/petems-swap_file

0.0 2.0 0.0 602 KB

A Puppet module to manage swapfiles for Linux Environments

Home Page: https://github.com/petems/puppet-swap_file

License: Apache License 2.0

Ruby 77.77% Puppet 20.01% Pascal 2.22%

puppet-swap_file's Introduction

####Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Limitations
  6. Development

##Overview

Manage swap files for your Linux environments. This is based on the gist by @Yggdrasil, with a few changes and added specs.

##Setup

###What swap_file affects

  • Creating files from the path given using /bin/dd
  • Swapfiles on the system
  • Any mounts of swapfiles

##Usage

The simplest use of the module is this:

swap_file::files { 'default':
  ensure   => present,
}

By default, the module it will:

  • create a file using /bin/dd atr /mnt/swap.1 with the default size taken from the $::memorysizeinbytes
  • A mount for the swapfile created

For a custom setup, you can do something like this:

swap_file::files { 'tmp file swap':
  ensure   => present,
  swapfile => '/tmp/swapfile',
  mount    => false,
}

To remove a prexisting swap, you can use ensure absent:

swap_file::files { 'tmp file swap':
  ensure   => absent,
}

Previous to 1.0.1 Release

Previously you would create swapfiles with the swap_file class:

class { 'swap_file':
   swapfile => '/mount/swapfile',
   swapfilesize => '100 MB',
}

However, this had many problems, such as not being able to declare more than one swap_file because of duplicate class errors.

This is now deprecated and will give a warning.

##Limitations

Primary support is for Debian and RedHat, but should work on all Linux flavours.

Right now there is no BSD support, but I'm planning on adding it in the future

##Development

Follow the CONTRIBUTING guidelines! :)

puppet-swap_file's People

Contributors

bodgit avatar mattock avatar ozbillwang avatar petems avatar

Watchers

 avatar  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.