Skip to content

Commit

Permalink
Merge pull request #2221 from nickanderson/CFE-3181/3.12
Browse files Browse the repository at this point in the history
CFE-3181/3.12: Added Docs for package_module interpreter and module_path
  • Loading branch information
nickanderson committed Oct 15, 2019
2 parents 1775d47 + 74651c8 commit e36f3a4
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions reference/promise-types/packages.markdown
Expand Up @@ -292,6 +292,61 @@ other conditions.

**See Also:** `Package Modules`

#### interpreter

**Description:** Absolute path to the interpreter to run the package module (script) with.

If the package module is implemented as a script, it has to be executed with
some interpreter. Using a hashbang/shebang may not always be possible or easy
(different versions/paths of python, etc.). This attribute tells CFEngine the
path to the interpreter to use when running the package module.

**Type:** `string`

**Allowed input range:** (arbitrary string)

**Example:**

```cf3
body package_module apt_get
{
# better use variable like $(def.python)
interpreter => "/usr/bin/python3.6";
}
```

**See Also:** `Package Modules`

**History:** Introduced in 3.13.0, 3.12.2

#### module_path

**Description:** Absolute path to the the package module.

By default, the package module implementation has to be in a file with the same
name as the package module itself, under the `$(sys.workdir)/modules/packages`
directory. In some cases, it might be useful to use a different name or path or
to have multiple package modules using the same implementation just with
different attributes (e.g. `default_options`).

**Type:** `string`

**Allowed input range:** (arbitrary string)

**Example:**

```cf3
body package_module yum_all_repos
{
module_path => $(sys.workdir)/modules/packages/yum;
default_options => { "--enablerepo=*" };
}
```

**See Also:** `Package Modules`

**History:** Introduced in 3.13.0, 3.12.2

## Package modules out-of-the-box
### yum

Expand Down

0 comments on commit e36f3a4

Please sign in to comment.