• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

gildas/puppet-homebrew: Homebrew for Mac OS/X package installer and provider for ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

gildas/puppet-homebrew

开源软件地址:

https://github.com/gildas/puppet-homebrew

开源编程语言:

Ruby 59.3%

开源软件介绍:

puppet-homebrew

Description

Homebrew for Mac OS/X package installer and provider for PuppetLabs.

=======

Overview

The Homebrew module provides manifest classes to install Homebrew as well as a package provider to install brews from homebrew.

Setup

Simply load the module via Puppet Forge:

puppet module install gildas-homebrew

Usage

Installing Homebrew

To install Homebrew, include the main class in your node definition:

Caveat:

include homebrew

Provided you already have a compiler installed!

If you do not have a compiler installed or if the compiler is out-of-date, you will want to load one with the class:

class {'homebrew':
  xcode_cli_source  => 'https://my_repo/commandline_tools_os_x_mavericks_for_xcode__march_2014.dmg',
  xcode_cli_version => '5.1',
}

Note: these 2 arguments are now optional. In that case, the installation will assume Xcode is installed properly.

  • Caveat: To download the Xcode command line tools, you must have an Apple ID.

By default, homebrew will be installed as root/wheel, which might not be the desired choice. To install on behalf of another user, use these parameters:

class {'homebrew':
  user  => gildas,
  group => brew,
}

to test if Homebrew was installed, just check the Fact has_homebrew (or has_brew)

Installing brews

To install brews, use the package provider as follows:

package {'macvim':
  ensure   => installed,
  provider => brew,
  linkapps => true, 
}

Setting linkapps to true will run "brew linkapps" once the package is installed. This is necessary if the installed application should be visible in Finder's Applications.

brew will run under the user that was used to install it.

Install-time options are given as follows:

package {'macvim':
  ensure          => installed,
  provider        => brew,
  linkapps        => true, 
  install_options => [ '--override-system-vim' ],
}

Tapping repositories

To tap into new Github repositories, simply use the tap provider:

package {'homebrew/binaries':
  ensure   => present,
  provider => tap,
}

You can untap a repository by setting ensure to absent.

Hiera configuration

If you use hiera, the puppet class homebrew will search for an entry called "packages". All packages inside that hash will get installed by the homebrew class. Note that packages are merged via the hash method in Hiera. This allows to install common packages on nodes of the same OS, then specific packages on some nodes.

E.g:

{
  "packages": {
    "homebrew/binaries": { "provider": "tap" },
    "vim": {},
    "macvim": {},
    "tree": {},
    "multitail": {}
  }
}

Authors/Contributors

Gildas Cherruel endorse

John Eckhart

Jasper Lievisse Adriaanse

Dominic Scheirlinck

Martin Skinner

License

Copyright (c) 2014 Gildas CHERRUEL (Apache License, Version 2.0)




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap