Giter Site home page Giter Site logo

attachmentgenie-network's Introduction

Build Status

Puppet Network Module

Module for configuring network interfaces.

Tested on Debian GNU/Linux 6.0 Squeeze and Ubuntu 10.4 LTS and 12.04 LTS with Puppet 2.6 and 2.7. Patches for other operating systems are welcome.

Usage

By including the network::interfaces class you get a basic configuration with only a loopback interface:

include network::interfaces

You can enable the eth0 interface configured with DHCP:

class { "network::interfaces":
  interfaces => {
    "eth0" => {
      "method" => "dhcp",
    }
  },
  auto => ["eth0"],
}

Or you can enable the eth0 interface with a static configuration:

class { "network::interfaces":
  interfaces => {
    "eth0" => {
      "method" => "static",
      "address" => "10.0.0.50",
      "netmask" => "255.255.255.0",
      "gateway" => "10.0.0.1",
    }
  },
  auto => ["eth0"],
}

It's also possible to create two interfaces on the same ethernet device:

class { "network::interfaces":
  interfaces => {
    "eth0" => {
      "method" => "static",
      "address" => "10.0.0.50",
      "netmask" => "255.255.255.0",
      "gateway" => "10.0.0.1",
    }
    "eth0:1" => {
      "method" => "static",
      "address" => "10.0.0.60",
      "netmask" => "255.255.255.0",
    }
  },
  auto => ["eth0", "eth0:1"],
}

You can create pseudo interfaces which are useful for handling different wireless networks:

class { "network::interfaces":
  interfaces => {
    "work" => {
      "method" => "dhcp",
      "wpa-ssid" => "work-wlan",
      "wpa-psk" => "supersecretkey",
    }
    "open" => {
      "method" => "dhcp",
      "wireless-essid" => "open-wlan",
    }
  },
  mappings => {
    "wlan0" => {
      "script" => "guessnet-ifupdown",
      "maps" => ["timeout: 5", "work"],
    }
  },
  auto => ["wlan0"],
}

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.