Giter Club home page Giter Club logo

puppet-pkgng's Introduction

Puppet-pkgng

Build Status

A package provider for FreeBSD's PkgNG package manager.

This module contains the provider as well as some implementation around configuring the pkg.conf file. If you are building your own PkgNG packages, you may also want to look at the poudriere module.

Installation

The easiest way to install is to install from the forge.

puppet module install zleslie/pkgng

Then to configure your system to use PkgNG with all default settings, a simple include will do.

include pkgng

You may wish to override settings though, to do this simply use it as a class:

class { 'pkgng':
  purge_repos_d => false,
  options       => [
    'PKG_ENV : {',
    ' http_proxy: "http://proxy:3128"',
    '}',
  ],
}

By default, this module will erase the default repository and you'll want to define some. To disable this behaviour you can use the example above of setting purge_repos_d to false.

Using specific repositories is as simple as a Puppet resource.

pkgng::repo { 'pkg.freebsd.org': }  # You'll want this one!
pkgng::repo { 'my.own.repo': }      # You can then specify more...

Installation via R10K

You can also clone this repo to somewhere in your modulepath, or use something like r10k to deploy your modules. R10k is sweet. For those not familiar, check out Finch's blog post on the subject of module deployment.

To track the git repository, a line in your Puppetfile that looks something like the following should get you started.

mod 'pkgng', :git => 'git://github.com/xaque208/puppet-pkgng.git', :ref => '0.2.0'

Installation via Librarian-Puppet

Installation via Librarian-Puppet is straight forward, simply add the following to your Puppetfile

mod 'zleslie/pkgng'

Usage

Once you have the module installed, you can use it by simply adding a site default in site.pp that looks like this.

Package {
  provider => pkgng
}

Now every package that you install will use the PkgNG provider.

With multiple repositories defined, a package can be installed from a specific repo by giving a URN locator for that repository like this.

pkgng::repo { 'my.own.repo': }

package { 'puppet':
  source => 'urn:freebsd:repo:my.own.repo',
}

If you have multible repos provinding the same package you can prefer one repo over the other by increasing the priority. The dafult priority is 0 and higher priorities are prefered

pkgng::repo { 'pkg.freebsd.org': }  
pkgng::repo { 'my.own.repo':
  priority => 10,
}

package {'wget': }

With the above config if the wget package exists in both repositories it would be installed from my.own.repo

Contributing

Please help make this module better. Send pull request, file issues, be mindful of the tests and help improve where you can.

puppet-pkgng's People

Contributors

aduitsis avatar b4ldr avatar bwalex avatar geoffgarside avatar georgepearman avatar kubicek avatar langseth avatar leepa avatar m8t avatar rmelcer avatar sathieu avatar sc68cal avatar skoef avatar smortex avatar strangelittlemonkey avatar tdb avatar zachfi 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.