File: README.md

package info (click to toggle)
librarian-puppet-simple 0.0.5-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 112 kB
  • sloc: ruby: 517; makefile: 4
file content (69 lines) | stat: -rw-r--r-- 2,749 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# librarian-puppet-simple

This project was created out of my frustration with dependency management in librarian-puppet, some people need external dependencies, I just need to be able to pin revisions for a collection of modules, and I found the dependency managment features of librarian-puppet too heavy for my simple use case.

This project just has fewer commands, but they should be compatible with the original librarian-puppet:

### Clean
Remove the directory where the modules will be installed. At the moment the supported options are:
* `--verbose` display progress messages
* `--path` override the default `./modules` where modules will be installed

```
  librarian-puppet clean [--verbose] [--path]
```

### Install
Iterates through your Puppetfile and installs git sources. At the moment the supported options are:
* `--verbose` display progress messages
* `--clean` remove the directory before installing modules
* `--path` override the default `./modules` where modules will be installed
* `--puppetfile` override the default `./Puppetfile` used to find the modules

```
  librarian-puppet install [--verbose] [--clean] [--path] [--puppetfile]
```

### Update
Iterates through your Puppetfile and updates git sources. If a SHA-1 hash is specified in the `:ref`, the module will not be updated.

Supported options are:<br/>
<li>`--verbose` display progress messages</li>
<li>`--path` override the default `./modules` where modules will be installed</li>
<li> `--puppetfile` override the default `./Puppetfile` used to find the modules</li>

```
  librarian-puppet update [--verbose] [--path] [--puppetfile]
```

## Puppetfile
The processed Puppetfile may contain two different types of modules, `git` and `tarball`. The `git` option accepts an optional `ref` parameter.

The module names can be namespaced, but the created directory will only contain the last part of the name. For example, a module named `puppetlabs/ntp` will generate a directory `ntp`, and so will a module simply named `ntp`.

Here's an example of a valid Puppetfile showcasing all valid options:

```
mod "puppetlabs/ntp",
    :git => "git://github.com/puppetlabs/puppetlabs-ntp.git",
    :ref => "99bae40f225db0dd052efbf1d4078a21f0333331"

mod "apache",
    :tarball => "https://forge.puppetlabs.com/puppetlabs/apache/0.6.0.tar.gz"
```

## Setting up for development and running the specs
Just clone the repo and run the following commands:
```
bundle exec install --path=vendor
bundle exec rspec
```

Beware that the functional tests will download files from GitHub and PuppetForge and will break if either is unavailable.

## License

See [LICENSE](/LICENSE)

## Credits
The untar and ungzip methods came from https://gist.github.com/sinisterchipmunk/1335041