Commit 3e8aa6dbbf8c427341d0a8d86d788537d141008c
1 parent
eb6290f4b8
Update README.md including module documentation
The README.md has more detailed instructions on how to include modules from Github by editing your Puppetfile and site.pp files.
Showing 1 changed file with 43 additions and 0 deletions Side-by-side Diff
README.md
... | ... | @@ -88,6 +88,49 @@ |
88 | 88 | tested to be compatible with Boxen. Use the `Puppetfile` to pull them |
89 | 89 | in dependencies automatically whenever `boxen` is run. |
90 | 90 | |
91 | +### Including boxen modules from github (boxen/puppet-<name>) | |
92 | + | |
93 | +You must add the github information for your added Puppet module into your Puppetfile at the root of your | |
94 | +boxen repo (ex. /path/to/your-boxen/Puppetfile): | |
95 | + | |
96 | + # Core modules for a basic development environment. You can replace | |
97 | + # some/most of these if you want, but it's not recommended. | |
98 | + | |
99 | + github "dnsmasq", "1.0.0" | |
100 | + github "gcc", "1.0.0" | |
101 | + github "git", "1.0.0" | |
102 | + github "homebrew", "1.0.0" | |
103 | + github "hub", "1.0.0" | |
104 | + github "inifile", "0.9.0", :repo => "cprice-puppet/puppetlabs-inifile" | |
105 | + github "nginx", "1.0.0" | |
106 | + github "nodejs", "1.0.0" | |
107 | + github "nvm", "1.0.0" | |
108 | + github "ruby", "1.0.0" | |
109 | + github "stdlib", "3.0.0", :repo => "puppetlabs/puppetlabs-stdlib" | |
110 | + github "sudo", "1.0.0" | |
111 | + | |
112 | + # Optional/custom modules. There are tons available at | |
113 | + # https://github.com/boxen. | |
114 | + | |
115 | + github "java", "1.0.5" | |
116 | + | |
117 | +In the above snippet of a customized Puppetfile, the bottom line | |
118 | +includes the Java module from Github using the tag "1.0.5" from the github repository | |
119 | +"boxen/puppet-java". The function "github" is defined at the top of the Puppetfile | |
120 | +and takes the name of the module, the version, and optional repo location: | |
121 | + | |
122 | + def github(name, version, options = nil) | |
123 | + options ||= {} | |
124 | + options[:repo] ||= "boxen/puppet-#{name}" | |
125 | + mod name, version, :github_tarball => options[:repo] | |
126 | + end | |
127 | + | |
128 | +Now Puppet knows where to download the module from when you include it in your site.pp or mypersonal.pp file: | |
129 | + | |
130 | + # include the java module referenced in my Puppetfile with the line | |
131 | + # github "java", "1.0.5" | |
132 | + include java | |
133 | + | |
91 | 134 | ### Node definitions |
92 | 135 | |
93 | 136 | Puppet has the concept of a |