diff --git a/.github/workflows/bump-hugo-version.yml b/.github/workflows/bump-hugo-version.yml new file mode 100644 index 000000000..0617c3cf7 --- /dev/null +++ b/.github/workflows/bump-hugo-version.yml @@ -0,0 +1,42 @@ +name: Hugo version update + +on: + schedule: + - cron: "0 0 * * 0" #perform every sunday's night + workflow_dispatch: + +jobs: + update_hugo_version: + if: github.repository_owner == 'cfengine' || github.repository_owner == 'mendersoftware' || github.repository_owner == 'NorthernTechHQ' + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + - name: Fetch latest Hugo release info + id: fetch_hugo_version + run: | + release_info=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest) + version=$(echo "$release_info" | jq -r '.tag_name' | sed 's/v//') + # download checksums and find checksum of hugo_${version}_Linux-64bit.tar.gz + checksum=$( curl -sSL https://github.com/gohugoio/hugo/releases/download/v${version}/hugo_${version}_checksums.txt | grep hugo_${version}_Linux-64bit.tar.gz | grep -oE "[a-z0-9]{64}") + echo "version=$version" >> $GITHUB_OUTPUT + echo "checksum=$checksum" >> $GITHUB_OUTPUT + + - name: Update install_hugo.sh + run: | + sed -i "s|https://github.com/gohugoio/hugo/releases/download/v.*_Linux-64bit.tar.gz|https://github.com/gohugoio/hugo/releases/download/v${{ steps.fetch_hugo_version.outputs.version }}/hugo_${{ steps.fetch_hugo_version.outputs.version }}_Linux-64bit.tar.gz|" generator/build/install_hugo.sh + sed -i "s/.*sha256sum.*/RUN echo \"${{ steps.fetch_hugo_version.outputs.checksum }} hugo.tar.gz\" | sha256sum -c/" generator/build/install_hugo.sh + - name: Create Pull Request + uses: cfengine/create-pull-request@v7 + with: + commit-message: Upgraded Hugo version to ${{ steps.fetch_hugo_version.outputs.version }} + title: Upgraded Hugo version to ${{ steps.fetch_hugo_version.outputs.version }} + body: | + This PR updates the version of Hugo used in the generator/build/install_hugo.sh to ${{ steps.fetch_hugo_version.outputs.version }}. + reviewers: | + aleksandrychev + + branch: hugo-version-update-${{ steps.fetch_hugo_version.outputs.version }} + sign-commits: true diff --git a/.github/workflows/markdowner.py b/.github/workflows/markdowner.py index 3d274e14f..c5d80e49e 100644 --- a/.github/workflows/markdowner.py +++ b/.github/workflows/markdowner.py @@ -51,19 +51,6 @@ def process_codeblock(lines, filename, lineno_start): prefix = begin[0 : begin.index("```")] lang = begin[len(prefix) + 3 :].strip() - # If the first line is a `[file=` label line, re-indent it to the same - # level as the code block: - file_line = None - if lines[0].strip().startswith("[file="): - file_line = lines[0] - should_be = prefix + file_line.strip() - if file_line != should_be: - lines[0] = should_be - file_line = should_be - print( - f"{filename}:{lineno_start}: Re-indented file line inside code block: {file_line.strip()}" - ) - # Checks for warnings which make us leave the code block alone: if not end == (prefix + "```"): @@ -73,11 +60,6 @@ def process_codeblock(lines, filename, lineno_start): lineno = lineno_start for i, line in enumerate(lines): - # If the first line is a [file=] label line, skip it, - # we've already indented it correctly above: - if i == 0 and file_line: - lineno += 1 - continue # Empty lines are already correct, skip them: if line == "": lineno += 1 @@ -95,11 +77,6 @@ def process_codeblock(lines, filename, lineno_start): common_indent = None lineno = lineno_start for i, line in enumerate(lines): - # Don't consider [file= label line for common indent, - # we indented it to same level as opening backticks above: - if i == 0 and file_line: - lineno += 1 - continue # Don't consider empty lines for common indentation: if line == "": lineno += 1 @@ -126,9 +103,7 @@ def process_codeblock(lines, filename, lineno_start): # Remove common indent if found: if common_indent is not None and common_indent > 0: spaces = common_indent - if file_line: - lines = lines[1:] - lines = ([file_line] if file_line else []) + [ + lines = [ x if x == "" else x[0 : len(prefix)] + x[len(prefix) + spaces :] for x in lines ] @@ -233,8 +208,8 @@ def perform_edits(content, flags, filename): replacements = { # Empty line (double newline) before command: r"(? pull-request-title" + sh "echo \"${pullRequest.body}\" > pull-request-body" + } + } + sh "curl -O https://raw.githubusercontent.com/cfengine/buildscripts/refs/heads/master/ci/create-revisions-file.sh" + sh "chmod u+x ./create-revisions-file.sh" + sh "./create-revisions-file.sh" + sh "cat revisions" + sh "curl -O https://gitlab.com/Northern.tech/OpenSource/GODS/-/raw/master/parallel_git_rev_fetch.sh" + sh "chmod u+x ./parallel_git_rev_fetch.sh" + + withCredentials([sshUserPrivateKey(credentialsId:"autobuild", keyFileVariable: "key")]) { + sh 'export GIT_SSH_COMMAND="ssh -i $key"; ./parallel_git_rev_fetch.sh revisions' + } + } + } + stage('Build documentation') { + steps { + sh 'bash -x documentation/generator/build/run.sh' + } + } + stage('Publish to buildcache') { + steps { + sshPublisher( + // we must use alwaysPublishFromMaster: true because our CONTAINERS build hosts are not in the private network which has access to buildcache.cloud.cfengine.com + alwaysPublishFromMaster: true, + publishers: [ + sshPublisherDesc( + configName: 'buildcache.cloud.cfengine.com', + transfers: [ + sshTransfer( + cleanRemote: false, + excludes: '', + execCommand: ''' +#!/usr/bin/env bash +set -x +WRKDIR="$(pwd)" +export WRKDIR + +mkdir -p upload +mkdir -p output + +# find two tarballs +archive="$(find upload -name "cfengine-documentation-*.tar.gz")" +tarball=$(findfind upload -name packed-for-shipping.tar.gz) +echo "TARBALL: $tarball" +echo "ARCHIVE: $archive" + +# unpack $tarball +( # shubshell to change directories + cd "$(dirname "$tarball")" || exit + tar zxvf packed-for-shipping.tar.gz + rm packed-for-shipping.tar.gz + + # move $archive to the _site + mv "$WRKDIR/$archive" _site + + ls -la +) + +ls -la upload + +# note: this triggers systemd job to AV-scan new files +# and move them to proper places +mv upload/* output +''', + execTimeout: 120000, + flatten: false, + makeEmptyDirs: false, + noDefaultExcludes: false, + patternSeparator: '[, ]+', + remoteDirectory: getRemoteDirectory(), + remoteDirectorySDF: false, + removePrefix: '', + sourceFiles: 'output/' + ) // sshTransfer + ], // transfers + usePromotionTimestamp: false, + useWorkspaceInPromotion: false, + verbose: false + ) // sshPublisherDesc + ] // publishers + ) // sshPublisher + } // steps + } // stage('Publish to buildcache') + } // stages +} +def getDOCS_BRANCH() { + if (env.DOCS_BRANCH) { + return env.DOCS_BRANCH + } else if (env.CHANGE_ID) { + return "${env.CHANGE_TARGET}" + } else { + return "${env.BRANCH_NAME}" + } +} +def getPR_BASE() { + if (env.CHANGE_ID) { + return "${pullRequest.base}" + } else { + return "" + } +} +def getRemoteDirectory() { + return "upload/${env.BUILD_TAG}/build-documentation-${env.DOCS_BRANCH}/${env.BUILD_TAG}/" +} diff --git a/README.md b/README.md index 3e839a043..e2294c64c 100644 --- a/README.md +++ b/README.md @@ -10,64 +10,193 @@ like to invite you to collaborate here! If you would like to notify us about incorrect documentation, but don't have the time or the knowledge to make a correction directly here, then you can report the issue in the regular [CFEngine bug -tracker](https://cfengine.com/dev/projects/core). Use the "Documentation" +tracker](https://cfengine.com/dev/projects/core). Use the "Documentation" category when you create bugs. And of course you can search the bug tracker for known issues with the documentation, and help the community of CFEngine users by correcting some of them. -## Writing documentation +## Contributing to the documentation The CFEngine documentation is written in regular [markdown](https://daringfireball.net/projects/markdown/syntax), with some extensions as documented below. Check out the -[cheatsheet](https://docs.cfengine.com/docs/master/markdown-cheatsheet.html)! - -To keep the source readable in Git and workable with a broad range of tools, -keep the line length in paragraphs below 78 characters. +[cheatsheet](https://github.com/cfengine/documentation/blob/master/cheatsheet.markdown?plain=1)! If you don't know Git, then you can still contribute to the documentation using the GitHub interface as long as you have a GitHub account. Fork this -repository (called the *upstream*) using the GitHub web interface, make +repository (called the _upstream_) using the GitHub web interface, make changes in your fork and create pull requests so that your changes can be -merged into the *upstream* repository. +merged into the _upstream_ repository. It is in general advisable to make small commits that are submitted through pull requests frequently. Otherwise any structural changes to documentation content can cause merge conflicts that are hard to resolve. +## Writing guidelines + +In order to make our documentation, blog posts, and website as consistent and easy to understand as possible, for both readers and writers, please follow the guidelines below. + +### Spelling + +CFEngine documentation follows American spelling, use the [Merriam Webster online dictionary](https://www.merriam-webster.com/) if you are unsure about the spelling of some words. + +### Punctuation + +**Oxford comma** + +In punctuation, a serial comma (also called Oxford comma) needs to be placed +immediately before the conjunction (often "and" or "or") in a series of three +or more terms. + +_Example:_ + +I would like crackers, cheese, and garlic. + +**The comma as a separator between compound sentences** + +Use comma to separate independent clauses when they are joined by any of +these seven coordinating conjunctions: and, but, for, or, nor, so, yet. + +However, the comma can be dropped in the following cases: + +- if both independent clauses are quite short, especially if the two clauses + are very closely related, and even more so if the subject of both clauses is + the same, or +- if only the first clause is quite short, especially if the two clauses are + very closely related, and even more so if the subject of both clauses is the + same. + +### Headings + +The title you put in the frontmatter will be `
+classes:
+ services_autorun:
+ - "any"
```
-* List item with code
+#### Code blocks and lists
-
-
-
-You can also use backticks (and get syntax highlighting) - just make sure the backticks are indented once:
+If you want to include a code block within a list, align it just as you would with a sentence, and use triple backticks:
1. First
- ```cf3
- # CFEngine block
+ ```cf3
+ # CFEngine block
- bundle agent example()
- {
- }
- ```
+ bundle agent example() {}
+ ```
2. Second
3. Third
1. First
- ```cf3
- # CFEngine block
+ ```cf3
+ # CFEngine block
- bundle agent example()
- {
- }
- ```
+ bundle agent example() {}
+ ```
2. Second
3. Third
+### Headers
-*****
+#### Horizontal bar
-## Headers
+`---`
-### Horizontal bar
-
-`***`
-
-***
+---
-`# Level 1`
+## CFEngine extensions - custom macros
-# CFEngine extensions
-## Example policy from core
+### Include example policy from core
Examples from cfengine/core can be rendered using the `CFEngine_include_example` macro.
@@ -529,51 +501,28 @@ Examples from cfengine/core can be rendered using the `CFEngine_include_example`
`[\%CFEngine_include_example(class-automatic-canonificiation.cf)\%]`
{% raw %}
- [%CFEngine_include_example(class-automatic-canonificiation.cf)%]
+ {{< CFEngine_include_example(class-automatic-canonificiation.cf) >}}
{% endraw %}
-## Include snippet of text from a file
+### Include snippet of text from a file
Sometimes it's nice to include a snippet from another file. For example, we dynamically generate the `--help` output for each component on each doc build and that output is included on each component page.
- `[%CFEngine_include_snippet(cf-promises.help, [\s]*--[a-z], ^$)%]`
-
- [%CFEngine_include_snippet(cf-promises.help, [\s]*--[a-z], ^$)%]
-
-
-# Level 1
-
-`## Level 2`
-
-## Level 2
-
-`### Level 3`
-
-### Level 3
+`{{< CFEngine_include_snippet(cf-promises.help, [\s]*--[a-z], ^$) >}}`
-`#### Level 4`
+{{< CFEngine_include_snippet(cf-promises.help, [\s]*--[a-z], ^$) >}}
-#### Level 4
-
-`##### Level 5`
-
-##### Level 5
-
-`###### Level 6`
-
-###### Level 6
-
-*****
+---
-## Including external files
+### Including external files
Sometimes it's nice to include an external file
-[%CFEngine_include_markdown(masterfiles/CHANGELOG.md)%]
+{{< CFEngine_include_markdown(masterfiles/CHANGELOG.md) >}}
-### Including chunks of policy from the MPF
+#### Including chunks of policy from the MPF
Here I am including a bundle named `cfe_autorun_inventory_listening_ports`. It may be a common or an agent bundle (in case the bundle ever changes types).
@@ -583,7 +532,7 @@ Here I am including a bundle named `cfe_autorun_inventory_listening_ports`. It m
[%CFEngine_include_snippet(inventory/any.cf, bundle\s+(agent|common)\s+cfe_autorun_inventory_listening_ports, \})%]
-## Comments inside documentation
+### Comments inside documentation
Sometimes it's nice to be able to put an internal comment into the
documentation that will not be rendered.
@@ -604,51 +553,51 @@ Would render like this:
{% comment %} TODO: We should try to improve this at some point.{% endcomment %}
```
-# FAQ
-## When should I use `verbatim` vs **bold** or *italic*?
+## FAQ
-If it's code or something you would see on the command line (policy language, file names, command line options, binaries / CLI programs) use monospace (single backticks for inline, triple backticks for block, or when you have inline word that could also be an automatic link target that is undesirable, e.g. `files` ({% raw %}`files`{% endraw %}) vs ```files``` ({% raw %}```files```{% endraw %}) ).
+### When should I use `verbatim` vs **bold** or _italic_?
-If you are referring to something within UI / screenshots / buttons etc use bold and capitalize it as it is within the UI/Button/whatever.
+If it's code or something you would see on the command line (policy language, file names, command line options, binaries / CLI programs) use monospace (single backticks for inline, triple backticks for block, or when you have inline word that could also be an automatic link target that is undesirable, e.g. `files` ({% raw %}`files`{% endraw %}) vs `files` ({% raw %}`files`{% endraw %}) ).
+If you are referring to something within UI / screenshots / buttons etc use bold and capitalize it as it is within the UI/Button/whatever.
**References:**
-* https://www.patternfly.org/v4/ux-writing/punctuation/
-* https://docs.microsoft.com/en-us/style-guide/procedures-instructions/formatting-text-in-instructions
+- https://www.patternfly.org/v4/ux-writing/punctuation/
+- https://docs.microsoft.com/en-us/style-guide/procedures-instructions/formatting-text-in-instructions
-# Sandbox
+## Sandbox
-## symlink example
+### symlink example
-[%CFEngine_include_snippet(masterfiles/lib/files.cf, ^body\slink_from\sln_s.*, ^##)%]
+{{< CFEngine_include_snippet(masterfiles/lib/files.cf, ^body\slink_from\sln_s.*, ^##) >}}
+### Self documenting policy
+#### For the stdlib:
-## Self documenting policy
-### For the stdlib:
+{{< CFEngine_library_include(lib/commands) >}}
-[%CFEngine_library_include(lib/commands)%]
+#### For update.cf?
-### For update.cf?
+{{< CFEngine_library_include(update) >}}
-[%CFEngine_library_include(update)%]
+#### for promises.cf?
-### for Promises.cf?
+{{< CFEngine_library_include(promises) >}}
-[%CFEngine_library_include(promises)%]
+## Variables
-# Variables
Referencing a version of CFEngine? Consider if that appearance should be
updated with each new version.
Variables that are defined in the front matter (thats the content between the
three dashes at the top) or in
-[_config.yaml](https://github.com/cfengine/documentation/blob/master/generator/_config.yml)
+[\_config.yaml](https://github.com/cfengine/documentation/blob/master/generator/_config.yml)
can be used directly within markdown.
-For example this is the '{{site.CFE_manuals_version}}' version of the
-documentation. That variable comes from _config.yaml.
+For example this is the '{{< params "CFE_manuals_version" >}}' version of the
+documentation. That variable comes from \_config.yaml.
Since liquid variables look a lot like mustache variables any time you want to
show the actual variables will need to be inside of raw tags.
@@ -657,8 +606,9 @@ show the actual variables will need to be inside of raw tags.
site.CFE_manuals_version {{ site.CFE_manuals_version }}
{% endraw %}
-# Testing
-## Indention with included markdown
+## Testing
+
+### Indention with included markdown
1. Verify that the selected hosts are upgrading successfully.
@@ -676,7 +626,7 @@ site.CFE_manuals_version {{ site.CFE_manuals_version }}
"sort":"Host name",
"filter":{
"CFEngine version":{
- "not_match":"{{site.cfengine.branch}}.0"
+ "not_match":"{{< params "cfengine.branch" >}}.0"
}
},
"select":[
diff --git a/index.markdown b/content/_index.markdown
similarity index 69%
rename from index.markdown
rename to content/_index.markdown
index ea3b675b5..edb52d195 100644
--- a/index.markdown
+++ b/content/_index.markdown
@@ -1,7 +1,6 @@
---
layout: index
title: Home
-published: true
sorting: 1
categories: ["index"]
alias: index.html
@@ -14,53 +13,53 @@ alias: index.html
It includes the reference for the following versions of CFEngine:
- {% include lts_versions_list.html %}
+ {{< includehtml file="static/lts_versions_list.html" >}}
- Getting started
-
- Installation
+ Installation
Download and install CFEngine for the first time.
-
- Modules
+ Modules
Use modules to easily add reports or get things done without writing any code.
-
- Reporting and web UI
+ Reporting and web UI
Know more about your infrastructure and hosts, their data, compliance and make changes from within the Web UI.
-
- Writing policy
+ Writing policy
Write and deploy your first policy files to make changes to systems.
-
- Developing modules
+ Developing modules
Turn your policy, reports, or python code into CFEngine Build modules for others to use.
-
- Tutorial series on policy language
+ Tutorial series on policy language
In-depth tutorials on how to work with CFEngine policy.
- Popular
-
- Promise types
+ Promise types
Learn about processes, packages, users, files, storage, services, etc.
-
- API reference
+ API reference
The API is a conventional REST API which supports HTTP GET, PUT, POST, and DELETE operations.
-
- Language concepts
+ Language concepts
Learn about bundles, bodies, promises, variables, classes and decisions.
-
- Package management
+ Package management
Learn how to install, manage, and remove packages using CFEngine.
-
@@ -69,7 +68,7 @@ alias: index.html
CFEngine Build is a catalog of policy and modules created by CFEngine, our partners and community which
helps you simplify the automation process.
- Go to the page
+ Go to the page
diff --git a/api.markdown b/content/api/_index.markdown
similarity index 96%
rename from api.markdown
rename to content/api/_index.markdown
index 9c3bafa32..3e1e5d2bc 100644
--- a/api.markdown
+++ b/content/api/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: API
-published: true
sorting: 50
+aliases:
+ - "/api.html"
---
The CFEngine Enterprise API allows HTTP clients to interact with the
diff --git a/content/api/enterprise-api-architecture-overview.png b/content/api/enterprise-api-architecture-overview.png
new file mode 100644
index 000000000..d963d98f0
Binary files /dev/null and b/content/api/enterprise-api-architecture-overview.png differ
diff --git a/api/enterprise-api-examples.markdown b/content/api/enterprise-api-examples/_index.markdown
similarity index 92%
rename from api/enterprise-api-examples.markdown
rename to content/api/enterprise-api-examples/_index.markdown
index b985f046e..aab3a3b7d 100644
--- a/api/enterprise-api-examples.markdown
+++ b/content/api/enterprise-api-examples/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Enterprise API examples
-published: true
sorting: 6
+aliases:
+ - "/api-enterprise-api-examples.html"
---
* [Check installation status][Checking status]
diff --git a/api/enterprise-api-examples/browsing-host-information.markdown b/content/api/enterprise-api-examples/browsing-host-information.markdown
similarity index 98%
rename from api/enterprise-api-examples/browsing-host-information.markdown
rename to content/api/enterprise-api-examples/browsing-host-information.markdown
index dc6cedf43..de7056ca7 100644
--- a/api/enterprise-api-examples/browsing-host-information.markdown
+++ b/content/api/enterprise-api-examples/browsing-host-information.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Browsing host information
-published: true
sorting: 50
+aliases:
+ - "/api-enterprise-api-examples-browsing-host-information.html"
---
A resource [/api/host][Host REST API#List hosts] is added as an alternative interface for browsing host
diff --git a/api/enterprise-api-examples/changes-api-usage.markdown b/content/api/enterprise-api-examples/changes-api-usage.markdown
similarity index 97%
rename from api/enterprise-api-examples/changes-api-usage.markdown
rename to content/api/enterprise-api-examples/changes-api-usage.markdown
index 355408a11..2cdf5fa3c 100644
--- a/api/enterprise-api-examples/changes-api-usage.markdown
+++ b/content/api/enterprise-api-examples/changes-api-usage.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Tracking changes
-published: true
sorting: 50
+aliases:
+ - "/api-enterprise-api-examples-changes-api-usage.html"
---
Changes REST API allows to track the changes made by cf-agent in the infrastructure.
diff --git a/api/enterprise-api-examples/checking-status.markdown b/content/api/enterprise-api-examples/checking-status.markdown
similarity index 95%
rename from api/enterprise-api-examples/checking-status.markdown
rename to content/api/enterprise-api-examples/checking-status.markdown
index 9b661da4b..64441edeb 100644
--- a/api/enterprise-api-examples/checking-status.markdown
+++ b/content/api/enterprise-api-examples/checking-status.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Checking status
-published: true
sorting: 20
+aliases:
+ - "/api-enterprise-api-examples-checking-status.html"
---
You can get basic info about the API by issuing [/api][Status and settings REST API#Get server status]. This status
diff --git a/api/enterprise-api-examples/managing-settings.markdown b/content/api/enterprise-api-examples/managing-settings.markdown
similarity index 96%
rename from api/enterprise-api-examples/managing-settings.markdown
rename to content/api/enterprise-api-examples/managing-settings.markdown
index ae55781a9..cf1dd7c11 100644
--- a/api/enterprise-api-examples/managing-settings.markdown
+++ b/content/api/enterprise-api-examples/managing-settings.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Managing settings
-published: true
sorting: 30
+aliases:
+ - "/api-enterprise-api-examples-managing-settings.html"
---
Settings support two operations, **GET** (view settings) and **POST**
diff --git a/api/enterprise-api-examples/managing-users-and-roles.markdown b/content/api/enterprise-api-examples/managing-users-and-roles.markdown
similarity index 97%
rename from api/enterprise-api-examples/managing-users-and-roles.markdown
rename to content/api/enterprise-api-examples/managing-users-and-roles.markdown
index c97d56296..34c7259d3 100644
--- a/api/enterprise-api-examples/managing-users-and-roles.markdown
+++ b/content/api/enterprise-api-examples/managing-users-and-roles.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Managing users and roles
-published: true
sorting: 40
+aliases:
+ - "/api-enterprise-api-examples-managing-users-and-roles.html"
---
Users and Roles determine who has access to what data from the API.
diff --git a/api/enterprise-api-examples/sql-queries.markdown b/content/api/enterprise-api-examples/sql-queries.markdown
similarity index 98%
rename from api/enterprise-api-examples/sql-queries.markdown
rename to content/api/enterprise-api-examples/sql-queries.markdown
index 5641ef2d6..49249f8d3 100644
--- a/api/enterprise-api-examples/sql-queries.markdown
+++ b/content/api/enterprise-api-examples/sql-queries.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: SQL query examples
-published: true
+aliases:
+ - "/api-enterprise-api-examples-sql-queries.html"
---
### Synchronous Example: Listing hostname and IP for Ubuntu hosts
diff --git a/api/enterprise-api-ref.markdown b/content/api/enterprise-api-ref/_index.markdown
similarity index 98%
rename from api/enterprise-api-ref.markdown
rename to content/api/enterprise-api-ref/_index.markdown
index 7b40be442..47b6be83a 100644
--- a/api/enterprise-api-ref.markdown
+++ b/content/api/enterprise-api-ref/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Enterprise API reference
-published: true
sorting: 70
+aliases:
+ - "/api-enterprise-api-ref.html"
---
The Enterprise API is a conventional REST API in the sense that it has a
diff --git a/api/enterprise-api-ref/actions-api.markdown b/content/api/enterprise-api-ref/actions-api.markdown
similarity index 96%
rename from api/enterprise-api-ref/actions-api.markdown
rename to content/api/enterprise-api-ref/actions-api.markdown
index a793d962a..670d7b47f 100644
--- a/api/enterprise-api-ref/actions-api.markdown
+++ b/content/api/enterprise-api-ref/actions-api.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Actions API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-actions-api.html"
---
Actions API enables you to perform specific actions such a requesting report collection.
diff --git a/api/enterprise-api-ref/build-api.markdown b/content/api/enterprise-api-ref/build-api.markdown
similarity index 99%
rename from api/enterprise-api-ref/build-api.markdown
rename to content/api/enterprise-api-ref/build-api.markdown
index 7953fac7f..82edd0be6 100644
--- a/api/enterprise-api-ref/build-api.markdown
+++ b/content/api/enterprise-api-ref/build-api.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Build API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-build-api.html"
---
The Build API enables you to easily manage policy projects and their respective CFEngine Build modules.
diff --git a/api/enterprise-api-ref/changes.markdown b/content/api/enterprise-api-ref/changes.markdown
similarity index 99%
rename from api/enterprise-api-ref/changes.markdown
rename to content/api/enterprise-api-ref/changes.markdown
index cbae5c2c0..78a7aaa8e 100644
--- a/api/enterprise-api-ref/changes.markdown
+++ b/content/api/enterprise-api-ref/changes.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Changes REST API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-changes.html"
---
**Changes API** allows to track changes performed by CFEngine agent in the infrastructure.
diff --git a/api/enterprise-api-ref/cmdb-api.markdown b/content/api/enterprise-api-ref/cmdb-api.markdown
similarity index 99%
rename from api/enterprise-api-ref/cmdb-api.markdown
rename to content/api/enterprise-api-ref/cmdb-api.markdown
index 5c728d8d0..1026f7d8f 100644
--- a/api/enterprise-api-ref/cmdb-api.markdown
+++ b/content/api/enterprise-api-ref/cmdb-api.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: CMDB API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-cmdb-api.html"
---
The configuration management database (CMDB) API enables you to manage classes and variables for specific hosts.
diff --git a/api/enterprise-api-ref/export-import-api.markdown b/content/api/enterprise-api-ref/export-import-api.markdown
similarity index 98%
rename from api/enterprise-api-ref/export-import-api.markdown
rename to content/api/enterprise-api-ref/export-import-api.markdown
index fc88f61d2..42d18d1f4 100644
--- a/api/enterprise-api-ref/export-import-api.markdown
+++ b/content/api/enterprise-api-ref/export-import-api.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Import & export API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-export-import-api.html"
---
Import & export API provides users the ability to transfer Mission Portal data between hubs.
diff --git a/api/enterprise-api-ref/export-import-compliance-report-api.markdown b/content/api/enterprise-api-ref/export-import-compliance-report-api.markdown
similarity index 98%
rename from api/enterprise-api-ref/export-import-compliance-report-api.markdown
rename to content/api/enterprise-api-ref/export-import-compliance-report-api.markdown
index ff48aae73..0f87d4cfc 100644
--- a/api/enterprise-api-ref/export-import-compliance-report-api.markdown
+++ b/content/api/enterprise-api-ref/export-import-compliance-report-api.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Import & export compliance report API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-export-import-compliance-report-api.html"
---
This provides users the ability to transfer compliance reports between hubs or create reports from a JSON definition file.
diff --git a/api/enterprise-api-ref/federated-reporting-api.markdown b/content/api/enterprise-api-ref/federated-reporting-api.markdown
similarity index 98%
rename from api/enterprise-api-ref/federated-reporting-api.markdown
rename to content/api/enterprise-api-ref/federated-reporting-api.markdown
index 1a36ab1fe..b5e01d468 100644
--- a/api/enterprise-api-ref/federated-reporting-api.markdown
+++ b/content/api/enterprise-api-ref/federated-reporting-api.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Federated reporting configuration API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-federated-reporting-api.html"
---
This API is used for configuring hubs so that a single hub can be used to report on any host connected to participating feeder hubs.
diff --git a/api/enterprise-api-ref/file-changes.markdown b/content/api/enterprise-api-ref/file-changes.markdown
similarity index 97%
rename from api/enterprise-api-ref/file-changes.markdown
rename to content/api/enterprise-api-ref/file-changes.markdown
index 799729b1f..a5fb82bab 100644
--- a/api/enterprise-api-ref/file-changes.markdown
+++ b/content/api/enterprise-api-ref/file-changes.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: File changes API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-file-changes.html"
---
diff --git a/api/enterprise-api-ref/health-diagnostic.markdown b/content/api/enterprise-api-ref/health-diagnostic.markdown
similarity index 99%
rename from api/enterprise-api-ref/health-diagnostic.markdown
rename to content/api/enterprise-api-ref/health-diagnostic.markdown
index dd9766687..dd8c5ad66 100644
--- a/api/enterprise-api-ref/health-diagnostic.markdown
+++ b/content/api/enterprise-api-ref/health-diagnostic.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Health diagnostic API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-health-diagnostic.html"
---
This API provides access to health diagnostic information.
diff --git a/api/enterprise-api-ref/host.markdown b/content/api/enterprise-api-ref/host.markdown
similarity index 97%
rename from api/enterprise-api-ref/host.markdown
rename to content/api/enterprise-api-ref/host.markdown
index 8b693a95d..611b8b8a3 100644
--- a/api/enterprise-api-ref/host.markdown
+++ b/content/api/enterprise-api-ref/host.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Host REST API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-host.html"
---
Host API allows to access host specific information.
@@ -327,11 +328,14 @@ HTTP 200 Ok
**URI:** https://hub.cfengine.com/api/hosts/delete-permanently/:host-id
-**Method:** POST
+**Method:** DELETE
+
+Permanently deletes deleted host entry from the reporting database.
-Permanently deletes host entry from the reporting database.
+Notes:
-Note: to be able to perform this action related RBAC rule (alias `hosts-delete-permanently.delete`) should be enabled.
+- To be able to perform this action related RBAC rule (alias `hosts-delete-permanently.delete`) should be enabled.
+- Permanent deletion requires that a host is first normally deleted and found in the response from `/api/hosts/deleted`.
**Responses:**
diff --git a/api/enterprise-api-ref/inventory.markdown b/content/api/enterprise-api-ref/inventory.markdown
similarity index 99%
rename from api/enterprise-api-ref/inventory.markdown
rename to content/api/enterprise-api-ref/inventory.markdown
index f28f90e5d..b18551f6e 100644
--- a/api/enterprise-api-ref/inventory.markdown
+++ b/content/api/enterprise-api-ref/inventory.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Inventory API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-inventory.html"
---
Inventory API allows to access inventory reports and attributes dictionary.
diff --git a/api/enterprise-api-ref/ldap-api.markdown b/content/api/enterprise-api-ref/ldap-api.markdown
similarity index 98%
rename from api/enterprise-api-ref/ldap-api.markdown
rename to content/api/enterprise-api-ref/ldap-api.markdown
index 2c3276ab3..59f24c3ca 100644
--- a/api/enterprise-api-ref/ldap-api.markdown
+++ b/content/api/enterprise-api-ref/ldap-api.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: LDAP authentication API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-ldap-api.html"
---
LDAP authentication API allows to check ldap user credentials and change LDAP settings.
diff --git a/api/enterprise-api-ref/personal-groups.markdown b/content/api/enterprise-api-ref/personal-groups.markdown
similarity index 99%
rename from api/enterprise-api-ref/personal-groups.markdown
rename to content/api/enterprise-api-ref/personal-groups.markdown
index 236f70e12..cd4b9a692 100644
--- a/api/enterprise-api-ref/personal-groups.markdown
+++ b/content/api/enterprise-api-ref/personal-groups.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Personal groups API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-personal-groups.html"
---
The personal groups API enables creating host groups based on host filters (the same ones used in inventory reports).
diff --git a/api/enterprise-api-ref/query.markdown b/content/api/enterprise-api-ref/query.markdown
similarity index 98%
rename from api/enterprise-api-ref/query.markdown
rename to content/api/enterprise-api-ref/query.markdown
index 8f39e35e4..d5e741d52 100644
--- a/api/enterprise-api-ref/query.markdown
+++ b/content/api/enterprise-api-ref/query.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Query REST API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-query.html"
---
In case of a need for full flexibility, Query API allow users to execute SQL queries on CFEngine Database.
diff --git a/api/enterprise-api-ref/shared-groups.markdown b/content/api/enterprise-api-ref/shared-groups.markdown
similarity index 99%
rename from api/enterprise-api-ref/shared-groups.markdown
rename to content/api/enterprise-api-ref/shared-groups.markdown
index e18702eef..79c2bd0ac 100644
--- a/api/enterprise-api-ref/shared-groups.markdown
+++ b/content/api/enterprise-api-ref/shared-groups.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Shared groups API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-shared-groups.html"
---
The shared groups API enables creating host groups based on host filters (the same ones used in inventory) and assigning CMDB data to them.
diff --git a/api/enterprise-api-ref/sql-schema.markdown b/content/api/enterprise-api-ref/sql-schema/_index.markdown
similarity index 85%
rename from api/enterprise-api-ref/sql-schema.markdown
rename to content/api/enterprise-api-ref/sql-schema/_index.markdown
index 1d96578e4..7ef27c3dc 100644
--- a/api/enterprise-api-ref/sql-schema.markdown
+++ b/content/api/enterprise-api-ref/sql-schema/_index.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: SQL schema
-published: true
+aliases:
+ - "/api-enterprise-api-ref-sql-schema.html"
---
CFEngine Enterprise uses multiple databases.
diff --git a/api/enterprise-api-ref/sql-schema/cfdb.markdown b/content/api/enterprise-api-ref/sql-schema/cfdb.markdown
similarity index 99%
rename from api/enterprise-api-ref/sql-schema/cfdb.markdown
rename to content/api/enterprise-api-ref/sql-schema/cfdb.markdown
index f44820f69..7504d64cd 100644
--- a/api/enterprise-api-ref/sql-schema/cfdb.markdown
+++ b/content/api/enterprise-api-ref/sql-schema/cfdb.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: cfdb
-published: true
+aliases:
+ - "/api-enterprise-api-ref-sql-schema-cfdb.html"
---
CFEngine allows standardized SQL `SELECT` queries to be used with [REST API][Query REST API#Execute SQL query].
diff --git a/api/enterprise-api-ref/sql-schema/cfmp.markdown b/content/api/enterprise-api-ref/sql-schema/cfmp.markdown
similarity index 99%
rename from api/enterprise-api-ref/sql-schema/cfmp.markdown
rename to content/api/enterprise-api-ref/sql-schema/cfmp.markdown
index 5e053e8d9..2c67360f3 100644
--- a/api/enterprise-api-ref/sql-schema/cfmp.markdown
+++ b/content/api/enterprise-api-ref/sql-schema/cfmp.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: cfmp
-published: true
+aliases:
+ - "/api-enterprise-api-ref-sql-schema-cfmp.html"
---
This database contains Mission Portal related settings not processed by the API.
diff --git a/api/enterprise-api-ref/sql-schema/cfsettings.markdown b/content/api/enterprise-api-ref/sql-schema/cfsettings.markdown
similarity index 99%
rename from api/enterprise-api-ref/sql-schema/cfsettings.markdown
rename to content/api/enterprise-api-ref/sql-schema/cfsettings.markdown
index 62b0aad60..d44ba883a 100644
--- a/api/enterprise-api-ref/sql-schema/cfsettings.markdown
+++ b/content/api/enterprise-api-ref/sql-schema/cfsettings.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: cfsettings
-published: true
+aliases:
+ - "/api-enterprise-api-ref-sql-schema-cfsettings.html"
---
Settings used by Mission Portal APIs, no reported data.
diff --git a/api/enterprise-api-ref/ssh-keys-api.markdown b/content/api/enterprise-api-ref/ssh-keys-api.markdown
similarity index 99%
rename from api/enterprise-api-ref/ssh-keys-api.markdown
rename to content/api/enterprise-api-ref/ssh-keys-api.markdown
index 6b30fdad7..0e4f8557d 100644
--- a/api/enterprise-api-ref/ssh-keys-api.markdown
+++ b/content/api/enterprise-api-ref/ssh-keys-api.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: SSH keys API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-ssh-keys-api.html"
---
The SSH keys API enables you to generate a key pair that can be used for authorization.
diff --git a/api/enterprise-api-ref/status-settings.markdown b/content/api/enterprise-api-ref/status-settings.markdown
similarity index 98%
rename from api/enterprise-api-ref/status-settings.markdown
rename to content/api/enterprise-api-ref/status-settings.markdown
index 378b71d8f..ff3361474 100644
--- a/api/enterprise-api-ref/status-settings.markdown
+++ b/content/api/enterprise-api-ref/status-settings.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Status and settings REST API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-status-settings.html"
---
REST API for managing settings, checking hub status.
diff --git a/content/api/enterprise-api-ref/two-factor-authentication.markdown b/content/api/enterprise-api-ref/two-factor-authentication.markdown
new file mode 100644
index 000000000..01675336c
--- /dev/null
+++ b/content/api/enterprise-api-ref/two-factor-authentication.markdown
@@ -0,0 +1,257 @@
+---
+layout: default
+title: Two-factor authentication API
+aliases:
+ - "/api-enterprise-api-ref-two-factor-authentication.html"
+---
+The Two-factor authentication API enables users to add an extra layer of security to their accounts
+by requiring a TOTP (time-based one-time password) in addition to their primary credentials.
+
+Once two-factor authentication is enabled, requests to obtain an OAuth token, change a password, or
+disable two-factor authentication must include an additional header: `Cf-2fa-Token: `.
+Basic authentication also requires this header each time it is used.
+
+Currently, only TOTP (Time-based One-Time Password) two-factor authentication
+is supported, providing users with a time-sensitive code for enhanced security.
+
+## Start two-factor authentication configuration
+
+First, you need to request two-factor authentication secrets to complete the configuration.
+The secret token should be added to a third-party authentication app such as Google Authenticator or Authy.
+A 6-digit code should then be obtained from the application to complete the action.
+
+**URI:** https://hub.cfengine.com/api/2fa/totp/configure
+
+**Method:** GET
+
+**Example request (curl):**
+
+```console
+curl --user : \
+ -X GET \
+ https://hub.cfengine.com/api/2fa/totp/configure
+```
+
+**Successful response example:**
+
+```
+HTTP 200 Ok
+{
+ "secret": "SYSZJJVQUIOG5ITA6HPH5PZWLZ3VUP52",
+ "2faUrl": "otpauth://totp/Mission%20Portal:admin?secret=SYSZJJVQUIOG5ITA6HPH5PZWLZ3VUP52&issuer=Mission%20Portal&algorithm=SHA1&digits=6&period=30",
+ "algorithm": "sha1",
+ "digits": 6,
+ "period": 30,
+ "issuer": "Mission Portal",
+ "holder": "admin"
+}
+```
+
+**Output:**
+
+* **secret**
+ The secret key used to generate the one-time password (OTP)
+* **2faUrl**
+ The URL that can be converted into QR code and scanned with an authenticator app to set up two-factor authentication
+* **algorithm**
+ The cryptographic algorithm used to generate the OTP
+* **digits**
+ The number of digits in the generated OTP code
+* **period**
+ The time period in seconds for which the OTP code is valid
+* **issuer**
+ The name of the service that is providing the two-factor authentication
+* **holder**
+ The username for whom the two-factor authentication is being configured
+
+**Responses:**
+
+| HTTP response code | Description |
+|---------------------------|----------------------------------------|
+| 200 OK | 2FA configuration successfully created |
+| 500 Internal server error | Internal server error |
+
+
+
+## Complete two-factor authentication configuration
+
+**URI:** https://hub.cfengine.com/api/2fa/totp/configure
+
+**Method:** POST
+
+**Parameters:**
+
+* **code** *(string)*
+ 6-digit code from the authentication application
+
+**Example request (curl):**
+
+```console
+curl --user : \
+ -X POST \
+ https://hub.cfengine.com/api/2fa/totp/configure \
+ --data-raw '{"code": "000000"}'
+```
+
+**Successful response example:**
+
+```
+HTTP 200 Ok
+2FA successfully enabled for this user.
+```
+
+**Responses:**
+
+| HTTP response code | Description |
+|---------------------------|-----------------------------|
+| 200 OK | 2FA successfully configured |
+| 400 Bad request | 2FA verification failed. |
+| 500 Internal server error | Internal server error |
+
+
+## Disable two-factor authentication for the current user
+
+**URI:** https://hub.cfengine.com/api/2fa/totp/disable
+
+**Method:** POST
+
+**Headers:**
+
+* **Cf-2FA-Token** *(string)*
+ 6-digit code from the authentication application
+
+**Example request (curl):**
+
+```console
+curl --user : \
+ -X POST \
+ https://hub.cfengine.com/api/2fa/totp/disable \
+ --header 'Cf-2FA-Token: 537987'
+```
+
+**Successful response example:**
+
+```
+HTTP 200 Ok
+2FA successfully disabled for this user.
+```
+
+**Responses:**
+
+| HTTP response code | Description |
+|---------------------------|----------------------------------------|
+| 200 OK | 2FA successfully disabled |
+| 401 Unauthorized | Invalid two-factor authentication code |
+| 409 Conflict | 2FA is not enabled for this user |
+| 500 Internal server error | Internal server error |
+
+## Disable two-factor authentication for other users
+
+In case if a regular user loses access to the authentication application, specific users (admin role by default)
+with the `Disable 2FA for any user` RBAC role (alias `2fa.any-user.disable`) will be able to
+disable two-factor authentication for that user.
+
+**URI:** https://hub.cfengine.com/api/2fa/totp/disable/user/:username
+
+**Method:** POST
+
+**Example request (curl):**
+
+```console
+curl --user : \
+ -X POST \
+ https://hub.cfengine.com/api/2fa/totp/disable/user/giorgio
+```
+
+**Successful response example:**
+
+```
+HTTP 200 Ok
+2FA successfully disabled for `giorgio` user.
+```
+
+**Responses:**
+
+| HTTP response code | Description |
+|---------------------------|----------------------------------------|
+| 200 OK | 2FA successfully disabled |
+| 401 Unauthorized | Invalid two-factor authentication code |
+| 409 Conflict | 2FA is not enabled for this user |
+| 500 Internal server error | Internal server error |
+
+
+
+## Verify two-factor authentication code
+
+This API endpoint verifies the authentication code. If OAuth authentication is used and the code is valid,
+your authorization token will be flagged as verified for 5 minutes. During this 5-minute period after successful
+verification, you will not need to provide the authorization code from the authentication application.
+
+**URI:** https://hub.cfengine.com/api/2fa/totp/verify
+
+**Method:** POST
+
+**Parameters:**
+
+* **code** *(string)*
+ 6-digit code from the authentication application
+
+**Example request (curl):**
+
+```console
+curl --user : \
+ -X POST \
+ https://hub.cfengine.com/api/2fa/totp/veify \
+ --data-raw '{"code": "000000"}'
+```
+
+**Successful response example:**
+
+```
+HTTP 200 Ok
+2FA successfully verified.
+```
+
+**Responses:**
+
+| HTTP response code | Description |
+|---------------------------|----------------------------------|
+| 200 OK | 2FA successfully verified |
+| 409 Conflict | 2FA is not enabled for this user |
+| 500 Internal server error | Internal server error |
+
+
+## Check if verification is needed
+
+This API endpoint checks if 2FA verification is needed. Only needed for OAuth authentication method
+as for the Basic authentication is needed every time.
+
+**URI:** https://hub.cfengine.com/api/2fa/verification-needed
+
+**Method:** GET
+
+
+**Example request (curl):**
+
+```console
+curl -X GET \
+ https://hub.cfengine.com/api/2fa/verification-needed \
+ --header 'Authorization: Bearer 627135e5a0b142cfdc738c38ad0c0067bc0960e5'
+```
+
+**Successful response example:**
+
+```
+HTTP 200 Ok
+{
+ "result": true
+}
+```
+
+**Responses:**
+
+| HTTP response code | Description |
+|---------------------------|----------------------------------|
+| 200 OK | 2FA successfully checked |
+| 409 Conflict | 2FA is not enabled for this user |
+| 500 Internal server error | Internal server error |
diff --git a/api/enterprise-api-ref/users-rbac.markdown b/content/api/enterprise-api-ref/users-rbac.markdown
similarity index 94%
rename from api/enterprise-api-ref/users-rbac.markdown
rename to content/api/enterprise-api-ref/users-rbac.markdown
index 19aaec8ea..bb08139c0 100644
--- a/api/enterprise-api-ref/users-rbac.markdown
+++ b/content/api/enterprise-api-ref/users-rbac.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Users and access-control REST API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-users-rbac.html"
---
This REST API allows to manage users allowed to use Mission Portal as also Role Based Access Control settings.
@@ -40,7 +41,8 @@ API call allowed only for administrator.
"admin",
"cf_remoteagent"
],
- "external": false
+ "external": false,
+ "two_factor_enabled": true
},
{
"id": "admin",
@@ -50,7 +52,8 @@ API call allowed only for administrator.
"admin",
"cf_remoteagent"
],
- "external": false
+ "external": false,
+ "two_factor_enabled": false
},
{
"id": "user_1",
@@ -74,6 +77,8 @@ API call allowed only for administrator.
List of assigned RBAC roles.
* **external**
Is user from external source (LDAP/AD).
+* **two_factor_enabled**
+ If a user has enabled two-factor authentication
**Example usage:** `Example: Listing users`
@@ -105,7 +110,8 @@ API call allowed only for administrator.
"linux_team"
],
"external": false,
- "time_zone": "Europe/Oslo"
+ "time_zone": "Europe/Oslo",
+ "two_factor_enabled": false
}
]
}
@@ -123,6 +129,8 @@ API call allowed only for administrator.
Is user from external source (LDAP/AD).
* **time_zone**
Time zone
+* **two_factor_enabled**
+ If a user has enabled two-factor authentication
**Example usage:** `Example: Retrieving a user`
diff --git a/api/enterprise-api-ref/vcs-settings.markdown b/content/api/enterprise-api-ref/vcs-settings.markdown
similarity index 86%
rename from api/enterprise-api-ref/vcs-settings.markdown
rename to content/api/enterprise-api-ref/vcs-settings.markdown
index b298ae27d..475af4e96 100644
--- a/api/enterprise-api-ref/vcs-settings.markdown
+++ b/content/api/enterprise-api-ref/vcs-settings.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: VCS settings API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-vcs-settings.html"
---
VCS API for managing version control repository settings.
@@ -34,6 +35,7 @@ curl -k --user : \
"data": {
"GIT_URL": "https://github.com/cfengine/masterfiles.git",
"GIT_REFSPEC": "master",
+ "PROJECT_SUBDIRECTORY": "path/to/policies",
"GIT_USERNAME": "username",
"GIT_PASSWORD": "passwordOrToken",
"GIT_WORKING_BRANCH": "CF_WORKING_BRANCH",
@@ -58,6 +60,9 @@ curl -k --user : \
Git repository URL `Emp: https://github.com/cfengine/masterfiles.git`. Required parameter.
* **gitRefspec** *(string)*
The Git refspec to checkout. It can be a branch name, a tag name, a commit hash or a partial hash. Required parameter.
+* **projectSubdirectory** *(string)*
+ Subdirectory inside Git repository where the project is located.
+ Optional parameter.
* **gitUsername** *(string)*
Git username for authentication, not needed for public repositories.
* **gitPassword** *(string)*
@@ -75,6 +80,7 @@ curl -k --user : \
-d '{
"gitServer":"https://github.com/cfengine/masterfiles.git",
"gitRefspec":"master",
+ "projectSubdirectory":"",
"gitUsername":"gituser",
"gitPassword":"passwordOrToken",
"gitPrivateKey" "Private key raw content"
@@ -88,6 +94,7 @@ curl -k --user : \
{
"gitServer": "https://github.com/cfengine/masterfiles.git",
"gitRefspec": "master",
+ "projectSubdirectory": "",
"gitUsername": "gituser",
"gitPassword": "passwordOrToken",
"gitPrivateKey": "/opt/cfengine/userworkdir/admin/.ssh/id_rsa.pvt"
@@ -97,3 +104,4 @@ curl -k --user : \
## History
* `vscType` parameter added in 3.19.0, 3.18.1
+* `projectSubdirectory` parameter added in 3.21.7, 3.24.2, 3.26.0
diff --git a/api/enterprise-api-ref/web-rbac.markdown b/content/api/enterprise-api-ref/web-rbac.markdown
similarity index 99%
rename from api/enterprise-api-ref/web-rbac.markdown
rename to content/api/enterprise-api-ref/web-rbac.markdown
index a1d1b62d9..a95563305 100644
--- a/api/enterprise-api-ref/web-rbac.markdown
+++ b/content/api/enterprise-api-ref/web-rbac.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Web RBAC API
-published: true
+aliases:
+ - "/api-enterprise-api-ref-web-rbac.html"
---
Web RBAC API for managing role based access control settings.
diff --git a/enterprise-cfengine-guide.markdown b/content/enterprise-cfengine-guide/_index.markdown
similarity index 98%
rename from enterprise-cfengine-guide.markdown
rename to content/enterprise-cfengine-guide/_index.markdown
index 1aa9a900c..eba0f645c 100644
--- a/enterprise-cfengine-guide.markdown
+++ b/content/enterprise-cfengine-guide/_index.markdown
@@ -3,6 +3,8 @@ layout: default
title: CFEngine Enterprise
published: false
sorting: 3
+aliases:
+ - "/enterprise-cfengine-guide.html"
---
CFEngine Enterprise is an IT automation platform that uses a model-based approach to manage your infrastructure, and applications at WebScale while providing best-in-class scalability, security, enterprise-wide visibility and control.
diff --git a/enterprise-cfengine-guide/install-get-started.markdown b/content/enterprise-cfengine-guide/install-get-started.markdown
similarity index 97%
rename from enterprise-cfengine-guide/install-get-started.markdown
rename to content/enterprise-cfengine-guide/install-get-started.markdown
index 2e10b945e..8c81053b8 100644
--- a/enterprise-cfengine-guide/install-get-started.markdown
+++ b/content/enterprise-cfengine-guide/install-get-started.markdown
@@ -3,6 +3,8 @@ layout: default
title: Install and get started
published: false
sorting: 10
+aliases:
+ - "/enterprise-cfengine-guide-install-get-started.html"
---
## Graphical illustration of CFEngine process
diff --git a/overview/what-is-cfengine-and-why.markdown b/content/overview/what-is-cfengine-and-why.markdown
similarity index 97%
rename from overview/what-is-cfengine-and-why.markdown
rename to content/overview/what-is-cfengine-and-why.markdown
index 276e08459..a2142a831 100644
--- a/overview/what-is-cfengine-and-why.markdown
+++ b/content/overview/what-is-cfengine-and-why.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: What is CFEngine and why?
-published: true
sorting: 1
+aliases:
+ - "/overview-what-is-cfengine-and-why.html"
---
## What is CFEngine?
diff --git a/reference.markdown b/content/reference/_index.markdown
similarity index 96%
rename from reference.markdown
rename to content/reference/_index.markdown
index 53fddde73..7d9716576 100644
--- a/reference.markdown
+++ b/content/reference/_index.markdown
@@ -2,8 +2,9 @@
layout: default
title: Reference
alias: CFEngine Reference
-published: true
sorting: 70
+aliases:
+ - "/reference.html"
---
The reference documentation explains the available promise and bundle types,
diff --git a/reference/all-types.markdown b/content/reference/all-types.markdown
similarity index 66%
rename from reference/all-types.markdown
rename to content/reference/all-types.markdown
index 5f4fc616f..5f78941a9 100644
--- a/reference/all-types.markdown
+++ b/content/reference/all-types.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: All promise and body types
-published: true
sorting: 110
+aliases:
+ - "/reference-all-types.html"
---
* [All promise types][All promise and body types#All promise types]
@@ -10,8 +11,8 @@ sorting: 110
## All promise types
-[%CFEngine_syntax_map(promiseTypes)]
+{{< CFEngine_syntax_map(promiseTypes) >}}
## All body Types
-[%CFEngine_syntax_map(bodyTypes)]
+{{< CFEngine_syntax_map(bodyTypes) >}}
diff --git a/reference/common-attributes-include.markdown b/content/reference/common-attributes.include.markdown
similarity index 93%
rename from reference/common-attributes-include.markdown
rename to content/reference/common-attributes.include.markdown
index 712a72f79..309623820 100644
--- a/reference/common-attributes-include.markdown
+++ b/content/reference/common-attributes.include.markdown
@@ -16,6 +16,8 @@ the [Promise types] page. The common attributes are as follows:
#### [if][Promise types#if]
+#### [unless][Promise types#unless]
+
#### [meta][Promise types#meta]
#### [with][Promise types#with]
diff --git a/reference/common-body-attributes-include.markdown b/content/reference/common-body-attributes.include.markdown
similarity index 100%
rename from reference/common-body-attributes-include.markdown
rename to content/reference/common-body-attributes.include.markdown
diff --git a/reference/components.markdown b/content/reference/components/_index.markdown
similarity index 98%
rename from reference/components.markdown
rename to content/reference/components/_index.markdown
index c30dd4780..9a025ac6a 100644
--- a/reference/components.markdown
+++ b/content/reference/components/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Components
-published: true
sorting: 10
+aliases:
+ - "/reference-components.html"
---
While promises to configure your system are entirely user-defined, the
@@ -429,7 +430,7 @@ body common control
**Description:** Defines the protocol to use for all outgoing connections.
-[%CFEngine_promise_attribute(undefined)%]
+{{< CFEngine_promise_attribute(undefined) >}}
**Note:** `protocol_version` can be specified at the individual promise level
using the [`body copy_from protocol_version`][files#protocol_version]
@@ -584,7 +585,7 @@ body common control
For a list of possible ciphers, see man page for "openssl ciphers".
-[%CFEngine_promise_attribute(undefined)%]
+{{< CFEngine_promise_attribute(undefined) >}}
**Example:**
@@ -604,7 +605,7 @@ body common control
**Description:** Minimum tls version to allow for **outgoing** connections from components other than `cf-serverd`.
-[%CFEngine_promise_attribute(1.0)%]
+{{< CFEngine_promise_attribute(1.0) >}}
```cf3
body common control
diff --git a/reference/components/cf-agent.markdown b/content/reference/components/cf-agent.markdown
similarity index 99%
rename from reference/components/cf-agent.markdown
rename to content/reference/components/cf-agent.markdown
index 5e09995d2..b21a798ae 100644
--- a/reference/components/cf-agent.markdown
+++ b/content/reference/components/cf-agent.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: cf-agent
-published: true
sorting: 10
keywords: [agent]
+aliases:
+ - "/reference-components-cf-agent.html"
---
`cf-agent` evaluates policy code and makes changes to the system. Policy
@@ -22,7 +23,7 @@ affected by `common` and `agent` control bodies.
## Command reference
-[%CFEngine_include_snippet(cf-agent.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-agent.help, [\s]*--[a-z], ^$) >}}
### --simulate
@@ -561,7 +562,7 @@ time a network connection should attempt to connect or read from server.
The time is in seconds. It is not a guaranteed number, since it
depends on system behavior.
-[%CFEngine_promise_attribute(30 seconds)%
+{{< CFEngine_promise_attribute(30 seconds) >}}
**Example:**
@@ -758,7 +759,7 @@ automatically.
**Example:**
-[%CFEngine_include_example(files_auto_define.cf)%]
+{{< CFEngine_include_example(files_auto_define.cf) >}}
### files_single_copy
@@ -1096,6 +1097,7 @@ The following classes are excluded from logging:
* `any`
* `from_cfexecd`
* Life cycle (`Lcycle_0`, `GMT_Lcycle_3`)
+
### secureinput
**Description:** The `secureinput` menu option policy checks whether
diff --git a/reference/components/cf-check.markdown b/content/reference/components/cf-check.markdown
similarity index 57%
rename from reference/components/cf-check.markdown
rename to content/reference/components/cf-check.markdown
index e65844841..6cf3d362a 100644
--- a/reference/components/cf-check.markdown
+++ b/content/reference/components/cf-check.markdown
@@ -1,13 +1,14 @@
---
layout: default
title: cf-check
-published: true
sorting: 80
keywords: [cf-hub]
+aliases:
+ - "/reference-components-cf-check.html"
---
Utility for diagnosis and repair of local CFEngine databases.
## Command reference
-[%CFEngine_include_snippet(cf-check.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-check.help, [\s]*--[a-z], ^$) >}}
diff --git a/reference/components/cf-execd.markdown b/content/reference/components/cf-execd.markdown
similarity index 98%
rename from reference/components/cf-execd.markdown
rename to content/reference/components/cf-execd.markdown
index bf8287d09..50d32d26f 100644
--- a/reference/components/cf-execd.markdown
+++ b/content/reference/components/cf-execd.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: cf-execd
-published: true
sorting: 30
keywords: [executor]
+aliases:
+ - "/reference-components-cf-execd.html"
---
`cf-execd` is the scheduling daemon for `cf-agent`. It runs
@@ -29,7 +30,7 @@ network.
## Command reference
-[%CFEngine_include_snippet(cf-execd.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-execd.help, [\s]*--[a-z], ^$) >}}
## Control promises
diff --git a/reference/components/cf-hub.markdown b/content/reference/components/cf-hub.markdown
similarity index 97%
rename from reference/components/cf-hub.markdown
rename to content/reference/components/cf-hub.markdown
index 001f04d7a..dcaf0e733 100644
--- a/reference/components/cf-hub.markdown
+++ b/content/reference/components/cf-hub.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: cf-hub
-published: true
sorting: 80
keywords: [hub]
+aliases:
+ - "/reference-components-cf-hub.html"
---
`cf-hub` connects to `cf-serverd` instances to collect data
@@ -26,7 +27,7 @@ avoid reporting on data generated by test or extraordinary executions.
## Command reference
-[%CFEngine_include_snippet(cf-hub.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-hub.help, [\s]*--[a-z], ^$) >}}
## Control promises
diff --git a/reference/components/cf-key.markdown b/content/reference/components/cf-key.markdown
similarity index 69%
rename from reference/components/cf-key.markdown
rename to content/reference/components/cf-key.markdown
index 50e48a089..0a101b72f 100644
--- a/reference/components/cf-key.markdown
+++ b/content/reference/components/cf-key.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: cf-key
-published: true
sorting: 60
+aliases:
+ - "/reference-components-cf-key.html"
---
The CFEngine key generator makes key pairs for [remote authentication][Client server communication].
@@ -13,4 +14,4 @@ The CFEngine key generator makes key pairs for [remote authentication][Client se
## Command reference
-[%CFEngine_include_snippet(cf-key.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-key.help, [\s]*--[a-z], ^$) >}}
diff --git a/reference/components/cf-monitord.markdown b/content/reference/components/cf-monitord.markdown
similarity index 98%
rename from reference/components/cf-monitord.markdown
rename to content/reference/components/cf-monitord.markdown
index 2f480e80b..c41b32dbe 100644
--- a/reference/components/cf-monitord.markdown
+++ b/content/reference/components/cf-monitord.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: cf-monitord
-published: true
sorting: 50
keywords: [monitor]
+aliases:
+ - "/reference-components-cf-monitord.html"
---
`cf-monitord` is the monitoring daemon for CFEngine. It samples probes defined
@@ -22,7 +23,7 @@ affected by `common` and `monitor` control bodies.
## Command reference
-[%CFEngine_include_snippet(cf-monitord.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-monitord.help, [\s]*--[a-z], ^$) >}}
## Standard measurements:
diff --git a/reference/components/cf-net.markdown b/content/reference/components/cf-net.markdown
similarity index 97%
rename from reference/components/cf-net.markdown
rename to content/reference/components/cf-net.markdown
index 82178e4be..c8b3106bc 100644
--- a/reference/components/cf-net.markdown
+++ b/content/reference/components/cf-net.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: cf-net
-published: true
sorting: 90
keywords: [protocol, cli]
+aliases:
+ - "/reference-components-cf-net.html"
---
`cf-net` can be used to send simple protocol commands to a policy server.
@@ -14,7 +15,7 @@ It is in some ways an extremely light-weight version of `cf-agent` - policy eval
## Command reference
-[%CFEngine_include_snippet(cf-net.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-net.help, [\s]*--[a-z], ^$) >}}
diff --git a/reference/components/cf-promises.markdown b/content/reference/components/cf-promises.markdown
similarity index 89%
rename from reference/components/cf-promises.markdown
rename to content/reference/components/cf-promises.markdown
index a7a79a078..deb660e14 100644
--- a/reference/components/cf-promises.markdown
+++ b/content/reference/components/cf-promises.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: cf-promises
-published: true
sorting: 40
+aliases:
+ - "/reference-components-cf-promises.html"
---
`cf-promises` is a tool for checking CFEngine policy code. It operates by
@@ -24,4 +25,4 @@ are not evaluated prematurely (as you would expect).
## Command reference
-[%CFEngine_include_snippet(cf-promises.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-promises.help, [\s]*--[a-z], ^$) >}}
diff --git a/reference/components/cf-reactor.markdown b/content/reference/components/cf-reactor.markdown
similarity index 87%
rename from reference/components/cf-reactor.markdown
rename to content/reference/components/cf-reactor.markdown
index e3ef86c4e..d0b67ab45 100644
--- a/reference/components/cf-reactor.markdown
+++ b/content/reference/components/cf-reactor.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: cf-reactor
-published: true
keywords: [reactor]
+aliases:
+ - "/reference-components-cf-reactor.html"
---
`cf-reactor` is the CFEngine event reaction daemon, it lists to `NOTIFY` events
@@ -26,4 +27,4 @@ refreshes the CMDB data file (`host_specific.json`) for the particular host.
## Command reference
-[%CFEngine_include_snippet(cf-reactor.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-reactor.help, [\s]*--[a-z], ^$) >}}
diff --git a/reference/components/cf-runagent.markdown b/content/reference/components/cf-runagent.markdown
similarity index 93%
rename from reference/components/cf-runagent.markdown
rename to content/reference/components/cf-runagent.markdown
index 61eea58c1..2ef23bad2 100644
--- a/reference/components/cf-runagent.markdown
+++ b/content/reference/components/cf-runagent.markdown
@@ -1,18 +1,24 @@
---
layout: default
title: cf-runagent
-published: true
sorting: 70
keywords: [runagent]
+aliases:
+ - "/reference-components-cf-runagent.html"
---
`cf-runagent` connects to a list of running instances of
`cf-serverd`. It allows foregoing the usual `cf-execd` schedule to activate `cf-agent`.
-Additionally, a user may send [classes][Classes and decisions] to be defined
+A user may send [classes][Classes and decisions] to be defined
on the remote host. Two kinds of classes may be sent: classes to decide on
which hosts `cf-agent` will be started, and classes that the user requests
`cf-agent` should define on execution. The latter type is regulated by
`cf-serverd`'s [role based access control][roles].
+Additionally a user may send a list of [bundles][Bundles] to activate on the remote host
+with the `--remote-bundles` argument.
+This argument takes one or more comma separated bundle names.
+Each of the bundles requested must be given explicit permission with an access promise
+matching the bundle names.
**Notes:**
@@ -20,7 +26,7 @@ which hosts `cf-agent` will be started, and classes that the user requests
## Command reference
-[%CFEngine_include_snippet(cf-runagent.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-runagent.help, [\s]*--[a-z], ^$) >}}
**See also:** [bundle resource_type in server access promises][access#resource_type], [cfruncommand in body server control][cf-serverd#cfruncommand]
diff --git a/reference/components/cf-secret.markdown b/content/reference/components/cf-secret.markdown
similarity index 92%
rename from reference/components/cf-secret.markdown
rename to content/reference/components/cf-secret.markdown
index b7c814389..e47eb2559 100644
--- a/reference/components/cf-secret.markdown
+++ b/content/reference/components/cf-secret.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: cf-secret
-published: true
sorting: 10
keywords: [cf-secret]
+aliases:
+ - "/reference-components-cf-secret.html"
---
`cf-secret` encrypts and decrypts files using CFEngine keys.
@@ -12,7 +13,7 @@ Files can be encrypted for one or more public keys. A matching private key is re
## Command reference
-[%CFEngine_include_snippet(cf-secret.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-secret.help, [\s]*--[a-z], ^$) >}}
## Example encrypting and decrypting data
@@ -69,11 +70,11 @@ No difference
**Policy:**
-[%CFEngine_include_example(cf-secret.cf, #\+begin_src\s+cfengine3\s*, .*end_src)%]
+{{< CFEngine_include_example(cf-secret.cf, #\+begin_src\s+cfengine3\s*, .*end_src) >}}
**Example Output:**
-[%CFEngine_include_example(cf-secret.cf, #\+begin_src\s+static_example_output\s*, .*end_src)%]
+{{< CFEngine_include_example(cf-secret.cf, #\+begin_src\s+static_example_output\s*, .*end_src) >}}
**History:**
diff --git a/reference/components/cf-serverd.markdown b/content/reference/components/cf-serverd.markdown
similarity index 98%
rename from reference/components/cf-serverd.markdown
rename to content/reference/components/cf-serverd.markdown
index 2d2e12ff6..aa9883e2a 100644
--- a/reference/components/cf-serverd.markdown
+++ b/content/reference/components/cf-serverd.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: cf-serverd
-published: true
sorting: 20
keywords: [server]
+aliases:
+ - "/reference-components-cf-serverd.html"
---
`cf-serverd` is a socket listening daemon providing two services: it acts as a
@@ -32,7 +33,7 @@ affected by `common` and `server` control bodies.
## Command reference
-[%CFEngine_include_snippet(cf-serverd.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-serverd.help, [\s]*--[a-z], ^$) >}}
## Control promises
@@ -138,7 +139,7 @@ allowlegacyconnects => { }
In CFEngine >= 3.9, legacy protocol is disallowed by default, and you have to
specify a list of hosts allowed to use the legacy protocol.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**See also:** [`protocol_version`][Components#protocol_version]
@@ -148,7 +149,7 @@ specify a list of hosts allowed to use the legacy protocol.
**Description:** List of TLS ciphers the server accepts both **incoming** and **outgoing** (in the case of client initiated reporting with CFEngine Enterprise) connections using `cf-serverd`.
For a list of possible ciphers, see man page for "openssl ciphers".
-[%CFEngine_promise_attribute(AES256-GCM-SHA384:AES256-SHA)%]
+{{< CFEngine_promise_attribute(AES256-GCM-SHA384:AES256-SHA) >}}
**Example:**
@@ -180,7 +181,7 @@ this does not do anything as the classic protocol does not support TLS ciphers.
**Description:** Minimum TLS version allowed for both **incoming** and **outgoing** (in the case of client initiated reporting with CFEngine Enterprise) connections using `cf-serverd`.
-[%CFEngine_promise_attribute(1.0)%]
+{{< CFEngine_promise_attribute(1.0) >}}
**Example:**
diff --git a/reference/components/cf-support.markdown b/content/reference/components/cf-support.markdown
similarity index 80%
rename from reference/components/cf-support.markdown
rename to content/reference/components/cf-support.markdown
index 1204df5d0..2653adbec 100644
--- a/reference/components/cf-support.markdown
+++ b/content/reference/components/cf-support.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: cf-support
-published: true
sorting: 10
keywords: [cf-support]
+aliases:
+ - "/reference-components-cf-support.html"
---
`cf-support` gathers various details about the system and creates a tarball in the current directory to submit to support.
@@ -12,7 +13,7 @@ The utility will prompt for an optional support ticket number as well as prompt
## Command reference
-[%CFEngine_include_snippet(cf-support.help, [\s]*--[a-z], ^$)%]
+{{< CFEngine_include_snippet(cf-support.help, [\s]*--[a-z], ^$) >}}
## History
diff --git a/reference/components/file_control_promises.markdown b/content/reference/components/file_control_promises.markdown
similarity index 97%
rename from reference/components/file_control_promises.markdown
rename to content/reference/components/file_control_promises.markdown
index e62066c44..160a2cb80 100644
--- a/reference/components/file_control_promises.markdown
+++ b/content/reference/components/file_control_promises.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: file control
-published: true
sorting: 100
+aliases:
+ - "/reference-components-file_control_promises.html"
---
diff --git a/reference/functions/TEMPLATE b/content/reference/functions/TEMPLATE
similarity index 56%
rename from reference/functions/TEMPLATE
rename to content/reference/functions/TEMPLATE
index 9d8d703d3..fba9189f0 100644
--- a/reference/functions/TEMPLATE
+++ b/content/reference/functions/TEMPLATE
@@ -5,13 +5,13 @@ published: false
tags: [reference, functions, more, tags]
---
-[%CFEngine_function_prototype(arguments, here)%]
+{{< CFEngine_function_prototype(arguments, here) >}}
**Description:** Brief description of function.
**Return type:** `data|int|real|string|(i|r|s)list|class|(i|r)range|`
-[%CFEngine_function_attributes(arguments, here)%]
+{{< CFEngine_function_attributes(arguments, here) >}}
Write a detailed description here.
@@ -19,15 +19,15 @@ Write a detailed description here.
The whole thing:
-[%CFEngine_include_snippet(type.cf)%]
+{{< CFEngine_include_snippet(type.cf) >}}
Or, selected sections:
-[%CFEngine_include_snippet(type.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(type.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(type.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(type.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:**
diff --git a/reference/functions.markdown b/content/reference/functions/_index.markdown
similarity index 96%
rename from reference/functions.markdown
rename to content/reference/functions/_index.markdown
index 594bb520f..aa689c48f 100644
--- a/reference/functions.markdown
+++ b/content/reference/functions/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Functions
-published: true
sorting: 30
+aliases:
+ - "/reference-functions.html"
---
Functions take zero or more values as arguments and return a value.
@@ -12,7 +13,7 @@ take an arbitrary amount of arguments.
They can return scalar (string|int|real|bool), list (slist, ilist, rlist) and data values:
-[%CFEngine_include_example(function-return-types.cf)%]
+{{< CFEngine_include_example(function-return-types.cf) >}}
### Boolean return type
@@ -93,12 +94,12 @@ functions multiple times, which can be a performance concern.
Some _system_ functions are particularly expensive:
-{% comment %}
+
* `execresult()` and `returnszero()` for shell execution
* `regldap()`, `ldapvalue()`, and `ldaplist()` for LDAP queries
@@ -108,7 +109,7 @@ cf-promises --syntax-description json | jq '.functions | with_entries(select(.va
* `hubknowledge()`, and `remotescalar()` for hub queries
When enabled
-[cached functions](https://docs.cfengine.com/docs/{{site.cfengine.branch}}/search.html?q=The+return+value+is+cached)
+[cached functions](https://docs.cfengine.com/docs/{{< params "cfengine.branch" >}}/search.html?q=The+return+value+is+cached)
are **not executed on every pass of convergence**. Instead, the function will
only be executed once during the
[agent evaluation step][Normal ordering#Agent evaluation step]
@@ -195,4 +196,4 @@ wants.
There are a large number of functions built into CFEngine. The following
tables might make it easier for you to find the function you need.
-[%CFEngine_function_table()%]
+{{< CFEngine_function_table() >}}
diff --git a/content/reference/functions/accessedbefore.markdown b/content/reference/functions/accessedbefore.markdown
new file mode 100644
index 000000000..4099c7162
--- /dev/null
+++ b/content/reference/functions/accessedbefore.markdown
@@ -0,0 +1,30 @@
+---
+layout: default
+title: accessedbefore
+aliases:
+ - "/reference-functions-accessedbefore.html"
+---
+
+{{< CFEngine_function_prototype(newer,older) >}}
+
+**Description:** Compares the `atime` fields of two files.
+
+Return true if `newer` was accessed before `older`.
+
+{{< CFEngine_function_attributes(newer, older) >}}
+
+**Example:**
+
+Prepare:
+
+{{< CFEngine_include_snippet(accessedbefore.cf, #\+begin_src prep, .*end_src) >}}
+
+Run:
+
+{{< CFEngine_include_snippet(accessedbefore.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(accessedbefore.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**See also:** `changedbefore()`, `isnewerthan()`
diff --git a/reference/functions/accumulated.markdown b/content/reference/functions/accumulated.markdown
similarity index 92%
rename from reference/functions/accumulated.markdown
rename to content/reference/functions/accumulated.markdown
index 2608386cf..cf8a81699 100644
--- a/reference/functions/accumulated.markdown
+++ b/content/reference/functions/accumulated.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: accumulated
-published: true
+aliases:
+ - "/reference-functions-accumulated.html"
---
-[%CFEngine_function_prototype(years, months, days, hours, minutes, seconds)%]
+{{< CFEngine_function_prototype(years, months, days, hours, minutes, seconds) >}}
**Description:** Convert an accumulated amount of time into a system representation.
diff --git a/reference/functions/ago.markdown b/content/reference/functions/ago.markdown
similarity index 80%
rename from reference/functions/ago.markdown
rename to content/reference/functions/ago.markdown
index e98835827..d4a0b81ac 100644
--- a/reference/functions/ago.markdown
+++ b/content/reference/functions/ago.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: ago
-published: true
+aliases:
+ - "/reference-functions-ago.html"
---
-[%CFEngine_function_prototype(years, months, days, hours, minutes, seconds)%]
+{{< CFEngine_function_prototype(years, months, days, hours, minutes, seconds) >}}
**Description:** Convert a time relative to now to an integer system representation.
@@ -44,11 +45,11 @@ Seconds of runtime
**Example:**
-[%CFEngine_include_snippet(ago.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(ago.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(ago.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(ago.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:**
diff --git a/reference/functions/and.markdown b/content/reference/functions/and.markdown
similarity index 88%
rename from reference/functions/and.markdown
rename to content/reference/functions/and.markdown
index affbdcc28..e07736171 100644
--- a/reference/functions/and.markdown
+++ b/content/reference/functions/and.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: and
-published: true
+aliases:
+ - "/reference-functions-and.html"
---
-[%CFEngine_function_prototype(...)%]
+{{< CFEngine_function_prototype(...) >}}
**Description:** Returns `any` if all arguments evaluate to true and `!any` if
any argument evaluates to false.
diff --git a/reference/functions/basename.markdown b/content/reference/functions/basename.markdown
similarity index 52%
rename from reference/functions/basename.markdown
rename to content/reference/functions/basename.markdown
index 6c03fd669..1eae4c744 100644
--- a/reference/functions/basename.markdown
+++ b/content/reference/functions/basename.markdown
@@ -1,20 +1,21 @@
---
layout: default
title: basename
-published: true
+aliases:
+ - "/reference-functions-basename.html"
---
-[%CFEngine_function_prototype(filename, optional_extension)%]
+{{< CFEngine_function_prototype(filename, optional_extension) >}}
**Description:** Retrieves the basename of a filename.
This function implements the same behavior of basename program on Unix and Unix-like operating systems.
-[%CFEngine_function_attributes(filename, optional_extension)%]
+{{< CFEngine_function_attributes(filename, optional_extension) >}}
**Example:**
-[%CFEngine_include_example(basename.cf)%]
+{{< CFEngine_include_example(basename.cf) >}}
**History:**
diff --git a/reference/functions/bundlesmatching.markdown b/content/reference/functions/bundlesmatching.markdown
similarity index 72%
rename from reference/functions/bundlesmatching.markdown
rename to content/reference/functions/bundlesmatching.markdown
index 8f351048d..a3f4207c7 100644
--- a/reference/functions/bundlesmatching.markdown
+++ b/content/reference/functions/bundlesmatching.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: bundlesmatching
-published: true
+aliases:
+ - "/reference-functions-bundlesmatching.html"
---
-[%CFEngine_function_prototype(name, tag1, tag2, ...)%]
+{{< CFEngine_function_prototype(name, tag1, tag2, ...) >}}
**Description:** Return the list of defined bundles matching `name` and any
tags given. Both bundlename and tags are regular expressions. `name` is
@@ -24,14 +25,14 @@ to do dynamic inputs and a dynamic bundle call chain. The dynamic
chain is constrained by an explicit regular expression to avoid
accidental or intentional running of unwanted bundles.
-[%CFEngine_function_attributes(name, tag1, tag2, ...)%]
+{{< CFEngine_function_attributes(name, tag1, tag2, ...) >}}
**Example:**
-[%CFEngine_include_snippet(bundlesmatching.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(bundlesmatching.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(bundlesmatching.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(bundlesmatching.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [`findfiles()`][findfiles].
diff --git a/reference/functions/bundlestate.markdown b/content/reference/functions/bundlestate.markdown
similarity index 76%
rename from reference/functions/bundlestate.markdown
rename to content/reference/functions/bundlestate.markdown
index bdb2b442c..edd09c0ad 100644
--- a/reference/functions/bundlestate.markdown
+++ b/content/reference/functions/bundlestate.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: bundlestate
-published: true
+aliases:
+ - "/reference-functions-bundlestate.html"
---
-[%CFEngine_function_prototype(bundlename)%]
+{{< CFEngine_function_prototype(bundlename) >}}
**Description:** Returns the current evaluation data state for bundle `bundlename`.
@@ -21,15 +22,15 @@ The namespace of the bundle should **not** be included if it's in the
that). But if the bundle is in another namespace, you must prefix the
name with the namespace in the normal `mynamespace:mybundle` fashion.
-[%CFEngine_function_attributes(bundlename)%]
+{{< CFEngine_function_attributes(bundlename) >}}
**Example:**
-[%CFEngine_include_snippet(bundlestate.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(bundlestate.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(bundlestate.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(bundlestate.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `getindices()`, `classesmatching()`, `variablesmatching()`, `mergedata()`, [template_method][files#template_method], `mustache`, `inline_mustache`, `datastate()`
diff --git a/reference/functions/callstack_callers.markdown b/content/reference/functions/callstack_callers.markdown
similarity index 92%
rename from reference/functions/callstack_callers.markdown
rename to content/reference/functions/callstack_callers.markdown
index f7a4fdecc..5fec77df6 100644
--- a/reference/functions/callstack_callers.markdown
+++ b/content/reference/functions/callstack_callers.markdown
@@ -1,14 +1,15 @@
---
layout: default
title: callstack_callers
-published: true
+aliases:
+ - "/reference-functions-callstack_callers.html"
---
-[%CFEngine_function_prototype()%]
+{{< CFEngine_function_prototype() >}}
**Description:** Return the call stack for the current promise.
-[%CFEngine_function_attributes()%]
+{{< CFEngine_function_attributes() >}}
This is a call stack inspection function and the specific content may be tied
to a specific CFEngine version. Using it requires writing code that takes the
diff --git a/reference/functions/callstack_promisers.markdown b/content/reference/functions/callstack_promisers.markdown
similarity index 83%
rename from reference/functions/callstack_promisers.markdown
rename to content/reference/functions/callstack_promisers.markdown
index 0c8d1d71b..08eb9c99b 100644
--- a/reference/functions/callstack_promisers.markdown
+++ b/content/reference/functions/callstack_promisers.markdown
@@ -1,14 +1,15 @@
---
layout: default
title: callstack_promisers
-published: true
+aliases:
+ - "/reference-functions-callstack_promisers.html"
---
-[%CFEngine_function_prototype()%]
+{{< CFEngine_function_prototype() >}}
**Description:** Return the promisers along the call stack for the current promise.
-[%CFEngine_function_attributes()%]
+{{< CFEngine_function_attributes() >}}
This is a call stack inspection function and the specific content may be tied
to a specific CFEngine version. Using it requires writing code that takes the
diff --git a/content/reference/functions/canonify.markdown b/content/reference/functions/canonify.markdown
new file mode 100644
index 000000000..484cf3efb
--- /dev/null
+++ b/content/reference/functions/canonify.markdown
@@ -0,0 +1,25 @@
+---
+layout: default
+title: canonify
+aliases:
+ - "/reference-functions-canonify.html"
+---
+
+{{< CFEngine_function_prototype(text) >}}
+
+**Description:** Convert an arbitrary string `text` into a legal class name.
+
+This function turns arbitrary text into class data.
+
+{{< CFEngine_function_attributes(text) >}}
+
+**Example:**
+
+
+{{< CFEngine_include_snippet(canonify.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(canonify.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**See also:** [classify()][classify], `canonifyuniquely()`.
diff --git a/reference/functions/canonifyuniquely.markdown b/content/reference/functions/canonifyuniquely.markdown
similarity index 83%
rename from reference/functions/canonifyuniquely.markdown
rename to content/reference/functions/canonifyuniquely.markdown
index f0b464f48..a08f75615 100644
--- a/reference/functions/canonifyuniquely.markdown
+++ b/content/reference/functions/canonifyuniquely.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: canonifyuniquely
-published: true
+aliases:
+ - "/reference-functions-canonifyuniquely.html"
---
-[%CFEngine_function_prototype(text)%]
+{{< CFEngine_function_prototype(text) >}}
**Description:** Convert an arbitrary string `text` into a unique legal class name.
@@ -17,7 +18,7 @@ A common use case is when you need unique array keys for each file in
a list, but files in the list may have the same name when
`canonify`-ed.
-[%CFEngine_function_attributes(text)%]
+{{< CFEngine_function_attributes(text) >}}
**Example:**
diff --git a/reference/functions/cf_version_after.markdown b/content/reference/functions/cf_version_after.markdown
similarity index 51%
rename from reference/functions/cf_version_after.markdown
rename to content/reference/functions/cf_version_after.markdown
index 562efa15c..ae7a7ab2e 100644
--- a/reference/functions/cf_version_after.markdown
+++ b/content/reference/functions/cf_version_after.markdown
@@ -1,22 +1,23 @@
---
layout: default
title: cf_version_after
-published: true
+aliases:
+ - "/reference-functions-cf_version_after.html"
---
-[%CFEngine_function_prototype(string)%]
+{{< CFEngine_function_prototype(string) >}}
**Description:** Returns `true` if local CFEngine version is newer than specified `string`.
-[%CFEngine_function_attributes(string)%]
+{{< CFEngine_function_attributes(string) >}}
**Example:**
-[%CFEngine_include_snippet(cf_version_after.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_after.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(cf_version_after.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_after.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `version_compare()`, `cf_version_maximum()`, `cf_version_minimum()`, `cf_version_before()`, `cf_version_at()`, `cf_version_between()`.
diff --git a/reference/functions/cf_version_at.markdown b/content/reference/functions/cf_version_at.markdown
similarity index 52%
rename from reference/functions/cf_version_at.markdown
rename to content/reference/functions/cf_version_at.markdown
index 07a8bf9bf..df36147c4 100644
--- a/reference/functions/cf_version_at.markdown
+++ b/content/reference/functions/cf_version_at.markdown
@@ -1,22 +1,23 @@
---
layout: default
title: cf_version_at
-published: true
+aliases:
+ - "/reference-functions-cf_version_at.html"
---
-[%CFEngine_function_prototype(string)%]
+{{< CFEngine_function_prototype(string) >}}
**Description:** Returns `true` if local CFEngine version is the same as specified `string`.
-[%CFEngine_function_attributes(string)%]
+{{< CFEngine_function_attributes(string) >}}
**Example:**
-[%CFEngine_include_snippet(cf_version_at.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_at.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(cf_version_at.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_at.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `version_compare()`, `cf_version_maximum()`, `cf_version_minimum()`, `cf_version_after()`, `cf_version_before()`, `cf_version_between()`.
diff --git a/reference/functions/cf_version_before.markdown b/content/reference/functions/cf_version_before.markdown
similarity index 51%
rename from reference/functions/cf_version_before.markdown
rename to content/reference/functions/cf_version_before.markdown
index 4886746d0..d8a84a6ad 100644
--- a/reference/functions/cf_version_before.markdown
+++ b/content/reference/functions/cf_version_before.markdown
@@ -1,22 +1,23 @@
---
layout: default
title: cf_version_before
-published: true
+aliases:
+ - "/reference-functions-cf_version_before.html"
---
-[%CFEngine_function_prototype(string)%]
+{{< CFEngine_function_prototype(string) >}}
**Description:** Returns `true` if local CFEngine version is older than specified `string`.
-[%CFEngine_function_attributes(string)%]
+{{< CFEngine_function_attributes(string) >}}
**Example:**
-[%CFEngine_include_snippet(cf_version_before.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_before.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(cf_version_before.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_before.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `version_compare()`, `cf_version_maximum()`, `cf_version_minimum()`, `cf_version_after()`, `cf_version_at()`, `cf_version_between()`.
diff --git a/reference/functions/cf_version_between.markdown b/content/reference/functions/cf_version_between.markdown
similarity index 53%
rename from reference/functions/cf_version_between.markdown
rename to content/reference/functions/cf_version_between.markdown
index 8b9b88b35..c66d7d8f2 100644
--- a/reference/functions/cf_version_between.markdown
+++ b/content/reference/functions/cf_version_between.markdown
@@ -1,22 +1,23 @@
---
layout: default
title: cf_version_between
-published: true
+aliases:
+ - "/reference-functions-cf_version_between.html"
---
-[%CFEngine_function_prototype(string, string)%]
+{{< CFEngine_function_prototype(string, string) >}}
**Description:** Returns `true` if local CFEngine version is between the first `string` and the second `string`. This function is inclusive.
-[%CFEngine_function_attributes(string, string)%]
+{{< CFEngine_function_attributes(string, string) >}}
**Example:**
-[%CFEngine_include_snippet(cf_version_between.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_between.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(cf_version_between.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_between.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `version_compare()`, `cf_version_maximum()`, `cf_version_minimum()`, `cf_version_after()`, `cf_version_before()`, `cf_version_at()`.
diff --git a/reference/functions/cf_version_maximum.markdown b/content/reference/functions/cf_version_maximum.markdown
similarity index 51%
rename from reference/functions/cf_version_maximum.markdown
rename to content/reference/functions/cf_version_maximum.markdown
index 62f3b0677..654b9c789 100644
--- a/reference/functions/cf_version_maximum.markdown
+++ b/content/reference/functions/cf_version_maximum.markdown
@@ -1,22 +1,23 @@
---
layout: default
title: cf_version_maximum
-published: true
+aliases:
+ - "/reference-functions-cf_version_maximum.html"
---
-[%CFEngine_function_prototype(string)%]
+{{< CFEngine_function_prototype(string) >}}
**Description:** Returns `true` if local CFEngine version is the same or older than specified `string`.
-[%CFEngine_function_attributes(string)%]
+{{< CFEngine_function_attributes(string) >}}
**Example:**
-[%CFEngine_include_snippet(cf_version_maximum.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_maximum.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(cf_version_maximum.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_maximum.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `version_compare()`, `cf_version_minimum()`, `cf_version_after()`, `cf_version_before()`, `cf_version_at()`, `cf_version_between()`.
diff --git a/reference/functions/cf_version_minimum.markdown b/content/reference/functions/cf_version_minimum.markdown
similarity index 51%
rename from reference/functions/cf_version_minimum.markdown
rename to content/reference/functions/cf_version_minimum.markdown
index 8d7d27ac9..d9d8d772b 100644
--- a/reference/functions/cf_version_minimum.markdown
+++ b/content/reference/functions/cf_version_minimum.markdown
@@ -1,22 +1,23 @@
---
layout: default
title: cf_version_minimum
-published: true
+aliases:
+ - "/reference-functions-cf_version_minimum.html"
---
-[%CFEngine_function_prototype(string)%]
+{{< CFEngine_function_prototype(string) >}}
**Description:** Returns `true` if local CFEngine version is newer than or equal to specified `string`.
-[%CFEngine_function_attributes(string)%]
+{{< CFEngine_function_attributes(string) >}}
**Example:**
-[%CFEngine_include_snippet(cf_version_minimum.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_minimum.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(cf_version_minimum.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(cf_version_minimum.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `version_compare()`, `cf_version_maximum()`, `cf_version_after()`, `cf_version_before()`, `cf_version_at()`, `cf_version_between()`.
diff --git a/reference/functions/changedbefore.markdown b/content/reference/functions/changedbefore.markdown
similarity index 80%
rename from reference/functions/changedbefore.markdown
rename to content/reference/functions/changedbefore.markdown
index ccc7787e0..5c7b5524c 100644
--- a/reference/functions/changedbefore.markdown
+++ b/content/reference/functions/changedbefore.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: changedbefore
-published: true
+aliases:
+ - "/reference-functions-changedbefore.html"
---
-[%CFEngine_function_prototype(newer,older)%]
+{{< CFEngine_function_prototype(newer,older) >}}
**Description:** Compares the `ctime` fields of two files.
@@ -14,7 +15,7 @@ Change times include both file permissions and file contents.
Comparisons like this are normally used for updating files (like the
'make' command).
-[%CFEngine_function_attributes(newer, older)%]
+{{< CFEngine_function_attributes(newer, older) >}}
**Example:**
diff --git a/reference/functions/classesmatching.markdown b/content/reference/functions/classesmatching.markdown
similarity index 70%
rename from reference/functions/classesmatching.markdown
rename to content/reference/functions/classesmatching.markdown
index 2f3e55f60..6c2ea8895 100644
--- a/reference/functions/classesmatching.markdown
+++ b/content/reference/functions/classesmatching.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: classesmatching
-published: true
+aliases:
+ - "/reference-functions-classesmatching.html"
---
-[%CFEngine_function_prototype(name, tag1, tag2, ...)%]
+{{< CFEngine_function_prototype(name, tag1, tag2, ...) >}}
**Description:** Return the list of set classes matching `name` and any tags
given. Both `name` and tags are regular expressions. `name` is required, tags
@@ -18,16 +19,18 @@ When any tags are given, only the classes with those tags matching the given
[anchored][anchored] regular expressions are returned. Class tags are set
using the [`meta`][Promise types#meta] attribute.
-[%CFEngine_function_attributes(name, tag1, tag2, ...)%]
+If no classes match `name` and any tags given then an empty list is returned.
+
+{{< CFEngine_function_attributes(name, tag1, tag2, ...) >}}
**Example:**
-[%CFEngine_include_snippet(classesmatching.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(classesmatching.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(classesmatching.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(classesmatching.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [variablesmatching()][variablesmatching], [bundlesmatching()][bundlesmatching], [classes defined via augments][Augments#classes], [classmatch()][classmatch], [countclassesmatching()][countclassesmatching]
diff --git a/reference/functions/classfiltercsv.markdown b/content/reference/functions/classfiltercsv.markdown
similarity index 70%
rename from reference/functions/classfiltercsv.markdown
rename to content/reference/functions/classfiltercsv.markdown
index c3f779f7f..183283e2a 100644
--- a/reference/functions/classfiltercsv.markdown
+++ b/content/reference/functions/classfiltercsv.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: classfiltercsv
-published: true
+aliases:
+ - "/reference-functions-classfiltercsv.html"
---
-[%CFEngine_function_prototype(filename, has_header, class_column, optional_sort_column)%]
+{{< CFEngine_function_prototype(filename, has_header, class_column, optional_sort_column) >}}
**Description:**
Parses CSV data from an [RFC 4180](http://www.ietf.org/rfc/rfc4180.txt) compliant file `filename` (`CRLF` line endings required), and returns a data variable that is
@@ -17,21 +18,21 @@ given column. Both `class_column` and `optional_sort_column` must be integer
indices starting from `0`, and must be at most the total amount of columns
minus `1`.
-[%CFEngine_function_attributes(filename, has_header, class_column, optional_sort_column)%]
+{{< CFEngine_function_attributes(filename, has_header, class_column, optional_sort_column) >}}
**Example:**
**Prepare CSV:**
-[%CFEngine_include_snippet(classfiltercsv.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(classfiltercsv.cf, #\+begin_src prep, .*end_src) >}}
**Policy:**
-[%CFEngine_include_snippet(classfiltercsv.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(classfiltercsv.cf, #\+begin_src cfengine3, .*end_src) >}}
**Output:**
-[%CFEngine_include_snippet(classfiltercsv.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(classfiltercsv.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
diff --git a/reference/functions/classify.markdown b/content/reference/functions/classify.markdown
similarity index 74%
rename from reference/functions/classify.markdown
rename to content/reference/functions/classify.markdown
index cf0e5a181..83b43d007 100644
--- a/reference/functions/classify.markdown
+++ b/content/reference/functions/classify.markdown
@@ -1,17 +1,18 @@
---
layout: default
title: classify
-published: true
+aliases:
+ - "/reference-functions-classify.html"
---
-[%CFEngine_function_prototype(text)%]
+{{< CFEngine_function_prototype(text) >}}
**Description:** Returns whether the canonicalization of `text` is a currently
set class.
This is useful for transforming variables into classes.
-[%CFEngine_function_attributes(text)%]
+{{< CFEngine_function_attributes(text) >}}
**Example:**
diff --git a/reference/functions/classmatch.markdown b/content/reference/functions/classmatch.markdown
similarity index 61%
rename from reference/functions/classmatch.markdown
rename to content/reference/functions/classmatch.markdown
index c1b65d6f0..582dfee91 100644
--- a/reference/functions/classmatch.markdown
+++ b/content/reference/functions/classmatch.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: classmatch
-published: true
+aliases:
+ - "/reference-functions-classmatch.html"
---
-[%CFEngine_function_prototype(regex, tag1, tag2, ...)%]
+{{< CFEngine_function_prototype(regex, tag1, tag2, ...) >}}
**Description:** Tests whether `regex` matches any currently set class.
@@ -13,14 +14,14 @@ currently defined class, otherwise returns false.
You can optionally restrict the search by tags, which you can list after the regular expression.
-[%CFEngine_function_attributes(regex, tag1, tag2, ...)%]
+{{< CFEngine_function_attributes(regex, tag1, tag2, ...) >}}
**Example:**
-[%CFEngine_include_snippet(classmatch.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(classmatch.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(classmatch.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(classmatch.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [canonify()][canonify], [classify()][classify], [classesmatching()][classesmatching], [classes defined via augments][Augments#classes], [countclassesmatching()][countclassesmatching]
diff --git a/reference/functions/concat.markdown b/content/reference/functions/concat.markdown
similarity index 76%
rename from reference/functions/concat.markdown
rename to content/reference/functions/concat.markdown
index 00f750987..2de48bf18 100644
--- a/reference/functions/concat.markdown
+++ b/content/reference/functions/concat.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: concat
-published: true
+aliases:
+ - "/reference-functions-concat.html"
---
-[%CFEngine_function_prototype(...)%]
+{{< CFEngine_function_prototype(...) >}}
**Description:** Concatenates all arguments into a string.
diff --git a/reference/functions/countclassesmatching.markdown b/content/reference/functions/countclassesmatching.markdown
similarity index 59%
rename from reference/functions/countclassesmatching.markdown
rename to content/reference/functions/countclassesmatching.markdown
index beb543f01..969cc4fc3 100644
--- a/reference/functions/countclassesmatching.markdown
+++ b/content/reference/functions/countclassesmatching.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: countclassesmatching
-published: true
+aliases:
+ - "/reference-functions-countclassesmatching.html"
---
-[%CFEngine_function_prototype(regex, tag1, tag2, ...)%]
+{{< CFEngine_function_prototype(regex, tag1, tag2, ...) >}}
**Description:** Count the number of defined classes matching `regex`.
@@ -14,14 +15,14 @@ of classes matched.
You can optionally restrict the search by tags, which you can list after the regular expression.
-[%CFEngine_function_attributes(regex, tag1, tag2, ...)%]
+{{< CFEngine_function_attributes(regex, tag1, tag2, ...) >}}
**Example:**
-[%CFEngine_include_snippet(countclassesmatching.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(countclassesmatching.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(countclassesmatching.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(countclassesmatching.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [classes defined via augments][Augments#classes], [classmatch()][classmatch], [classesmatching()][classesmatching]
diff --git a/content/reference/functions/countlinesmatching.markdown b/content/reference/functions/countlinesmatching.markdown
new file mode 100644
index 000000000..5075c46ec
--- /dev/null
+++ b/content/reference/functions/countlinesmatching.markdown
@@ -0,0 +1,25 @@
+---
+layout: default
+title: countlinesmatching
+aliases:
+ - "/reference-functions-countlinesmatching.html"
+---
+
+{{< CFEngine_function_prototype(regex, filename) >}}
+
+**Description:** Count the number of lines in file `filename` matching
+`regex`.
+
+This function matches lines in the named file, using an [anchored][anchored]
+regular expression that should match the whole line, and returns the number of
+lines matched.
+
+{{< CFEngine_function_attributes(regex, filename) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(countlinesmatching.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(countlinesmatching.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
diff --git a/reference/functions/data_expand.markdown b/content/reference/functions/data_expand.markdown
similarity index 72%
rename from reference/functions/data_expand.markdown
rename to content/reference/functions/data_expand.markdown
index 9ac4672f1..f693a88a0 100644
--- a/reference/functions/data_expand.markdown
+++ b/content/reference/functions/data_expand.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: data_expand
-published: true
+aliases:
+ - "/reference-functions-data_expand.html"
---
-[%CFEngine_function_prototype(data_container)%]
+{{< CFEngine_function_prototype(data_container) >}}
**Description:** Transforms a data container to expand all variable references.
@@ -20,21 +21,21 @@ expanded.
This function is chiefly useful if you want to read data from an
external source and it can contain variable references.
-[%CFEngine_function_attributes(data_container)%]
+{{< CFEngine_function_attributes(data_container) >}}
**Example:**
Prepare to run the example policy:
-[%CFEngine_include_snippet(data_expand.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(data_expand.cf, #\+begin_src prep, .*end_src) >}}
Policy:
-[%CFEngine_include_snippet(data_expand.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(data_expand.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(data_expand.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(data_expand.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
diff --git a/reference/functions/data_readstringarray.markdown b/content/reference/functions/data_readstringarray.markdown
similarity index 60%
rename from reference/functions/data_readstringarray.markdown
rename to content/reference/functions/data_readstringarray.markdown
index 9b4e6ab5d..110aa3783 100644
--- a/reference/functions/data_readstringarray.markdown
+++ b/content/reference/functions/data_readstringarray.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: data_readstringarray
-published: true
+aliases:
+ - "/reference-functions-data_readstringarray.html"
---
-[%CFEngine_function_prototype(filename, comment, split, maxentries, maxbytes)%]
+{{< CFEngine_function_prototype(filename, comment, split, maxentries, maxbytes) >}}
**Description:** Returns a data container (map) with up to
`maxentries`-1 fields from the first `maxbytes` bytes of file
@@ -18,21 +19,21 @@ The `comment` field is a multiline regular expression and will strip out
unwanted patterns from the file being read, leaving unstripped characters to be
split into fields. Using the empty string (`""`) indicates no comments.
-[%CFEngine_function_attributes(filename, comment, split, maxentries, maxbytes)%]
+{{< CFEngine_function_attributes(filename, comment, split, maxentries, maxbytes) >}}
**Example:**
Prepare:
-[%CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `data_readstringarrayidx()`, `data`
diff --git a/reference/functions/data_readstringarrayidx.markdown b/content/reference/functions/data_readstringarrayidx.markdown
similarity index 59%
rename from reference/functions/data_readstringarrayidx.markdown
rename to content/reference/functions/data_readstringarrayidx.markdown
index 0bf11579c..6dbe0795c 100644
--- a/reference/functions/data_readstringarrayidx.markdown
+++ b/content/reference/functions/data_readstringarrayidx.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: data_readstringarrayidx
-published: true
+aliases:
+ - "/reference-functions-data_readstringarrayidx.html"
---
-[%CFEngine_function_prototype(filename, comment, split, maxentries, maxbytes)%]
+{{< CFEngine_function_prototype(filename, comment, split, maxentries, maxbytes) >}}
**Description:** Returns a data container (array) with up to
`maxentries` fields from the first `maxbytes` bytes of file `filename`.
@@ -16,21 +17,21 @@ non-identifiers at first field (e.g. duplicates or names with spaces), unlike
The `comment` field will strip out unwanted patterns from the file being read, leaving unstripped characters to be split into fields. Using the empty string (`""`) indicates no comments.
-[%CFEngine_function_attributes(filename, comment, split, maxentries, maxbytes)%]
+{{< CFEngine_function_attributes(filename, comment, split, maxentries, maxbytes) >}}
**Example:**
Prepare:
-[%CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(data_readstringarray.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `data_readstringarray()`, `data`
diff --git a/reference/functions/data_regextract.markdown b/content/reference/functions/data_regextract.markdown
similarity index 80%
rename from reference/functions/data_regextract.markdown
rename to content/reference/functions/data_regextract.markdown
index d5b518f4f..cb43c19eb 100644
--- a/reference/functions/data_regextract.markdown
+++ b/content/reference/functions/data_regextract.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: data_regextract
-published: true
+aliases:
+ - "/reference-functions-data_regextract.html"
---
-[%CFEngine_function_prototype(regex, string)%]
+{{< CFEngine_function_prototype(regex, string) >}}
**Description:** Returns a data container filled with backreferences
and named captures if the *multiline* [anchored][anchored] `regex` matches the
@@ -37,15 +38,15 @@ PCRE named captures are described in http://pcre.org/pcre.txt and several syntax
Since the regular expression is run with /dotall/ and /multiline/ modes, to match the end of a line, use ```[^\n]*``` instead of ```$```.
-[%CFEngine_function_attributes(regex, string)%]
+{{< CFEngine_function_attributes(regex, string) >}}
**Example:**
-[%CFEngine_include_snippet(data_regextract.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(data_regextract.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(data_regextract.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(data_regextract.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
diff --git a/content/reference/functions/data_sysctlvalues.markdown b/content/reference/functions/data_sysctlvalues.markdown
new file mode 100644
index 000000000..808272478
--- /dev/null
+++ b/content/reference/functions/data_sysctlvalues.markdown
@@ -0,0 +1,28 @@
+---
+layout: default
+title: data_sysctlvalues
+aliases:
+ - "/reference-functions-data_sysctlvalues.html"
+---
+
+{{< CFEngine_function_prototype() >}}
+
+**Description:** Returns all sysctl values using `/proc/sys`.
+
+{{< CFEngine_function_attributes() >}}
+
+**Example:**
+
+Policy:
+
+{{< CFEngine_include_example(data_sysctlvalues.cf, #\+begin_src\s+cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(data_sysctlvalues.cf, #\+begin_src\s+mock_example_output\s*, .*end_src) >}}
+
+**Notes:**
+
+**History:** Was introduced in version 3.11.0 (2017)
+
+**See also:** `sysctlvalue()`
diff --git a/reference/functions/datastate.markdown b/content/reference/functions/datastate.markdown
similarity index 82%
rename from reference/functions/datastate.markdown
rename to content/reference/functions/datastate.markdown
index 38dde8711..27fc28f4b 100644
--- a/reference/functions/datastate.markdown
+++ b/content/reference/functions/datastate.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: datastate
-published: true
+aliases:
+ - "/reference-functions-datastate.html"
---
-[%CFEngine_function_prototype()%]
+{{< CFEngine_function_prototype() >}}
**Description:** Returns the current evaluation data state.
@@ -22,15 +23,15 @@ clearer.
Mustache templates (see [template_method][files#template_method]), if not given a
`template_data`, will use the output of `datastate()` as their input.
-[%CFEngine_function_attributes()%]
+{{< CFEngine_function_attributes() >}}
**Example:**
-[%CFEngine_include_snippet(datastate.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(datastate.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(datastate.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(datastate.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `getindices()`, `classesmatching()`, `variablesmatching()`, `mergedata()`, [template_method][files#template_method], `mustache`, `inline_mustache`, `bundlestate()`
diff --git a/reference/functions/difference.markdown b/content/reference/functions/difference.markdown
similarity index 56%
rename from reference/functions/difference.markdown
rename to content/reference/functions/difference.markdown
index 6af4ab44d..192e6141a 100644
--- a/reference/functions/difference.markdown
+++ b/content/reference/functions/difference.markdown
@@ -1,25 +1,26 @@
---
layout: default
title: difference
-published: true
+aliases:
+ - "/reference-functions-difference.html"
---
-[%CFEngine_function_prototype(list1, list2)%]
+{{< CFEngine_function_prototype(list1, list2) >}}
**Description:** Returns the unique elements in `list1` that are not in
`list2`.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(list1, list2)%]
+{{< CFEngine_function_attributes(list1, list2) >}}
**Example:**
-[%CFEngine_include_snippet(difference.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(difference.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(difference.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(difference.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/dirname.markdown b/content/reference/functions/dirname.markdown
similarity index 58%
rename from reference/functions/dirname.markdown
rename to content/reference/functions/dirname.markdown
index 1a7635886..daac414d7 100644
--- a/reference/functions/dirname.markdown
+++ b/content/reference/functions/dirname.markdown
@@ -1,25 +1,26 @@
---
layout: default
title: dirname
-published: true
+aliases:
+ - "/reference-functions-dirname.html"
---
-[%CFEngine_function_prototype(path)%]
+{{< CFEngine_function_prototype(path) >}}
**Description:** Return the parent directory name for given `path`.
This function returns the directory name for `path`. If `path` is a
directory, then the name of its parent directory is returned.
-[%CFEngine_function_attributes(path)%]
+{{< CFEngine_function_attributes(path) >}}
**Example:**
-[%CFEngine_include_snippet(dirname.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(dirname.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(dirname.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(dirname.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
diff --git a/content/reference/functions/diskfree.markdown b/content/reference/functions/diskfree.markdown
new file mode 100644
index 000000000..064835245
--- /dev/null
+++ b/content/reference/functions/diskfree.markdown
@@ -0,0 +1,23 @@
+---
+layout: default
+title: diskfree
+aliases:
+ - "/reference-functions-diskfree.html"
+---
+
+{{< CFEngine_function_prototype(path) >}}
+
+**Descriptions**: Return the free space (in KB) available on the current
+partition of `path`.
+
+If `path` is not found, this function returns 0.
+
+{{< CFEngine_function_attributes(path) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(diskfree.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(diskfree.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
diff --git a/reference/functions/escape.markdown b/content/reference/functions/escape.markdown
similarity index 72%
rename from reference/functions/escape.markdown
rename to content/reference/functions/escape.markdown
index e96e21cc8..980a0f8c5 100644
--- a/reference/functions/escape.markdown
+++ b/content/reference/functions/escape.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: escape
-published: true
+aliases:
+ - "/reference-functions-escape.html"
---
-[%CFEngine_function_prototype(text)%]
+{{< CFEngine_function_prototype(text) >}}
**Description:** Escape regular expression characters in `text`.
@@ -13,16 +14,16 @@ expression is required, but the literal string contains special
characters. The function simply 'escapes' all the regular expression
characters, so that you do not have to.
-[%CFEngine_function_attributes(path)%]
+{{< CFEngine_function_attributes(path) >}}
**Example:**
-[%CFEngine_include_snippet(escape.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(escape.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(escape.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(escape.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
In this example, the string "192.168.2.1" is "escaped" to be equivalent to
"192\\.168\\.2\\.1", because without the backslashes, the regular expression
diff --git a/reference/functions/eval.markdown b/content/reference/functions/eval.markdown
similarity index 93%
rename from reference/functions/eval.markdown
rename to content/reference/functions/eval.markdown
index 63f94fdb3..1f9ecb025 100644
--- a/reference/functions/eval.markdown
+++ b/content/reference/functions/eval.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: eval
-published: true
+aliases:
+ - "/reference-functions-eval.html"
---
-[%CFEngine_function_prototype(expression, mode, options)%]
+{{< CFEngine_function_prototype(expression, mode, options) >}}
**Description:** Returns `expression` evaluated according to `mode`
and `options`. Currently only the `math` and `class` modes with
@@ -74,11 +75,11 @@ The following functions can be used, with parentheses:
- `abs`: absolute value
- `step`: 0 if the argument is negative, 1 otherwise
-[%CFEngine_function_attributes(expression, mode, options)%]
+{{< CFEngine_function_attributes(expression, mode, options) >}}
**Example:**
-[%CFEngine_include_example(eval.cf)%]
+{{< CFEngine_include_example(eval.cf) >}}
**History:**
diff --git a/reference/functions/every.markdown b/content/reference/functions/every.markdown
similarity index 72%
rename from reference/functions/every.markdown
rename to content/reference/functions/every.markdown
index 319866411..008959ca3 100644
--- a/reference/functions/every.markdown
+++ b/content/reference/functions/every.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: every
-published: true
+aliases:
+ - "/reference-functions-every.html"
---
-[%CFEngine_function_prototype(regex, list)%]
+{{< CFEngine_function_prototype(regex, list) >}}
**Description:** Returns whether every element in the variable `list` matches
the [unanchored][unanchored] `regex`.
@@ -21,11 +22,11 @@ list.
**Example:**
-[%CFEngine_include_snippet(every.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(every.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(every.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(every.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/execresult.markdown b/content/reference/functions/execresult.markdown
similarity index 79%
rename from reference/functions/execresult.markdown
rename to content/reference/functions/execresult.markdown
index 7e01e06e6..fb02dd57d 100644
--- a/reference/functions/execresult.markdown
+++ b/content/reference/functions/execresult.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: execresult
-published: true
+aliases:
+ - "/reference-functions-execresult.html"
---
-[%CFEngine_function_prototype(command, shell, output)%]
+{{< CFEngine_function_prototype(command, shell, output) >}}
**Description:** Execute `command` and return output (both `stdout` and `stderr`) as `string`.
@@ -19,20 +20,20 @@ potential security issue.
The optional `output` argument allows you to select which output will be
included, betweeen `stdout`, `stderr`, or `both`. The default is `both`.
-[%CFEngine_function_attributes(command, shell, output)%]
+{{< CFEngine_function_attributes(command, shell, output) >}}
**Example:**
Prepare:
-[%CFEngine_include_snippet(execresult.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(execresult.cf, #\+begin_src prep, .*end_src) >}}
Policy:
-[%CFEngine_include_snippet(execresult.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(execresult.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(execresult.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(execresult.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:** you should never use this function to execute commands that
make changes to the system, or perform lengthy computations. Such an
diff --git a/reference/functions/execresult_as_data.markdown b/content/reference/functions/execresult_as_data.markdown
similarity index 67%
rename from reference/functions/execresult_as_data.markdown
rename to content/reference/functions/execresult_as_data.markdown
index 11cb09052..4b27b4ce4 100644
--- a/reference/functions/execresult_as_data.markdown
+++ b/content/reference/functions/execresult_as_data.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: execresult_as_data
-published: true
+aliases:
+ - "/reference-functions-execresult_as_data.html"
---
-[%CFEngine_function_prototype(command, shell, output)%]
+{{< CFEngine_function_prototype(command, shell, output) >}}
**Description:** Execute `command` and return a data container including command output and exit code.
@@ -12,17 +13,17 @@ Functions in the same way as [`execresult()`][execresult], and takes the same pa
Unlike [`execresult()`][execresult], and [`returnszero()`][returnszero], this function allows
you to test, store, or inspect both exit code and output from the same command execution.
-[%CFEngine_function_attributes(command, shell, output)%]
+{{< CFEngine_function_attributes(command, shell, output) >}}
**Example:**
Policy:
-[%CFEngine_include_snippet(execresult_as_data.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(execresult_as_data.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(execresult_as_data.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(execresult_as_data.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:** you should never use this function to execute commands that
make changes to the system, or perform lengthy computations. Consider using
diff --git a/reference/functions/expandrange.markdown b/content/reference/functions/expandrange.markdown
similarity index 83%
rename from reference/functions/expandrange.markdown
rename to content/reference/functions/expandrange.markdown
index 3924eba67..c3faba7fd 100644
--- a/reference/functions/expandrange.markdown
+++ b/content/reference/functions/expandrange.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: expandrange
-published: true
+aliases:
+ - "/reference-functions-expandrange.html"
---
-[%CFEngine_function_prototype(string_template, stepsize)%]
+{{< CFEngine_function_prototype(string_template, stepsize) >}}
**Description:** Generates a list based on an ordered list of numbers selected from a
range of integers, in steps specified by the second argument.
@@ -14,7 +15,7 @@ be represented as regular expressions. The list of strings is composed from the
in the first argument, and a numerical range in square brackets is replaced by successive numbers
from the range.
-[%CFEngine_function_attributes(string_template, stepsize)%]
+{{< CFEngine_function_attributes(string_template, stepsize) >}}
```cf3
vars:
diff --git a/reference/functions/file_hash.markdown b/content/reference/functions/file_hash.markdown
similarity index 57%
rename from reference/functions/file_hash.markdown
rename to content/reference/functions/file_hash.markdown
index 6c2aea30b..7d0cf9598 100644
--- a/reference/functions/file_hash.markdown
+++ b/content/reference/functions/file_hash.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: file_hash
-published: true
+aliases:
+ - "/reference-functions-file_hash.html"
---
-[%CFEngine_function_prototype(file, algorithm)%]
+{{< CFEngine_function_prototype(file, algorithm) >}}
**Description:** Return the hash of `file` using the hash `algorithm`.
@@ -16,21 +17,21 @@ to get the same answer from this function as you would from every other
tool, since it depends on how whitespace and end of file characters are
handled.
-[%CFEngine_function_attributes(file, algorithm)%]
+{{< CFEngine_function_attributes(file, algorithm) >}}
**Example:**
Prepare:
-[%CFEngine_include_snippet(filestat.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(filestat.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(file_hash.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(file_hash.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(file_hash.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(file_hash.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Introduced in CFEngine 3.7.0
diff --git a/reference/functions/fileexists.markdown b/content/reference/functions/fileexists.markdown
similarity index 68%
rename from reference/functions/fileexists.markdown
rename to content/reference/functions/fileexists.markdown
index 02bd2881b..a536e6ca2 100644
--- a/reference/functions/fileexists.markdown
+++ b/content/reference/functions/fileexists.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: fileexists
-published: true
+aliases:
+ - "/reference-functions-fileexists.html"
---
-[%CFEngine_function_prototype(filename)%]
+{{< CFEngine_function_prototype(filename) >}}
**Description:** Returns whether the file `filename` can be accessed.
@@ -19,14 +20,14 @@ this function to return true.
link target exists. Alternatively use `test` with `returnszero()`, for example
`returnszero("/bin/test -f myfile")`.
-[%CFEngine_function_attributes(filename)%]
+{{< CFEngine_function_attributes(filename) >}}
**Example:**
-[%CFEngine_include_snippet(fileexists.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(fileexists.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(fileexists.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(fileexists.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `filestat()`, `isdir()`, `islink()`, `isplain()`, `returnszero()`
diff --git a/reference/functions/filesexist.markdown b/content/reference/functions/filesexist.markdown
similarity index 71%
rename from reference/functions/filesexist.markdown
rename to content/reference/functions/filesexist.markdown
index 7e50f88e6..c8b49cd4b 100644
--- a/reference/functions/filesexist.markdown
+++ b/content/reference/functions/filesexist.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: filesexist
-published: true
+aliases:
+ - "/reference-functions-filesexist.html"
---
-[%CFEngine_function_prototype(list)%]
+{{< CFEngine_function_prototype(list) >}}
**Description:** Returns whether all the files in `list` can be accessed.
@@ -20,11 +21,11 @@ this function to return true.
**Example:**
-[%CFEngine_include_snippet(filesexist.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(filesexist.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(filesexist.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(filesexist.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.12.
diff --git a/content/reference/functions/filesize.markdown b/content/reference/functions/filesize.markdown
new file mode 100644
index 000000000..4ae5c0b11
--- /dev/null
+++ b/content/reference/functions/filesize.markdown
@@ -0,0 +1,27 @@
+---
+layout: default
+title: filesize
+aliases:
+ - "/reference-functions-filesize.html"
+---
+
+{{< CFEngine_function_prototype(filename) >}}
+
+**Description:** Returns the size of the file `filename` in bytes.
+
+If the file object does not exist, the function call fails and the
+variable does not expand.
+
+{{< CFEngine_function_attributes(filename) >}}
+
+**Example:**
+
+Run:
+
+{{< CFEngine_include_snippet(filesize.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(filesize.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**History:** Was introduced in version 3.1.3, Nova 2.0.2 (2010).
diff --git a/reference/functions/filestat.markdown b/content/reference/functions/filestat.markdown
similarity index 88%
rename from reference/functions/filestat.markdown
rename to content/reference/functions/filestat.markdown
index 984bf33ce..51581ce90 100644
--- a/reference/functions/filestat.markdown
+++ b/content/reference/functions/filestat.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: filestat
-published: true
+aliases:
+ - "/reference-functions-filestat.html"
---
-[%CFEngine_function_prototype(filename, field)%]
+{{< CFEngine_function_prototype(filename, field) >}}
**Description:** Returns the requested file field `field` for the file object
`filename`.
@@ -46,15 +47,15 @@ On SELinux, the contexts are the same as what you see with `ls -Z`.
Prepare:
-[%CFEngine_include_snippet(filestat.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(filestat.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(filestat.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(filestat.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(filestat.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(filestat.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
diff --git a/reference/functions/filter.markdown b/content/reference/functions/filter.markdown
similarity index 78%
rename from reference/functions/filter.markdown
rename to content/reference/functions/filter.markdown
index b9ce3719b..d11ef3473 100644
--- a/reference/functions/filter.markdown
+++ b/content/reference/functions/filter.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: filter
-published: true
+aliases:
+ - "/reference-functions-filter.html"
---
-[%CFEngine_function_prototype(filter, list, is_regex, invert, max_return)%]
+{{< CFEngine_function_prototype(filter, list, is_regex, invert, max_return) >}}
**Description:** Transforms a list or data container into a list subset thereof.
@@ -32,11 +33,11 @@ Invert filter.
**Example:**
-[%CFEngine_include_snippet(filter.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(filter.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(filter.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(filter.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/findfiles.markdown b/content/reference/functions/findfiles.markdown
similarity index 81%
rename from reference/functions/findfiles.markdown
rename to content/reference/functions/findfiles.markdown
index 6bb77baae..06b26ff62 100644
--- a/reference/functions/findfiles.markdown
+++ b/content/reference/functions/findfiles.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: findfiles
-published: true
+aliases:
+ - "/reference-functions-findfiles.html"
---
-[%CFEngine_function_prototype(glob1, glob2, ...)%]
+{{< CFEngine_function_prototype(glob1, glob2, ...) >}}
**Description:** Return the list of files that match any of the given glob patterns.
@@ -32,10 +33,10 @@ allows you to do dynamic inputs and a dynamic bundle call chain.
**Example:**
-[%CFEngine_include_snippet(findfiles.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(findfiles.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(findfiles.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(findfiles.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [`bundlesmatching()`][bundlesmatching], [`findfiles_up()`][findfiles_up].
diff --git a/reference/functions/findfiles_up.markdown b/content/reference/functions/findfiles_up.markdown
similarity index 81%
rename from reference/functions/findfiles_up.markdown
rename to content/reference/functions/findfiles_up.markdown
index c2569eb60..138d890c0 100644
--- a/reference/functions/findfiles_up.markdown
+++ b/content/reference/functions/findfiles_up.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: findfiles_up
-published: true
+aliases:
+ - "/reference-functions-findfiles_up.html"
---
-[%CFEngine_function_prototype(path, glob, level)%]
+{{< CFEngine_function_prototype(path, glob, level) >}}
**Description:** Return a data array of files that match a given glob pattern
by searching up the directory tree.
@@ -35,15 +36,15 @@ deep.
**History:**
- Brace expression (i.e., `{foo,bar}`) and negative bracket expressions (i.e., `[!abc]`) were introduced in 3.24.
-[%CFEngine_function_attributes(path, glob, level)%]
+{{< CFEngine_function_attributes(path, glob, level) >}}
**Example:**
-[%CFEngine_include_snippet(findfiles_up.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(findfiles_up.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(findfiles_up.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(findfiles_up.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Introduced in 3.18.
diff --git a/reference/functions/findprocesses.markdown b/content/reference/functions/findprocesses.markdown
similarity index 89%
rename from reference/functions/findprocesses.markdown
rename to content/reference/functions/findprocesses.markdown
index 634e26b78..6e0c9ee0a 100644
--- a/reference/functions/findprocesses.markdown
+++ b/content/reference/functions/findprocesses.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: findprocesses
-published: true
+aliases:
+ - "/reference-functions-findprocesses.html"
---
-[%CFEngine_function_prototype(regex)%]
+{{< CFEngine_function_prototype(regex) >}}
**Description:** Return the list of processes that match the given regular
expression `regex`.
@@ -14,7 +15,7 @@ table. Use `.*sherlock.*` to find all the processes that match
`sherlock`. Use `.*\bsherlock\b.*` to exclude partial matches like
`sherlock123` (`\b` matches a word boundary).
-[%CFEngine_function_attributes(regex)%]
+{{< CFEngine_function_attributes(regex) >}}
The returned data container is a list of key-value maps. Each one is
guaranteed to have the key `pid` with the process ID. The key `line`
diff --git a/reference/functions/format.markdown b/content/reference/functions/format.markdown
similarity index 80%
rename from reference/functions/format.markdown
rename to content/reference/functions/format.markdown
index 63f032550..cfa5aa6ad 100644
--- a/reference/functions/format.markdown
+++ b/content/reference/functions/format.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: format
-published: true
+aliases:
+ - "/reference-functions-format.html"
---
-[%CFEngine_function_prototype(string, ...)%]
+{{< CFEngine_function_prototype(string, ...) >}}
**Description:** Applies sprintf-style formatting to a given `string`.
@@ -22,11 +23,11 @@ format *specifier* contains the *modifiers* `hLqjzt`; or if any format
**Example:**
-[%CFEngine_include_snippet(format.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(format.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(format.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(format.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Note:** the underlying `sprintf` system call may behave differently on some platforms for some formats. Test carefully. For example, the format `%08s` will use spaces to fill the string up to 8 characters on libc platforms, but on Darwin (Mac OS X) it will use zeroes. According to [SUSv4](http://pubs.opengroup.org/onlinepubs/9699919799/functions/sprintf.html) the behavior is undefined for this specific case.
diff --git a/reference/functions/getclassmetatags.markdown b/content/reference/functions/getclassmetatags.markdown
similarity index 59%
rename from reference/functions/getclassmetatags.markdown
rename to content/reference/functions/getclassmetatags.markdown
index 24874b3d2..405dc79a0 100644
--- a/reference/functions/getclassmetatags.markdown
+++ b/content/reference/functions/getclassmetatags.markdown
@@ -1,14 +1,15 @@
---
layout: default
title: getclassmetatags
-published: true
+aliases:
+ - "/reference-functions-getclassmetatags.html"
---
-[%CFEngine_function_prototype(classname, optional_tag)%]
+{{< CFEngine_function_prototype(classname, optional_tag) >}}
**Description:** Returns the list of [`meta`][Promise types#meta] tags for class `classname`.
-[%CFEngine_function_attributes(classname, optional_tag)%]
+{{< CFEngine_function_attributes(classname, optional_tag) >}}
The `optional_tag` can be used to look up a specific tag's value. If you format
your tags like `meta => { "mykey=myvalue1", "mykey=myvalue2"}` then the
@@ -17,11 +18,11 @@ your tags like `meta => { "mykey=myvalue1", "mykey=myvalue2"}` then the
**Example:**
-[%CFEngine_include_snippet(getclassmetatags.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(getclassmetatags.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(getclassmetatags.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(getclassmetatags.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
diff --git a/reference/functions/getenv.markdown b/content/reference/functions/getenv.markdown
similarity index 60%
rename from reference/functions/getenv.markdown
rename to content/reference/functions/getenv.markdown
index 2f191e228..f55891aa7 100644
--- a/reference/functions/getenv.markdown
+++ b/content/reference/functions/getenv.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: getenv
-published: true
+aliases:
+ - "/reference-functions-getenv.html"
---
-[%CFEngine_function_prototype(variable, maxlength)%]
+{{< CFEngine_function_prototype(variable, maxlength) >}}
**Description:** Return the environment variable `variable`, truncated at
`maxlength` characters
@@ -14,15 +15,15 @@ Returns an empty string if the environment variable is not defined.
lead to security issues. Choose a reasonable value based on the environment
variable you are querying.
-[%CFEngine_function_attributes(variable, maxlength)%]
+{{< CFEngine_function_attributes(variable, maxlength) >}}
**Example:**
-[%CFEngine_include_snippet(getenv.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(getenv.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(getenv.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(getenv.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
diff --git a/reference/functions/getfields.markdown b/content/reference/functions/getfields.markdown
similarity index 82%
rename from reference/functions/getfields.markdown
rename to content/reference/functions/getfields.markdown
index b280219f6..083b872d9 100644
--- a/reference/functions/getfields.markdown
+++ b/content/reference/functions/getfields.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: getfields
-published: true
+aliases:
+ - "/reference-functions-getfields.html"
---
-[%CFEngine_function_prototype(regex, filename, split, array_lval)%]
+{{< CFEngine_function_prototype(regex, filename, split, array_lval) >}}
**Description:** Fill `array_lval` with fields in the lines from file `filename` that match `regex`, split on `split`.
@@ -35,11 +36,11 @@ The base name of the array that returns the values.
**Example:**
-[%CFEngine_include_snippet(getfields.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(getfields.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(getfields.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(getfields.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
This function matches lines (using a regular expression) in the named
diff --git a/reference/functions/getgid.markdown b/content/reference/functions/getgid.markdown
similarity index 52%
rename from reference/functions/getgid.markdown
rename to content/reference/functions/getgid.markdown
index dc67a88e6..40d163413 100644
--- a/reference/functions/getgid.markdown
+++ b/content/reference/functions/getgid.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: getgid
-published: true
+aliases:
+ - "/reference-functions-getgid.html"
---
-[%CFEngine_function_prototype(groupname)%]
+{{< CFEngine_function_prototype(groupname) >}}
**Description:** Return the integer group id of the group `groupname` on this
host.
@@ -12,15 +13,15 @@ host.
If the named group does not exist, the function will fail and the variable
will not be defined.
-[%CFEngine_function_attributes(groupname)%]
+{{< CFEngine_function_attributes(groupname) >}}
**Example:**
-[%CFEngine_include_snippet(getgid.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(getgid.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(getgid.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(getgid.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
On Windows, which does not support group ids, the variable will not be
diff --git a/reference/functions/getindices.markdown b/content/reference/functions/getindices.markdown
similarity index 79%
rename from reference/functions/getindices.markdown
rename to content/reference/functions/getindices.markdown
index c42166c93..540801339 100644
--- a/reference/functions/getindices.markdown
+++ b/content/reference/functions/getindices.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: getindices
-published: true
+aliases:
+ - "/reference-functions-getindices.html"
---
-[%CFEngine_function_prototype(varref)%]
+{{< CFEngine_function_prototype(varref) >}}
**Description:** Returns the list of keys in `varref` which can be
the name of an array or container.
@@ -28,15 +29,15 @@ variable.
values. For each such `i` you can then ask for `getindices("varref[i]")` to
get a list of the `j` values (and so on, for higher levels of indexing).
-[%CFEngine_function_attributes(varref)%]
+{{< CFEngine_function_attributes(varref) >}}
**Example:**
-[%CFEngine_include_snippet(getindices.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(getindices.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(getindices.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(getindices.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:**
diff --git a/content/reference/functions/getuid.markdown b/content/reference/functions/getuid.markdown
new file mode 100644
index 000000000..8fd83204c
--- /dev/null
+++ b/content/reference/functions/getuid.markdown
@@ -0,0 +1,25 @@
+---
+layout: default
+title: getuid
+aliases:
+ - "/reference-functions-getuid.html"
+---
+
+{{< CFEngine_function_prototype(username) >}}
+
+**Description:** Return the integer user id of the named user on this host
+
+If the named user is not registered the variable will not be defined.
+
+{{< CFEngine_function_attributes(username) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(getuid.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(getuid.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+**Notes:**
+On Windows, which does not support user ids, the variable will not
+be defined.
diff --git a/reference/functions/getuserinfo.markdown b/content/reference/functions/getuserinfo.markdown
similarity index 85%
rename from reference/functions/getuserinfo.markdown
rename to content/reference/functions/getuserinfo.markdown
index c362868cc..9f710e04f 100644
--- a/reference/functions/getuserinfo.markdown
+++ b/content/reference/functions/getuserinfo.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: getuserinfo
-published: true
+aliases:
+ - "/reference-functions-getuserinfo.html"
---
-[%CFEngine_function_prototype(optional_uidorname)%]
+{{< CFEngine_function_prototype(optional_uidorname) >}}
**Description:** Return information about the current user or any other, looked up by user ID (UID) or user name.
@@ -17,11 +18,11 @@ LDAP, for instance).
On platforms that don't support these POSIX functions, the function simply fails.
-[%CFEngine_function_attributes(optional_uidorname)%]
+{{< CFEngine_function_attributes(optional_uidorname) >}}
**Example:**
-[%CFEngine_include_snippet(getuserinfo.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(getuserinfo.cf, #\+begin_src cfengine3, .*end_src) >}}
**Typical Results:**
diff --git a/reference/functions/getusers.markdown b/content/reference/functions/getusers.markdown
similarity index 63%
rename from reference/functions/getusers.markdown
rename to content/reference/functions/getusers.markdown
index efe4a631c..40b3e3055 100644
--- a/reference/functions/getusers.markdown
+++ b/content/reference/functions/getusers.markdown
@@ -1,22 +1,23 @@
---
layout: default
title: getusers
-published: true
+aliases:
+ - "/reference-functions-getusers.html"
---
-[%CFEngine_function_prototype(exclude_names, exclude_ids)%]
+{{< CFEngine_function_prototype(exclude_names, exclude_ids) >}}
**Description:** Returns a list of all users defined, except those names in the comma separated string of `exclude_names` and the comma separated string of uids in `exclude_ids`
-[%CFEngine_function_attributes(exclude_names, exclude_ids)%]
+{{< CFEngine_function_attributes(exclude_names, exclude_ids) >}}
**Example:**
-[%CFEngine_include_snippet(getusers.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(getusers.cf, #\+begin_src cfengine3, .*end_src) >}}
**Output:**
-[%CFEngine_include_snippet(getusers.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(getusers.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
diff --git a/reference/functions/getvalues.markdown b/content/reference/functions/getvalues.markdown
similarity index 77%
rename from reference/functions/getvalues.markdown
rename to content/reference/functions/getvalues.markdown
index c915fa1cc..74ab48dbf 100644
--- a/reference/functions/getvalues.markdown
+++ b/content/reference/functions/getvalues.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: getvalues
-published: true
+aliases:
+ - "/reference-functions-getvalues.html"
---
-[%CFEngine_function_prototype(varref)%]
+{{< CFEngine_function_prototype(varref) >}}
**Description:** Returns the list of values in `varref` which can be
the name of an array or container.
@@ -25,15 +26,15 @@ look at the values of `d[k]`, not at the top level of `d`.
Make sure you specify the correct scope when supplying the name of the
variable.
-[%CFEngine_function_attributes(varref)%]
+{{< CFEngine_function_attributes(varref) >}}
**Example:**
-[%CFEngine_include_snippet(getvalues.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(getvalues.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(getvalues.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(getvalues.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/getvariablemetatags.markdown b/content/reference/functions/getvariablemetatags.markdown
similarity index 62%
rename from reference/functions/getvariablemetatags.markdown
rename to content/reference/functions/getvariablemetatags.markdown
index eea8a8bf4..0ab97bd41 100644
--- a/reference/functions/getvariablemetatags.markdown
+++ b/content/reference/functions/getvariablemetatags.markdown
@@ -1,17 +1,18 @@
---
layout: default
title: getvariablemetatags
-published: true
+aliases:
+ - "/reference-functions-getvariablemetatags.html"
---
-[%CFEngine_function_prototype(varname, optional_tag)%]
+{{< CFEngine_function_prototype(varname, optional_tag) >}}
**Description:** Returns the list of [`meta`][Promise types#meta] tags for variable `varname`.
Make sure you specify the correct scope when supplying the name of the
variable.
-[%CFEngine_function_attributes(varname, optional_tag)%]
+{{< CFEngine_function_attributes(varname, optional_tag) >}}
The `optional_tag` can be used to look up a specific tag's value. If you format
your tags like `meta => { "mykey=myvalue1", "mykey=myvalue2"}` then the
@@ -20,11 +21,11 @@ your tags like `meta => { "mykey=myvalue1", "mykey=myvalue2"}` then the
**Example:**
-[%CFEngine_include_snippet(getvariablemetatags.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(getvariablemetatags.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(getvariablemetatags.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(getvariablemetatags.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
diff --git a/reference/functions/grep.markdown b/content/reference/functions/grep.markdown
similarity index 61%
rename from reference/functions/grep.markdown
rename to content/reference/functions/grep.markdown
index 997cb2f31..aaf92997a 100644
--- a/reference/functions/grep.markdown
+++ b/content/reference/functions/grep.markdown
@@ -1,25 +1,26 @@
---
layout: default
title: grep
-published: true
+aliases:
+ - "/reference-functions-grep.html"
---
-[%CFEngine_function_prototype(regex, list)%]
+{{< CFEngine_function_prototype(regex, list) >}}
**Description:** Returns the sub-list if items in `list` matching the
[anchored][anchored] regular expression `regex`.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(regex, list)%]
+{{< CFEngine_function_attributes(regex, list) >}}
**Example:**
-[%CFEngine_include_snippet(grep.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(grep.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(grep.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(grep.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/content/reference/functions/groupexists.markdown b/content/reference/functions/groupexists.markdown
new file mode 100644
index 000000000..36ba1fdbb
--- /dev/null
+++ b/content/reference/functions/groupexists.markdown
@@ -0,0 +1,22 @@
+---
+layout: default
+title: groupexists
+aliases:
+ - "/reference-functions-groupexists.html"
+---
+
+{{< CFEngine_function_prototype(group) >}}
+
+**Description:** Returns whether a group `group` exists on this host.
+
+The group may be specified by name or identifier.
+
+{{< CFEngine_function_attributes(group) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(groupexists.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(groupexists.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
diff --git a/reference/functions/hash.markdown b/content/reference/functions/hash.markdown
similarity index 55%
rename from reference/functions/hash.markdown
rename to content/reference/functions/hash.markdown
index 03726d336..19866b60e 100644
--- a/reference/functions/hash.markdown
+++ b/content/reference/functions/hash.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: hash
-published: true
+aliases:
+ - "/reference-functions-hash.html"
---
-[%CFEngine_function_prototype(input, algorithm)%]
+{{< CFEngine_function_prototype(input, algorithm) >}}
**Description:** Return the hash of `input` using the hash `algorithm`.
@@ -13,14 +14,14 @@ to get the same answer from this function as you would from every other
tool, since it depends on how whitespace and end of file characters are
handled.
-[%CFEngine_function_attributes(input, algorithm)%]
+{{< CFEngine_function_attributes(input, algorithm) >}}
**Example:**
-[%CFEngine_include_snippet(hash.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(hash.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(hash.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(hash.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `file_hash()`
diff --git a/reference/functions/hash_to_int.markdown b/content/reference/functions/hash_to_int.markdown
similarity index 69%
rename from reference/functions/hash_to_int.markdown
rename to content/reference/functions/hash_to_int.markdown
index 38df46de8..565483393 100644
--- a/reference/functions/hash_to_int.markdown
+++ b/content/reference/functions/hash_to_int.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: hash_to_int
-published: true
+aliases:
+ - "/reference-functions-hash_to_int.html"
---
-[%CFEngine_function_prototype( lower, upper, string )%]
+{{< CFEngine_function_prototype( lower, upper, string ) >}}
**Description:** Generates an integer between `lower` and `upper` range based on hash of `string`.
@@ -20,11 +21,11 @@ directly.
**Example:**
-[%CFEngine_include_snippet(hash_to_int.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(hash_to_int.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(hash_to_int.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(hash_to_int.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:**
diff --git a/reference/functions/hashmatch.markdown b/content/reference/functions/hashmatch.markdown
similarity index 75%
rename from reference/functions/hashmatch.markdown
rename to content/reference/functions/hashmatch.markdown
index 0c0a47ed7..ef0a4df27 100644
--- a/reference/functions/hashmatch.markdown
+++ b/content/reference/functions/hashmatch.markdown
@@ -1,17 +1,18 @@
---
layout: default
title: hashmatch
-published: true
+aliases:
+ - "/reference-functions-hashmatch.html"
---
-[%CFEngine_function_prototype(filename, algorithm, hash)%]
+{{< CFEngine_function_prototype(filename, algorithm, hash) >}}
**Description:** Compute the hash of file `filename` using the hash `algorithm` and test if it matches `hash`.
This function may be used to determine whether a system has a particular
version of a binary file (e.g. software patch).
-[%CFEngine_function_attributes(filename, algorithm, hash)%]
+{{< CFEngine_function_attributes(filename, algorithm, hash) >}}
`hash` is an ASCII representation of the hash for comparison.
diff --git a/reference/functions/host2ip.markdown b/content/reference/functions/host2ip.markdown
similarity index 86%
rename from reference/functions/host2ip.markdown
rename to content/reference/functions/host2ip.markdown
index a4a6a2c1b..2ef4bb579 100644
--- a/reference/functions/host2ip.markdown
+++ b/content/reference/functions/host2ip.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: host2ip
-published: true
+aliases:
+ - "/reference-functions-host2ip.html"
---
-[%CFEngine_function_prototype(hostname)%]
+{{< CFEngine_function_prototype(hostname) >}}
**Description:** Returns the primary name-service IP address for the named host `hostname`.
If resolution fails, the input `hostname` is returned (for compatibility reasons).
@@ -16,7 +17,7 @@ lookup procedure for a name, so it mimics internal processes and can
therefore be used not only to cache multiple lookups in the configuration, but
to debug the behavior of the resolver.
-[%CFEngine_function_attributes(hostname)%]
+{{< CFEngine_function_attributes(hostname) >}}
**Example:**
diff --git a/reference/functions/hostinnetgroup.markdown b/content/reference/functions/hostinnetgroup.markdown
similarity index 58%
rename from reference/functions/hostinnetgroup.markdown
rename to content/reference/functions/hostinnetgroup.markdown
index 7dbc11430..fa9de8de2 100644
--- a/reference/functions/hostinnetgroup.markdown
+++ b/content/reference/functions/hostinnetgroup.markdown
@@ -1,14 +1,15 @@
---
layout: default
title: hostinnetgroup
-published: true
+aliases:
+ - "/reference-functions-hostinnetgroup.html"
---
-[%CFEngine_function_prototype(netgroup)%]
+{{< CFEngine_function_prototype(netgroup) >}}
**Description:** True if the current host is in the named `netgroup`.
-[%CFEngine_function_attributes(netgroup)%]
+{{< CFEngine_function_attributes(netgroup) >}}
**Example:**
diff --git a/reference/functions/hostrange.markdown b/content/reference/functions/hostrange.markdown
similarity index 70%
rename from reference/functions/hostrange.markdown
rename to content/reference/functions/hostrange.markdown
index 0a3ddc36f..637f8aa3c 100644
--- a/reference/functions/hostrange.markdown
+++ b/content/reference/functions/hostrange.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: hostrange
-published: true
+aliases:
+ - "/reference-functions-hostrange.html"
---
-[%CFEngine_function_prototype(prefix, range)%]
+{{< CFEngine_function_prototype(prefix, range) >}}
**Description:** Returns whether the unqualified name of the current host lies
in the `range` of enumerated hostnames specified with `prefix`.
@@ -19,12 +20,12 @@ numeric part of the unqualified host name and string comparison of `prefix`
(lowercase) with the part of the unqualified host name until the last numeric
part.
-[%CFEngine_function_attributes(prefix, range)%]
+{{< CFEngine_function_attributes(prefix, range) >}}
**Example:**
-[%CFEngine_include_example(hostrange.cf, #\+begin_src\s+cfengine3\s*, .*end_src)%]
+{{< CFEngine_include_example(hostrange.cf, #\+begin_src\s+cfengine3\s*, .*end_src) >}}
**Example Output:**
-[%CFEngine_include_example(hostrange.cf, #\+begin_src\s+static_example_output\s*, .*end_src)%]
+{{< CFEngine_include_example(hostrange.cf, #\+begin_src\s+static_example_output\s*, .*end_src) >}}
diff --git a/reference/functions/hostsseen.markdown b/content/reference/functions/hostsseen.markdown
similarity index 81%
rename from reference/functions/hostsseen.markdown
rename to content/reference/functions/hostsseen.markdown
index ce7975b30..10db8be2f 100644
--- a/reference/functions/hostsseen.markdown
+++ b/content/reference/functions/hostsseen.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: hostsseen
-published: true
+aliases:
+ - "/reference-functions-hostsseen.html"
---
-[%CFEngine_function_prototype(horizon, seen, field)%]
+{{< CFEngine_function_prototype(horizon, seen, field) >}}
**Description:** Returns a list with the information `field` of hosts that were
seen or not seen within the last `horizon` hours up to `lastseenexpireafter`.
@@ -14,7 +15,7 @@ within the number of hours specified in `horizon`. The argument `seen` may be
lastseen or notseen, the latter selecting all hosts not observed to have
connected within the specified time.
-[%CFEngine_function_attributes(horizon, seen, field)%]
+{{< CFEngine_function_attributes(horizon, seen, field) >}}
**Example:**
diff --git a/reference/functions/hostswithclass.markdown b/content/reference/functions/hostswithclass.markdown
similarity index 86%
rename from reference/functions/hostswithclass.markdown
rename to content/reference/functions/hostswithclass.markdown
index fe2d1173c..8aaeab1fc 100644
--- a/reference/functions/hostswithclass.markdown
+++ b/content/reference/functions/hostswithclass.markdown
@@ -1,12 +1,13 @@
---
layout: default
title: hostswithclass
-published: true
+aliases:
+ - "/reference-functions-hostswithclass.html"
---
**This function is only available in CFEngine Enterprise.**
-[%CFEngine_function_prototype(class, field)%]
+{{< CFEngine_function_prototype(class, field) >}}
**Description:** Returns a list from the CFEngine Database with the information
`field` of hosts on which `classs` is set.
@@ -18,7 +19,7 @@ hostnames or ip-addresses of hosts that have a given class.
configuration files for (classes of) hosts. Hosts are selected based on the
classes set during the most recently collected agent run.
-[%CFEngine_function_attributes(class, field)%]
+{{< CFEngine_function_attributes(class, field) >}}
**Example:**
diff --git a/reference/functions/hubknowledge.markdown b/content/reference/functions/hubknowledge.markdown
similarity index 91%
rename from reference/functions/hubknowledge.markdown
rename to content/reference/functions/hubknowledge.markdown
index c0ed841f4..9724e1992 100644
--- a/reference/functions/hubknowledge.markdown
+++ b/content/reference/functions/hubknowledge.markdown
@@ -1,12 +1,13 @@
---
layout: default
title: hubknowledge
-published: true
+aliases:
+ - "/reference-functions-hubknowledge.html"
---
**This function is only available in CFEngine Enterprise.**
-[%CFEngine_function_prototype(id)%]
+{{< CFEngine_function_prototype(id) >}}
**Description:** Read global knowledge from the CFEngine Database host by
`id`.
@@ -29,7 +30,7 @@ channel are generated automatically by discovery, unlike `remotescalar` which
accesses user defined data.
-[%CFEngine_function_attributes(id)%]
+{{< CFEngine_function_attributes(id) >}}
**Example:**
diff --git a/reference/functions/ifelse.markdown b/content/reference/functions/ifelse.markdown
similarity index 97%
rename from reference/functions/ifelse.markdown
rename to content/reference/functions/ifelse.markdown
index 59885cced..612d4c063 100644
--- a/reference/functions/ifelse.markdown
+++ b/content/reference/functions/ifelse.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: ifelse
-published: true
+aliases:
+ - "/reference-functions-ifelse.html"
---
-[%CFEngine_function_prototype(...)%]
+{{< CFEngine_function_prototype(...) >}}
**Description:** Evaluate each pair of arguments up to the last one as a (`class`, `value`) tuple, returning `value` if `class` is set.
diff --git a/reference/functions/int.markdown b/content/reference/functions/int.markdown
similarity index 59%
rename from reference/functions/int.markdown
rename to content/reference/functions/int.markdown
index ed6425439..a03dd1779 100644
--- a/reference/functions/int.markdown
+++ b/content/reference/functions/int.markdown
@@ -1,20 +1,21 @@
---
layout: default
title: int
-published: true
+aliases:
+ - "/reference-functions-int.html"
---
-[%CFEngine_function_prototype(string)%]
+{{< CFEngine_function_prototype(string) >}}
**Description:** Convert numeric string to int.
-[%CFEngine_function_attributes(string)%]
+{{< CFEngine_function_attributes(string) >}}
If `string` represents a floating point number then the decimals are *truncated*.
**Example:**
-[%CFEngine_include_example(int.cf)%]
+{{< CFEngine_include_example(int.cf) >}}
**See also:** [`string()`][string]
diff --git a/content/reference/functions/intersection.markdown b/content/reference/functions/intersection.markdown
new file mode 100644
index 000000000..38d9c5b00
--- /dev/null
+++ b/content/reference/functions/intersection.markdown
@@ -0,0 +1,24 @@
+---
+layout: default
+title: intersection
+aliases:
+ - "/reference-functions-intersection.html"
+---
+
+{{< CFEngine_function_prototype(list1, list2) >}}
+
+**Description:** Returns the unique elements in list1 that are also in list2.
+
+[This function can accept many types of data parameters.][Functions#collecting functions]
+
+{{< CFEngine_function_attributes(list1, list2) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(intersection.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(intersection.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**See also:** [About collecting functions][Functions#collecting functions], `difference()`.
diff --git a/reference/functions/ip2host.markdown b/content/reference/functions/ip2host.markdown
similarity index 66%
rename from reference/functions/ip2host.markdown
rename to content/reference/functions/ip2host.markdown
index a0c28246d..91d42a4e6 100644
--- a/reference/functions/ip2host.markdown
+++ b/content/reference/functions/ip2host.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: ip2host
-published: true
+aliases:
+ - "/reference-functions-ip2host.html"
---
-[%CFEngine_function_prototype(ip)%]
+{{< CFEngine_function_prototype(ip) >}}
**Description:** Returns the primary name-service host name for the IP address
`ip`.
@@ -16,15 +17,15 @@ if supported by the resolver library.
Note that DNS lookups may take time and thus cause CFEngine agents to
wait for responses, slowing their progress significantly.
-[%CFEngine_function_attributes(ip)%]
+{{< CFEngine_function_attributes(ip) >}}
**Example:**
-[%CFEngine_include_snippet(ip2host.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(ip2host.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(ip2host.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(ip2host.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `host2ip()`, `iprange()`, `isipinsubnet()`
diff --git a/reference/functions/iprange.markdown b/content/reference/functions/iprange.markdown
similarity index 80%
rename from reference/functions/iprange.markdown
rename to content/reference/functions/iprange.markdown
index 47b895fe9..53ecfac90 100644
--- a/reference/functions/iprange.markdown
+++ b/content/reference/functions/iprange.markdown
@@ -1,17 +1,18 @@
---
layout: default
title: iprange
-published: true
+aliases:
+ - "/reference-functions-iprange.html"
---
-[%CFEngine_function_prototype(range, optional_interface)%]
+{{< CFEngine_function_prototype(range, optional_interface) >}}
**Description:** Returns whether the current host lies in the range of
IP addresses specified, optionally checking only `interface`.
Pattern matching based on IP addresses.
-[%CFEngine_function_attributes(range, optional_interface)%]
+{{< CFEngine_function_attributes(range, optional_interface) >}}
**Example:**
diff --git a/reference/functions/irange.markdown b/content/reference/functions/irange.markdown
similarity index 91%
rename from reference/functions/irange.markdown
rename to content/reference/functions/irange.markdown
index 83da72d83..03e2753d6 100644
--- a/reference/functions/irange.markdown
+++ b/content/reference/functions/irange.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: irange
-published: true
+aliases:
+ - "/reference-functions-irange.html"
---
-[%CFEngine_function_prototype(arg1, arg2)%]
+{{< CFEngine_function_prototype(arg1, arg2) >}}
**Description:** Define a range of integer values for CFEngine internal use.
@@ -13,7 +14,7 @@ generally interchangeably say `"1,10"` or `irange("1","10")`. However, if
you want to create a range of dates or times, you must use `irange()` if you
also use the functions `ago()`, `now()`, `accumulated()`, etc.
-[%CFEngine_function_attributes(arg1, arg2)%]
+{{< CFEngine_function_attributes(arg1, arg2) >}}
**Example:**
diff --git a/reference/functions/isdir.markdown b/content/reference/functions/isdir.markdown
similarity index 50%
rename from reference/functions/isdir.markdown
rename to content/reference/functions/isdir.markdown
index 788927809..1ec2c04ae 100644
--- a/reference/functions/isdir.markdown
+++ b/content/reference/functions/isdir.markdown
@@ -1,23 +1,24 @@
---
layout: default
title: isdir
-published: true
+aliases:
+ - "/reference-functions-isdir.html"
---
-[%CFEngine_function_prototype(filename)%]
+{{< CFEngine_function_prototype(filename) >}}
**Description:** Returns whether the named object `filename` is a directory.
The CFEngine process must have access to `filename` in order for this to work.
-[%CFEngine_function_attributes(filename)%]
+{{< CFEngine_function_attributes(filename) >}}
**Example:**
-[%CFEngine_include_snippet(isdir.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(isdir.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(isdir.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(isdir.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `fileexists()`, `filestat()`, `islink()`, `isplain()`, `returnszero()`
diff --git a/content/reference/functions/isexecutable.markdown b/content/reference/functions/isexecutable.markdown
new file mode 100644
index 000000000..a8fbea3ee
--- /dev/null
+++ b/content/reference/functions/isexecutable.markdown
@@ -0,0 +1,22 @@
+---
+layout: default
+title: isexecutable
+aliases:
+ - "/reference-functions-isexecutable.html"
+---
+
+{{< CFEngine_function_prototype(filename) >}}
+
+**Description:** Returns whether the named object `filename` has execution rights for the current user.
+
+{{< CFEngine_function_attributes(filename) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(isexecutable.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(isexecutable.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**History:** Was introduced in version 3.1.0b1,Nova 2.0.0b1 (2010)
diff --git a/content/reference/functions/isgreaterthan.markdown b/content/reference/functions/isgreaterthan.markdown
new file mode 100644
index 000000000..deea5f67c
--- /dev/null
+++ b/content/reference/functions/isgreaterthan.markdown
@@ -0,0 +1,23 @@
+---
+layout: default
+title: isgreaterthan
+aliases:
+ - "/reference-functions-isgreaterthan.html"
+---
+
+{{< CFEngine_function_prototype(value1, value2) >}}
+
+**Description:** Returns whether `value1` is greater than `value2`.
+
+The comparison is made numerically if possible. If the values are
+strings, the comparison is lexical (based on C's strcmp()).
+
+{{< CFEngine_function_attributes(value1, value2) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(isgreaterthan.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(isgreaterthan.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
diff --git a/content/reference/functions/isipinsubnet.markdown b/content/reference/functions/isipinsubnet.markdown
new file mode 100644
index 000000000..038d64f9e
--- /dev/null
+++ b/content/reference/functions/isipinsubnet.markdown
@@ -0,0 +1,26 @@
+---
+layout: default
+title: isipinsubnet
+aliases:
+ - "/reference-functions-isipinsubnet.html"
+---
+
+{{< CFEngine_function_prototype(range, ip_address1, ip_address2, ...) >}}
+
+**Description:** Returns whether the given `range` contains any of the following IP addresses.
+
+{{< CFEngine_function_attributes(range, ip_address1, ip_address2, ...) >}}
+
+**Example:**
+
+Run:
+
+{{< CFEngine_include_snippet(isipinsubnet.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(isipinsubnet.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**See also:** `iprange()`, `host2ip()`, `ip2host()`
+
+**History:** Was introduced in CFEngine 3.10.
diff --git a/content/reference/functions/islessthan.markdown b/content/reference/functions/islessthan.markdown
new file mode 100644
index 000000000..cb3921bbe
--- /dev/null
+++ b/content/reference/functions/islessthan.markdown
@@ -0,0 +1,25 @@
+---
+layout: default
+title: islessthan
+aliases:
+ - "/reference-functions-islessthan.html"
+---
+
+{{< CFEngine_function_prototype(value1, value2) >}}
+
+**Description:** Returns whether `value1` is less than `value2`.
+
+The comparison is made numerically if possible. If the values are
+strings, the comparison is lexical (based on C's strcmp()).
+
+{{< CFEngine_function_attributes(value1, value2) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(islessthan.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(islessthan.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**See also:** [`isgreaterthan()`][isgreaterthan].
diff --git a/reference/functions/islink.markdown b/content/reference/functions/islink.markdown
similarity index 65%
rename from reference/functions/islink.markdown
rename to content/reference/functions/islink.markdown
index 7bdbdf8a7..8d7f64353 100644
--- a/reference/functions/islink.markdown
+++ b/content/reference/functions/islink.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: islink
-published: true
+aliases:
+ - "/reference-functions-islink.html"
---
-[%CFEngine_function_prototype(filename)%]
+{{< CFEngine_function_prototype(filename) >}}
**Description:** Returns whether the named object `filename` is a symbolic
link.
@@ -20,20 +21,20 @@ be detected using this function.
expected target, and check if the link target exists. Alternatively use `test`
with `returnszero()`, for example `returnszero("/bin/test -f myfile")`.
-[%CFEngine_function_attributes(filename)%]
+{{< CFEngine_function_attributes(filename) >}}
**Example:**
Prepare:
-[%CFEngine_include_snippet(islink.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(islink.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(islink.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(islink.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(islink.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(islink.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `fileexists()`, `filestat()`, `isdir()`, `isplain()`, `returnszero()`
diff --git a/content/reference/functions/isnewerthan.markdown b/content/reference/functions/isnewerthan.markdown
new file mode 100644
index 000000000..ad6470487
--- /dev/null
+++ b/content/reference/functions/isnewerthan.markdown
@@ -0,0 +1,32 @@
+---
+layout: default
+title: isnewerthan
+aliases:
+ - "/reference-functions-isnewerthan.html"
+---
+
+{{< CFEngine_function_prototype(newer, older) >}}
+
+**Description:** Returns whether the file `newer` is newer (modified later)
+than the file `older`.
+
+This function compares the modification time (mtime) of the files, referring
+to changes of content only.
+
+{{< CFEngine_function_attributes(newer, older) >}}
+
+**Example:**
+
+Prepare:
+
+{{< CFEngine_include_snippet(isnewerthan.cf, #\+begin_src prep, .*end_src) >}}
+
+Run:
+
+{{< CFEngine_include_snippet(isnewerthan.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(isnewerthan.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**See also:** `accessedbefore()`, `changedbefore()`
diff --git a/content/reference/functions/isplain.markdown b/content/reference/functions/isplain.markdown
new file mode 100644
index 000000000..9e652631b
--- /dev/null
+++ b/content/reference/functions/isplain.markdown
@@ -0,0 +1,23 @@
+---
+layout: default
+title: isplain
+aliases:
+ - "/reference-functions-isplain.html"
+---
+
+{{< CFEngine_function_prototype(filename) >}}
+
+**Description:** Returns whether the named object `filename` is a
+plain/regular file.
+
+{{< CFEngine_function_attributes(filename) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(isplain.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(isplain.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**See also:** `fileexists()`, `filestat()`, `isdir()`, `islink()`, `returnszero()`
diff --git a/reference/functions/isreadable.markdown b/content/reference/functions/isreadable.markdown
similarity index 85%
rename from reference/functions/isreadable.markdown
rename to content/reference/functions/isreadable.markdown
index cb0973e7d..571fb846f 100644
--- a/reference/functions/isreadable.markdown
+++ b/content/reference/functions/isreadable.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: isreadable
-published: true
+aliases:
+ - "/reference-functions-isreadable.html"
---
-[%CFEngine_function_prototype(path, timeout)%]
+{{< CFEngine_function_prototype(path, timeout) >}}
**Description:** Check if a file is readable.
@@ -39,11 +40,11 @@ penalty.
**Example:**
-[%CFEngine_include_snippet(isreadable.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(isreadable.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(isreadable.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(isreadable.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Introduced in 3.22.
diff --git a/reference/functions/isvariable.markdown b/content/reference/functions/isvariable.markdown
similarity index 56%
rename from reference/functions/isvariable.markdown
rename to content/reference/functions/isvariable.markdown
index dc41bf435..c6d1fea49 100644
--- a/reference/functions/isvariable.markdown
+++ b/content/reference/functions/isvariable.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: isvariable
-published: true
+aliases:
+ - "/reference-functions-isvariable.html"
---
-[%CFEngine_function_prototype(var)%]
+{{< CFEngine_function_prototype(var) >}}
**Description:** Returns whether a variable named `var` is defined.
@@ -13,12 +14,12 @@ The variable need only exist. This says nothing about its value. Use
are also checked, so this is a way to check if a classic CFEngine
array or a data container has a specific key or element.
-[%CFEngine_function_attributes(var)%]
+{{< CFEngine_function_attributes(var) >}}
**Example:**
-[%CFEngine_include_snippet(isvariable.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(isvariable.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(isvariable.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(isvariable.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
diff --git a/reference/functions/join.markdown b/content/reference/functions/join.markdown
similarity index 63%
rename from reference/functions/join.markdown
rename to content/reference/functions/join.markdown
index a2e8db0bf..9b8567f71 100644
--- a/reference/functions/join.markdown
+++ b/content/reference/functions/join.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: join
-published: true
+aliases:
+ - "/reference-functions-join.html"
---
-[%CFEngine_function_prototype(glue, list)%]
+{{< CFEngine_function_prototype(glue, list) >}}
**Description:** Join the items of `list` into a string, using the conjunction in `glue`.
@@ -13,15 +14,15 @@ join string in first argument.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(glue, list)%]
+{{< CFEngine_function_attributes(glue, list) >}}
**Example:**
-[%CFEngine_include_snippet(join.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(join.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(join.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(join.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/lastnode.markdown b/content/reference/functions/lastnode.markdown
similarity index 55%
rename from reference/functions/lastnode.markdown
rename to content/reference/functions/lastnode.markdown
index c3d2d7b25..cde30b5f8 100644
--- a/reference/functions/lastnode.markdown
+++ b/content/reference/functions/lastnode.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: lastnode
-published: true
+aliases:
+ - "/reference-functions-lastnode.html"
---
-[%CFEngine_function_prototype(string, separator)%]
+{{< CFEngine_function_prototype(string, separator) >}}
**Description:** Returns the part of `string` after the last `separator`.
@@ -12,15 +13,15 @@ This function returns the final node in a chain, given a regular
expression to split on. This is mainly useful for finding leaf-names of
files, from a fully qualified path name.
-[%CFEngine_function_attributes(string, separator)%]
+{{< CFEngine_function_attributes(string, separator) >}}
**Example:**
-[%CFEngine_include_snippet(lastnode.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(lastnode.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(lastnode.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(lastnode.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [`filestat()`][filestat], [`dirname()`][dirname],
[`splitstring()`][splitstring].
diff --git a/reference/functions/laterthan.markdown b/content/reference/functions/laterthan.markdown
similarity index 71%
rename from reference/functions/laterthan.markdown
rename to content/reference/functions/laterthan.markdown
index 6585f0d8e..da8667cb1 100644
--- a/reference/functions/laterthan.markdown
+++ b/content/reference/functions/laterthan.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: laterthan
-published: true
+aliases:
+ - "/reference-functions-laterthan.html"
---
-[%CFEngine_function_prototype(year, month, day, hour, minute, second)%]
+{{< CFEngine_function_prototype(year, month, day, hour, minute, second) >}}
**Description:** Returns whether the current time is later than the given
date and time.
@@ -12,7 +13,7 @@ date and time.
The specified date/time is an absolute date in the local timezone.
Note that, unlike some other functions, the month argument is 1-based (i.e. 1 corresponds to January).
-[%CFEngine_function_attributes(year, month, day, hour, minute, second)%]
+{{< CFEngine_function_attributes(year, month, day, hour, minute, second) >}}
**Example:**
diff --git a/reference/functions/ldaparray.markdown b/content/reference/functions/ldaparray.markdown
similarity index 83%
rename from reference/functions/ldaparray.markdown
rename to content/reference/functions/ldaparray.markdown
index f45786031..fad3a850d 100644
--- a/reference/functions/ldaparray.markdown
+++ b/content/reference/functions/ldaparray.markdown
@@ -1,12 +1,13 @@
---
layout: default
title: ldaparray
-published: true
+aliases:
+ - "/reference-functions-ldaparray.html"
---
**This function is only available in CFEngine Enterprise.**
-[%CFEngine_function_prototype(array, uri, dn, filter, scope, security)%]
+{{< CFEngine_function_prototype(array, uri, dn, filter, scope, security) >}}
**Description:** Fills `array` with the entire LDAP record, and returns
whether there was a match for the search.
@@ -15,7 +16,7 @@ This function retrieves an entire record with all elements and populates
an associative array with the entries. It returns a class that is true
if there was a match for the search, and false if nothing was retrieved.
-[%CFEngine_function_attributes(array, uri, dn, filter, scope, security)%]
+{{< CFEngine_function_attributes(array, uri, dn, filter, scope, security) >}}
`dn` specifies the distinguished name, an ldap formatted name built from
components, e.g. "dc=cfengine,dc=com". `filter` is an ldap search, e.g.
diff --git a/reference/functions/ldaplist.markdown b/content/reference/functions/ldaplist.markdown
similarity index 83%
rename from reference/functions/ldaplist.markdown
rename to content/reference/functions/ldaplist.markdown
index 7320e31e9..30ec01695 100644
--- a/reference/functions/ldaplist.markdown
+++ b/content/reference/functions/ldaplist.markdown
@@ -1,19 +1,20 @@
---
layout: default
title: ldaplist
-published: true
+aliases:
+ - "/reference-functions-ldaplist.html"
---
**This function is only available in CFEngine Enterprise.**
-[%CFEngine_function_prototype(uri, dn, filter, record, scope, security)%]
+{{< CFEngine_function_prototype(uri, dn, filter, record, scope, security) >}}
**Description:** Returns a list with all named values from multiple ldap records.
This function retrieves a single field from all matching LDAP records
identified by the search parameters.
-[%CFEngine_function_attributes(uri, dn, filter, record, scope, security)%]
+{{< CFEngine_function_attributes(uri, dn, filter, record, scope, security) >}}
`dn` specifies the distinguished name, an ldap formatted name built from
components, e.g. "dc=cfengine,dc=com". `filter` is an ldap search, e.g.
diff --git a/reference/functions/ldapvalue.markdown b/content/reference/functions/ldapvalue.markdown
similarity index 83%
rename from reference/functions/ldapvalue.markdown
rename to content/reference/functions/ldapvalue.markdown
index 23333390f..e34772748 100644
--- a/reference/functions/ldapvalue.markdown
+++ b/content/reference/functions/ldapvalue.markdown
@@ -1,19 +1,20 @@
---
layout: default
title: ldapvalue
-published: true
+aliases:
+ - "/reference-functions-ldapvalue.html"
---
**This function is only available in CFEngine Enterprise.**
-[%CFEngine_function_prototype(uri, dn, filter, record, scope, security)%]
+{{< CFEngine_function_prototype(uri, dn, filter, record, scope, security) >}}
**Description:** Returns the first matching named value from ldap.
This function retrieves a single field from a single LDAP record
identified by the search parameters. The first matching value it taken.
-[%CFEngine_function_attributes(uri, dn, filter, record, scope, security)%]
+{{< CFEngine_function_attributes(uri, dn, filter, record, scope, security) >}}
`dn` specifies the distinguished name, an ldap formatted name built from
components, e.g. "dc=cfengine,dc=com". `filter` is an ldap search, e.g.
diff --git a/reference/functions/length.markdown b/content/reference/functions/length.markdown
similarity index 58%
rename from reference/functions/length.markdown
rename to content/reference/functions/length.markdown
index ef11e368c..cd59bd158 100644
--- a/reference/functions/length.markdown
+++ b/content/reference/functions/length.markdown
@@ -1,24 +1,25 @@
---
layout: default
title: length
-published: true
+aliases:
+ - "/reference-functions-length.html"
---
-[%CFEngine_function_prototype(list)%]
+{{< CFEngine_function_prototype(list) >}}
**Description:** Returns the length of `list`.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(list)%]
+{{< CFEngine_function_attributes(list) >}}
**Example:**
-[%CFEngine_include_snippet(length.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(length.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(length.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(length.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/lsdir.markdown b/content/reference/functions/lsdir.markdown
similarity index 60%
rename from reference/functions/lsdir.markdown
rename to content/reference/functions/lsdir.markdown
index ae774177f..8eee5d718 100644
--- a/reference/functions/lsdir.markdown
+++ b/content/reference/functions/lsdir.markdown
@@ -1,25 +1,26 @@
---
layout: default
title: lsdir
-published: true
+aliases:
+ - "/reference-functions-lsdir.html"
---
-[%CFEngine_function_prototype(path, regex, include_base)%]
+{{< CFEngine_function_prototype(path, regex, include_base) >}}
**Description:** Returns a list of files in the directory `path` matching the regular expression `regex`.
If `include_base` is true, full paths are returned, otherwise only names
relative to the directory are returned.
-[%CFEngine_function_attributes(path, regex, include_base)%]
+{{< CFEngine_function_attributes(path, regex, include_base) >}}
**Example:**
-[%CFEngine_include_snippet(lsdir.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(lsdir.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(lsdir.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(lsdir.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Tips:**
diff --git a/reference/functions/makerule.markdown b/content/reference/functions/makerule.markdown
similarity index 90%
rename from reference/functions/makerule.markdown
rename to content/reference/functions/makerule.markdown
index d97c0479a..16b8806aa 100644
--- a/reference/functions/makerule.markdown
+++ b/content/reference/functions/makerule.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: makerule
-published: true
+aliases:
+ - "/reference-functions-makerule.html"
---
-[%CFEngine_function_prototype(target, sources)%]
+{{< CFEngine_function_prototype(target, sources) >}}
**Description:** Evaluates whether a `target` file needs to be built or
rebuilt from one or more `sources` files.
@@ -28,7 +29,7 @@ The makerule function emulates the same semantics and sets a class if
the target needs to be built or rebuit, i.e. if the top line of an
equivalent makefile is true.
-[%CFEngine_function_attributes(target, sources)%]
+{{< CFEngine_function_attributes(target, sources) >}}
The `sources` argument may be either a scalar (indicating a single
source) or a list reference or a data container. If the `sources`
diff --git a/reference/functions/maparray.markdown b/content/reference/functions/maparray.markdown
similarity index 77%
rename from reference/functions/maparray.markdown
rename to content/reference/functions/maparray.markdown
index c16af3d15..bedc0c637 100644
--- a/reference/functions/maparray.markdown
+++ b/content/reference/functions/maparray.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: maparray
-published: true
+aliases:
+ - "/reference-functions-maparray.html"
---
-[%CFEngine_function_prototype(pattern, array_or_container)%]
+{{< CFEngine_function_prototype(pattern, array_or_container) >}}
**Description:** Returns a list with each `array_or_container` element
modified by a `pattern`.
@@ -27,15 +28,15 @@ value (implicit looping).
The order of the array keys is not guaranteed. Use the `sort`
function if you need order in the resulting output.
-[%CFEngine_function_attributes(pattern, array_or_container)%]
+{{< CFEngine_function_attributes(pattern, array_or_container) >}}
**Example:**
-[%CFEngine_include_snippet(maparray.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(maparray.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(maparray.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(maparray.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9. The delayed evaluation behavior was introduced in 3.10.
diff --git a/reference/functions/mapdata.markdown b/content/reference/functions/mapdata.markdown
similarity index 80%
rename from reference/functions/mapdata.markdown
rename to content/reference/functions/mapdata.markdown
index 1558d3c2f..584579907 100644
--- a/reference/functions/mapdata.markdown
+++ b/content/reference/functions/mapdata.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: mapdata
-published: true
+aliases:
+ - "/reference-functions-mapdata.html"
---
-[%CFEngine_function_prototype(interpretation, pattern, array_or_container)%]
+{{< CFEngine_function_prototype(interpretation, pattern, array_or_container) >}}
**Description:** Returns a data container holding a JSON array. The
array is a map across each element of `array_or_container`, modified by
@@ -28,15 +29,15 @@ the example below for an illustration.
The order of the keys is not guaranteed. Use the `sort()` function if
you need order in the resulting output.
-[%CFEngine_function_attributes(interpretation, pattern, array_or_container)%]
+{{< CFEngine_function_attributes(interpretation, pattern, array_or_container) >}}
**Example:**
-[%CFEngine_include_snippet(mapdata.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(mapdata.cf, #\+begin_src cfengine3, .*end_src) >}}
Output: (when `show_example` is defined)
-[%CFEngine_include_snippet(mapdata.cf, #\+begin_src\s+show_example_example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(mapdata.cf, #\+begin_src\s+show_example_example_output\s*, .*end_src) >}}
**json_pipe**
@@ -53,11 +54,11 @@ power for advanced cases where the built-in CFEngine functions are not enough.
**Example with json_pipe:**
-[%CFEngine_include_snippet(mapdata_jsonpipe.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(mapdata_jsonpipe.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(mapdata_jsonpipe.cf, #\+begin_src\s+output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(mapdata_jsonpipe.cf, #\+begin_src\s+output\s*, .*end_src) >}}
**History:** Was introduced in 3.7.0. `canonify` mode was introduced in 3.9.0. The [collecting function][Functions#collecting functions] behavior was added in 3.9. The `json_pipe` mode was added in 3.9. The delayed evaluation behavior was introduced in 3.10.
diff --git a/reference/functions/maplist.markdown b/content/reference/functions/maplist.markdown
similarity index 72%
rename from reference/functions/maplist.markdown
rename to content/reference/functions/maplist.markdown
index 605c3964e..2e1fc6967 100644
--- a/reference/functions/maplist.markdown
+++ b/content/reference/functions/maplist.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: maplist
-published: true
+aliases:
+ - "/reference-functions-maplist.html"
---
-[%CFEngine_function_prototype(pattern, list)%]
+{{< CFEngine_function_prototype(pattern, list) >}}
**Description:** Return a list with each element in `list` modified by a
pattern.
@@ -17,15 +18,15 @@ The `$(this)` variable expands to the currently processed entry from `list`.
This is essentially like the map() function in Perl, and applies to
lists.
-[%CFEngine_function_attributes(pattern, list)%]
+{{< CFEngine_function_attributes(pattern, list) >}}
**Example:**
-[%CFEngine_include_snippet(maplist.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(maplist.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(maplist.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(maplist.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in 3.3.0, Nova 2.2.0 (2011). The [collecting function][Functions#collecting functions] behavior was added in 3.9. The delayed evaluation behavior was introduced in 3.10.
diff --git a/reference/functions/max.markdown b/content/reference/functions/max.markdown
similarity index 63%
rename from reference/functions/max.markdown
rename to content/reference/functions/max.markdown
index 33fe3e1c7..a1364aae5 100644
--- a/reference/functions/max.markdown
+++ b/content/reference/functions/max.markdown
@@ -1,24 +1,25 @@
---
layout: default
title: max
-published: true
+aliases:
+ - "/reference-functions-max.html"
---
-[%CFEngine_function_prototype(list, sortmode)%]
+{{< CFEngine_function_prototype(list, sortmode) >}}
**Description:** Return the maximum of the items in `list` according to `sortmode` (same sort modes as in `sort()`).
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(list, sortmode)%]
+{{< CFEngine_function_attributes(list, sortmode) >}}
**Example:**
-[%CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in version 3.6.0 (2014). `canonify` mode was introduced in 3.9.0. The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/mean.markdown b/content/reference/functions/mean.markdown
similarity index 60%
rename from reference/functions/mean.markdown
rename to content/reference/functions/mean.markdown
index 4d13f72a7..a59be69e4 100644
--- a/reference/functions/mean.markdown
+++ b/content/reference/functions/mean.markdown
@@ -1,24 +1,25 @@
---
layout: default
title: mean
-published: true
+aliases:
+ - "/reference-functions-mean.html"
---
-[%CFEngine_function_prototype(list)%]
+{{< CFEngine_function_prototype(list) >}}
**Description:** Return the mean of the numbers in `list`.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(list)%]
+{{< CFEngine_function_attributes(list) >}}
**Example:**
-[%CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in version 3.6.0 (2014). The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/mergedata.markdown b/content/reference/functions/mergedata.markdown
similarity index 74%
rename from reference/functions/mergedata.markdown
rename to content/reference/functions/mergedata.markdown
index 28686cc6a..a180d7d07 100644
--- a/reference/functions/mergedata.markdown
+++ b/content/reference/functions/mergedata.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: mergedata
-published: true
+aliases:
+ - "/reference-functions-mergedata.html"
---
-[%CFEngine_function_prototype(one, two, etc)%]
+{{< CFEngine_function_prototype(one, two, etc) >}}
**Description:** Returns the merger of any named data containers or lists. Can
also wrap and unwrap data containers.
@@ -31,23 +32,23 @@ traditional list and array data types in CFEngine.
- true and false are reserved bare values
- In the event of key collision the *last* key merged wins
-[%CFEngine_function_attributes()%]
+{{< CFEngine_function_attributes() >}}
**Example:**
-[%CFEngine_include_snippet(mergedata.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(mergedata.cf, #\+begin_src cfengine3, .*end_src) >}}
**Output:**
-[%CFEngine_include_snippet(mergedata.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(mergedata.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Example:**
-[%CFEngine_include_snippet(mergedata-last-key-wins.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(mergedata-last-key-wins.cf, #\+begin_src cfengine3, .*end_src) >}}
**Output:**
-[%CFEngine_include_snippet(mergedata-last-key-wins.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(mergedata-last-key-wins.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:**
diff --git a/reference/functions/min.markdown b/content/reference/functions/min.markdown
similarity index 61%
rename from reference/functions/min.markdown
rename to content/reference/functions/min.markdown
index 37b6ec74a..4a98c40f2 100644
--- a/reference/functions/min.markdown
+++ b/content/reference/functions/min.markdown
@@ -1,24 +1,25 @@
---
layout: default
title: min
-published: true
+aliases:
+ - "/reference-functions-min.html"
---
-[%CFEngine_function_prototype(list, sortmode)%]
+{{< CFEngine_function_prototype(list, sortmode) >}}
**Description:** Return the minimum of the items in `list` according to `sortmode` (same sort modes as in `sort()`).
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(list, sortmode)%]
+{{< CFEngine_function_attributes(list, sortmode) >}}
**Example:**
-[%CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in version 3.6.0 (2014). The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/network_connections.markdown b/content/reference/functions/network_connections.markdown
similarity index 94%
rename from reference/functions/network_connections.markdown
rename to content/reference/functions/network_connections.markdown
index a4f88d378..a2e735334 100644
--- a/reference/functions/network_connections.markdown
+++ b/content/reference/functions/network_connections.markdown
@@ -1,14 +1,15 @@
---
layout: default
title: network_connections
-published: true
+aliases:
+ - "/reference-functions-network_connections.html"
---
-[%CFEngine_function_prototype()%]
+{{< CFEngine_function_prototype() >}}
**Description:** Return the list of current network connections.
-[%CFEngine_function_attributes()%]
+{{< CFEngine_function_attributes() >}}
The returned data container has four keys:
diff --git a/reference/functions/none.markdown b/content/reference/functions/none.markdown
similarity index 62%
rename from reference/functions/none.markdown
rename to content/reference/functions/none.markdown
index b5a6adbe0..cab678d62 100644
--- a/reference/functions/none.markdown
+++ b/content/reference/functions/none.markdown
@@ -1,27 +1,28 @@
---
layout: default
title: none
-published: true
+aliases:
+ - "/reference-functions-none.html"
---
-[%CFEngine_function_prototype(regex, list)%]
+{{< CFEngine_function_prototype(regex, list) >}}
**Description:** Returns whether no element in `list` matches the regular
expression `regex`.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(regex, list)%]
+{{< CFEngine_function_attributes(regex, list) >}}
The regular expression is [unanchored][unanchored].
**Example:**
-[%CFEngine_include_snippet(none.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(none.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(none.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(none.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/not.markdown b/content/reference/functions/not.markdown
similarity index 81%
rename from reference/functions/not.markdown
rename to content/reference/functions/not.markdown
index 7745c5a7b..c35f8a40c 100644
--- a/reference/functions/not.markdown
+++ b/content/reference/functions/not.markdown
@@ -1,15 +1,16 @@
---
layout: default
title: not
-published: true
+aliases:
+ - "/reference-functions-not.html"
---
-[%CFEngine_function_prototype(expression)%]
+{{< CFEngine_function_prototype(expression) >}}
**Description:** Returns `any` if all arguments evaluate to false and `!any` if
any argument evaluates to true.
-[%CFEngine_function_attributes(expression)%]
+{{< CFEngine_function_attributes(expression) >}}
**Argument Descriptions:**
diff --git a/reference/functions/now.markdown b/content/reference/functions/now.markdown
similarity index 92%
rename from reference/functions/now.markdown
rename to content/reference/functions/now.markdown
index e1a9be210..7a4fcd9b8 100644
--- a/reference/functions/now.markdown
+++ b/content/reference/functions/now.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: now
-published: true
+aliases:
+ - "/reference-functions-now.html"
---
-[%CFEngine_function_prototype()%]
+{{< CFEngine_function_prototype() >}}
**Description:** Return the time at which this agent run started
in system representation.
@@ -76,7 +77,7 @@ body file_select pdf_modified_within_last_year
`processes` type promises using ```process_select``` can use this function to
select processes based on relative execution time.
-[%CFEngine_include_example(processes_define_class_based_on_process_runtime.cf)%]
+{{< CFEngine_include_example(processes_define_class_based_on_process_runtime.cf) >}}
**See also:**
diff --git a/reference/functions/nth.markdown b/content/reference/functions/nth.markdown
similarity index 77%
rename from reference/functions/nth.markdown
rename to content/reference/functions/nth.markdown
index 90b9aedb8..9bd009ea9 100644
--- a/reference/functions/nth.markdown
+++ b/content/reference/functions/nth.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: nth
-published: true
+aliases:
+ - "/reference-functions-nth.html"
---
-[%CFEngine_function_prototype(list_or_container, position_or_key)%]
+{{< CFEngine_function_prototype(list_or_container, position_or_key) >}}
**Description:** Returns the element of `list_or_container` at zero-based `position_or_key`.
@@ -24,15 +25,15 @@ Since 3.15, Nth supports negative indices when indexing lists, starting from
the other end of the list. With a `position_or_key` of `-1`, you will get `4`
from the list `[1,2,3,4]`.
-[%CFEngine_function_attributes(list_or_container, position_or_key)%]
+{{< CFEngine_function_attributes(list_or_container, position_or_key) >}}
**Example:**
-[%CFEngine_include_snippet(nth.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(nth.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(nth.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(nth.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:**
The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/on.markdown b/content/reference/functions/on.markdown
similarity index 70%
rename from reference/functions/on.markdown
rename to content/reference/functions/on.markdown
index 7d0ffb8ba..c811a6bf2 100644
--- a/reference/functions/on.markdown
+++ b/content/reference/functions/on.markdown
@@ -1,16 +1,17 @@
---
layout: default
title: "on"
-published: true
+aliases:
+ - "/reference-functions-on.html"
---
-[%CFEngine_function_prototype(year, month, day, hour, minute, second)%]
+{{< CFEngine_function_prototype(year, month, day, hour, minute, second) >}}
**Description:** Returns the specified date/time in integer system representation.
The specified date/time is an absolute date in the local timezone.
-[%CFEngine_function_attributes(year, month, day, hour, minute, second)%]
+{{< CFEngine_function_attributes(year, month, day, hour, minute, second) >}}
**Example:**
diff --git a/reference/functions/or.markdown b/content/reference/functions/or.markdown
similarity index 88%
rename from reference/functions/or.markdown
rename to content/reference/functions/or.markdown
index 94fe6751f..258cdf1f3 100644
--- a/reference/functions/or.markdown
+++ b/content/reference/functions/or.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: or
-published: true
+aliases:
+ - "/reference-functions-or.html"
---
-[%CFEngine_function_prototype(...)%]
+{{< CFEngine_function_prototype(...) >}}
**Description:** Returns `any` if any argument evaluates to true and `!any` if
any argument evaluates to false.
diff --git a/reference/functions/packagesmatching.markdown b/content/reference/functions/packagesmatching.markdown
similarity index 88%
rename from reference/functions/packagesmatching.markdown
rename to content/reference/functions/packagesmatching.markdown
index 7335fba2c..93aa8a9c7 100644
--- a/reference/functions/packagesmatching.markdown
+++ b/content/reference/functions/packagesmatching.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: packagesmatching
-published: true
+aliases:
+ - "/reference-functions-packagesmatching.html"
---
-[%CFEngine_function_prototype(package_regex, version_regex, arch_regex, method_regex)%]
+{{< CFEngine_function_prototype(package_regex, version_regex, arch_regex, method_regex) >}}
**Description:** Return a data container with the list of installed packages
matching the parameters.
@@ -26,7 +27,7 @@ this:
]
```
-[%CFEngine_function_attributes(package_regex, version_regex, arch_regex, method_regex)%]
+{{< CFEngine_function_attributes(package_regex, version_regex, arch_regex, method_regex) >}}
**IMPORTANT:** The data source used when querying depends on policy configuration.
When `package_inventory` in `body common control` is configured, CFEngine will record the packages installed and the package updates available for the configured package modules.
@@ -43,13 +44,15 @@ The following code extracts just the package names, then looks for
some desired packages, and finally reports if they are installed.
-[%CFEngine_include_example(packagesmatching.cf)%]
+{{< CFEngine_include_example(packagesmatching.cf) >}}
**Refresh rules:**
+
* installed packages cache used by packagesmatching() is refreshed at the end of each agent run in accordance with constraints defined in the relevant package module body.
* installed packages cache is refreshed after installing or removing a package.
* installed packages cache is refreshed if no local cache exists.
- This means a reliable way to force a refresh of CFEngine's internal package cache is to simply delete the local cache:
+
+This means a reliable way to force a refresh of CFEngine's internal package cache is to simply delete the local cache:
```cf3
$(sys.statedir)/packages_installed_.lmdb*
@@ -65,7 +68,6 @@ $(sys.statedir)/software_packages.csv
**History:**
* Introduced in CFEngine 3.6
-
* Function started using `package_module` based data sources by default, even if
there is no `package_inventory` attribute defined in `body common control` if
available in 3.23.0
diff --git a/reference/functions/packageupdatesmatching.markdown b/content/reference/functions/packageupdatesmatching.markdown
similarity index 89%
rename from reference/functions/packageupdatesmatching.markdown
rename to content/reference/functions/packageupdatesmatching.markdown
index e5e063eff..f3f13f38f 100644
--- a/reference/functions/packageupdatesmatching.markdown
+++ b/content/reference/functions/packageupdatesmatching.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: packageupdatesmatching
-published: true
+aliases:
+ - "/reference-functions-packageupdatesmatching.html"
---
-[%CFEngine_function_prototype(package_regex, version_regex, arch_regex, method_regex)%]
+{{< CFEngine_function_prototype(package_regex, version_regex, arch_regex, method_regex) >}}
**Description:** Return a data container with the list of available packages
matching the parameters.
@@ -26,7 +27,7 @@ this:
]
```
-[%CFEngine_function_attributes(package_regex, version_regex, arch_regex, method_regex)%]
+{{< CFEngine_function_attributes(package_regex, version_regex, arch_regex, method_regex) >}}
**IMPORTANT:** The data source used when querying depends on policy configuration.
When `package_inventory` in `body common control` is configured, CFEngine will record the packages installed and the package updates available for the configured package modules.
@@ -50,10 +51,12 @@ vars:
```
**Refresh rules:**
+
* updates cache used by packageupdatesmatching() is refreshed at the end of each agent run in accordance with constraints defined in the relevant package module body.
* updates cache is refreshed every time `repo` type package is installed or removed
* updates cache is refreshed if no local cache exists.
- This means a reliable way to force a refresh of CFEngine's internal package cache is to simply delete the local cache:
+
+This means a reliable way to force a refresh of CFEngine's internal package cache is to simply delete the local cache:
```cf3
$(sys.statedir)/packages_updates_.lmdb*
@@ -68,7 +71,6 @@ $(sys.statedir)/software_patches_avail.csv
**History:**
* Introduced in CFEngine 3.6
-
* Function started using `package_module` based data sources by default, even if
there is no `package_inventory` attribute defined in `body common control` if
available in 3.23.0
diff --git a/reference/functions/parseintarray.markdown b/content/reference/functions/parseintarray.markdown
similarity index 86%
rename from reference/functions/parseintarray.markdown
rename to content/reference/functions/parseintarray.markdown
index 4d9a16665..c549cffed 100644
--- a/reference/functions/parseintarray.markdown
+++ b/content/reference/functions/parseintarray.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: "parseintarray"
-published: true
+aliases:
+ - "/reference-functions-parseintarray.html"
---
**Prototype:** `parseintarray(array, input, comment, split, maxentries, maxbytes)`
@@ -31,11 +32,11 @@ split into fields. Using the empty string (`""`) indicates no comments.
**Example:**
-[%CFEngine_include_snippet(parseintarray.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(parseintarray.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(parseintarray.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(parseintarray.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in version 3.1.5a1, Nova 2.1.0 (2011**
diff --git a/reference/functions/parsejson.markdown b/content/reference/functions/parsejson.markdown
similarity index 87%
rename from reference/functions/parsejson.markdown
rename to content/reference/functions/parsejson.markdown
index 3c2491da9..a37650f80 100644
--- a/reference/functions/parsejson.markdown
+++ b/content/reference/functions/parsejson.markdown
@@ -1,15 +1,16 @@
---
layout: default
title: parsejson
-published: true
+aliases:
+ - "/reference-functions-parsejson.html"
---
-[%CFEngine_function_prototype(json_data)%]
+{{< CFEngine_function_prototype(json_data) >}}
**Description:** Parses JSON data directly from an inlined string and
returns the result as a `data` variable
-[%CFEngine_function_attributes(json_data)%]
+{{< CFEngine_function_attributes(json_data) >}}
Please note that because JSON uses double quotes, it's usually most
convenient to use single quotes for the string (CFEngine allows both
diff --git a/reference/functions/parserealarray.markdown b/content/reference/functions/parserealarray.markdown
similarity index 86%
rename from reference/functions/parserealarray.markdown
rename to content/reference/functions/parserealarray.markdown
index 28e19c547..474d815e1 100644
--- a/reference/functions/parserealarray.markdown
+++ b/content/reference/functions/parserealarray.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: "parserealarray"
-published: true
+aliases:
+ - "/reference-functions-parserealarray.html"
---
**Prototype:** `parserealarray(array, input, comment, split, maxentries, maxbytes)`
@@ -32,11 +33,11 @@ split into fields. Using the empty string (`""`) indicates no comments.
**Example:**
-[%CFEngine_include_snippet(parserealarray.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(parserealarray.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(parserealarray.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(parserealarray.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in version 3.1.5a1, Nova 2.1.0 (2011)
diff --git a/reference/functions/parsestringarray.markdown b/content/reference/functions/parsestringarray.markdown
similarity index 86%
rename from reference/functions/parsestringarray.markdown
rename to content/reference/functions/parsestringarray.markdown
index 676557397..56aa2b5ed 100644
--- a/reference/functions/parsestringarray.markdown
+++ b/content/reference/functions/parsestringarray.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: "parsestringarray"
-published: true
+aliases:
+ - "/reference-functions-parsestringarray.html"
---
**Prototype:** `parsestringarray(array, input, comment, split, maxentries, maxbytes)`
@@ -32,11 +33,11 @@ split into fields. Using the empty string (`""`) indicates no comments.
**Example:**
-[%CFEngine_include_snippet(parsestringarray.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(parsestringarray.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(parsestringarray.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(parsestringarray.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in version 3.1.5a1, Nova 2.1.0 (2011)
diff --git a/reference/functions/parsestringarrayidx.markdown b/content/reference/functions/parsestringarrayidx.markdown
similarity index 62%
rename from reference/functions/parsestringarrayidx.markdown
rename to content/reference/functions/parsestringarrayidx.markdown
index a0397648f..22d41d086 100644
--- a/reference/functions/parsestringarrayidx.markdown
+++ b/content/reference/functions/parsestringarrayidx.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: parsestringarrayidx
-published: true
+aliases:
+ - "/reference-functions-parsestringarrayidx.html"
---
-[%CFEngine_function_prototype(array, input, comment, split, maxentries, maxbytes)%]
+{{< CFEngine_function_prototype(array, input, comment, split, maxentries, maxbytes) >}}
**Description:** Populates the two-dimensional array `array` with up to
`maxentries` fields from the first `maxbytes` bytes of the string `input`.
@@ -16,14 +17,14 @@ The `comment` field is a multiline regular expression and will strip out
unwanted patterns from the file being read, leaving unstripped characters to be
split into fields. Using the empty string (`""`) indicates no comments.
-[%CFEngine_function_attributes(array, input, comment, split, maxentries, maxbytes)%]
+{{< CFEngine_function_attributes(array, input, comment, split, maxentries, maxbytes) >}}
**Example:**
-[%CFEngine_include_snippet(parsestringarrayidx.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(parsestringarrayidx.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(parsestringarrayidx.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(parsestringarrayidx.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in version 3.1.5, Nova 2.1.0 (2011)
diff --git a/reference/functions/parseyaml.markdown b/content/reference/functions/parseyaml.markdown
similarity index 82%
rename from reference/functions/parseyaml.markdown
rename to content/reference/functions/parseyaml.markdown
index e220898e8..138a4ea52 100644
--- a/reference/functions/parseyaml.markdown
+++ b/content/reference/functions/parseyaml.markdown
@@ -1,15 +1,16 @@
---
layout: default
title: parseyaml
-published: true
+aliases:
+ - "/reference-functions-parseyaml.html"
---
-[%CFEngine_function_prototype(yaml_data)%]
+{{< CFEngine_function_prototype(yaml_data) >}}
**Description:** Parses YAML data directly from an inlined string and
returns the result as a `data` variable
-[%CFEngine_function_attributes(yaml_data)%]
+{{< CFEngine_function_attributes(yaml_data) >}}
Please note that it's usually most convenient to use single quotes for
the string (CFEngine allows both types of quotes around a string).
diff --git a/reference/functions/peerleader.markdown b/content/reference/functions/peerleader.markdown
similarity index 72%
rename from reference/functions/peerleader.markdown
rename to content/reference/functions/peerleader.markdown
index 537fa6521..a17d4232f 100644
--- a/reference/functions/peerleader.markdown
+++ b/content/reference/functions/peerleader.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: peerleader
-published: true
+aliases:
+ - "/reference-functions-peerleader.html"
---
-[%CFEngine_function_prototype(filename, regex, groupsize)%]
+{{< CFEngine_function_prototype(filename, regex, groupsize) >}}
**Description:** Returns the current host's partition peer leader.
@@ -37,7 +38,7 @@ fails otherwise.
If the current host name (fully qualified or unqualified) is the peer
leader, the string `localhost` is used instead of the host name.
-[%CFEngine_function_attributes(filename, regex, groupsize)%]
+{{< CFEngine_function_attributes(filename, regex, groupsize) >}}
`groupsize` must be between 2 and 64 to avoid nonsensical promises.
@@ -45,12 +46,12 @@ leader, the string `localhost` is used instead of the host name.
Prepare:
-[%CFEngine_include_snippet(peerleader.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(peerleader.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(peerleader.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(peerleader.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(peerleader.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(peerleader.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
diff --git a/reference/functions/peerleaders.markdown b/content/reference/functions/peerleaders.markdown
similarity index 70%
rename from reference/functions/peerleaders.markdown
rename to content/reference/functions/peerleaders.markdown
index 53d25ae23..df4544ee7 100644
--- a/reference/functions/peerleaders.markdown
+++ b/content/reference/functions/peerleaders.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: peerleaders
-published: true
+aliases:
+ - "/reference-functions-peerleaders.html"
---
-[%CFEngine_function_prototype(filename, regex, groupsize)%]
+{{< CFEngine_function_prototype(filename, regex, groupsize) >}}
**Description:** Returns a list of partition peer leaders from a file of host names.
@@ -34,7 +35,7 @@ The `comment` field is a multiline regular expression and will strip out
unwanted patterns from the file being read, leaving unstripped characters to be
split into fields. Using the empty string (`""`) indicates no comments.
-[%CFEngine_function_attributes(filename, regex, groupsize)%]
+{{< CFEngine_function_attributes(filename, regex, groupsize) >}}
`groupsize` must be between 2 and 64 to avoid nonsensical promises.
@@ -42,12 +43,12 @@ split into fields. Using the empty string (`""`) indicates no comments.
Prepare:
-[%CFEngine_include_snippet(peerleaders.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(peerleaders.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(peerleaders.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(peerleaders.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(peerleaders.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(peerleaders.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
diff --git a/reference/functions/peers.markdown b/content/reference/functions/peers.markdown
similarity index 71%
rename from reference/functions/peers.markdown
rename to content/reference/functions/peers.markdown
index ad8e5228e..96bdbcc4a 100644
--- a/reference/functions/peers.markdown
+++ b/content/reference/functions/peers.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: peers
-published: true
+aliases:
+ - "/reference-functions-peers.html"
---
-[%CFEngine_function_prototype(filename, regex, groupsize)%]
+{{< CFEngine_function_prototype(filename, regex, groupsize) >}}
**Description:** Returns the current host's partition peers (excluding it).
@@ -34,7 +35,7 @@ The current host (unqualified or fully qualified) should belong to
this file if it is expected to interact with the others. The function
returns an empty list otherwise.
-[%CFEngine_function_attributes(filename, regex, groupsize)%]
+{{< CFEngine_function_attributes(filename, regex, groupsize) >}}
`groupsize` must be between 2 and 64 to avoid nonsensical promises.
@@ -42,12 +43,12 @@ returns an empty list otherwise.
Prepare:
-[%CFEngine_include_snippet(peers.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(peers.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(peers.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(peers.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(peers.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(peers.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
diff --git a/reference/functions/processexists.markdown b/content/reference/functions/processexists.markdown
similarity index 87%
rename from reference/functions/processexists.markdown
rename to content/reference/functions/processexists.markdown
index a2b9949e9..c0bec1525 100644
--- a/reference/functions/processexists.markdown
+++ b/content/reference/functions/processexists.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: processexists
-published: true
+aliases:
+ - "/reference-functions-processexists.html"
---
-[%CFEngine_function_prototype(regex)%]
+{{< CFEngine_function_prototype(regex) >}}
**Description:** Return whether a process matches the given [anchored][anchored] regular expression
`regex`.
@@ -14,7 +15,7 @@ table. Use `.*sherlock.*` to find all the processes that match
`sherlock`. Use `.*\bsherlock\b.*` to exclude partial matches like
`sherlock123` (`\b` matches a word boundary).
-[%CFEngine_function_attributes(regex)%]
+{{< CFEngine_function_attributes(regex) >}}
The process table is usually obtained with something like `ps -eo
user,pid,ppid,pgid,%cpu,%mem,vsize,ni,rss,stat,nlwp,stime,time,args`, and the
diff --git a/reference/functions/product.markdown b/content/reference/functions/product.markdown
similarity index 71%
rename from reference/functions/product.markdown
rename to content/reference/functions/product.markdown
index 8d836e5cd..84e32c833 100644
--- a/reference/functions/product.markdown
+++ b/content/reference/functions/product.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: product
-published: true
+aliases:
+ - "/reference-functions-product.html"
---
-[%CFEngine_function_prototype(list)%]
+{{< CFEngine_function_prototype(list) >}}
**Description:** Returns the product of the reals in `list`.
@@ -14,15 +15,15 @@ collect summary information from a source external to CFEngine.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(list)%]
+{{< CFEngine_function_attributes(list) >}}
**Example:**
-[%CFEngine_include_snippet(product.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(product.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(product.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(product.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in version 3.1.0b1,Nova 2.0.0b1 (2010). The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/randomint.markdown b/content/reference/functions/randomint.markdown
similarity index 65%
rename from reference/functions/randomint.markdown
rename to content/reference/functions/randomint.markdown
index b58ea2a5f..8faf78a05 100644
--- a/reference/functions/randomint.markdown
+++ b/content/reference/functions/randomint.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: randomint
-published: true
+aliases:
+ - "/reference-functions-randomint.html"
---
-[%CFEngine_function_prototype(lower, upper)%]
+{{< CFEngine_function_prototype(lower, upper) >}}
**Description:** Returns a random integer between `lower` and *up to but not including* `upper`.
@@ -19,12 +20,12 @@ context class expression as shown in the example.
**NOTE:** The randomness produced by randomint is not safe for cryptographic usage.
-[%CFEngine_function_attributes(lower, upper)%]
+{{< CFEngine_function_attributes(lower, upper) >}}
**Example:**
-[%CFEngine_include_snippet(randomint.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(randomint.cf, #\+begin_src cfengine3, .*end_src) >}}
Output: (when `show_random` is defined)
-[%CFEngine_include_snippet(randomint.cf, #\+begin_src\s+show_random_example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(randomint.cf, #\+begin_src\s+show_random_example_output\s*, .*end_src) >}}
diff --git a/reference/functions/read_module_protocol.markdown b/content/reference/functions/read_module_protocol.markdown
similarity index 62%
rename from reference/functions/read_module_protocol.markdown
rename to content/reference/functions/read_module_protocol.markdown
index a30e255ac..fe96dd972 100644
--- a/reference/functions/read_module_protocol.markdown
+++ b/content/reference/functions/read_module_protocol.markdown
@@ -1,20 +1,21 @@
---
layout: default
title: read_module_protocol
-published: true
+aliases:
+ - "/reference-functions-read_module_protocol.html"
---
-[%CFEngine_function_prototype(file_path)%]
+{{< CFEngine_function_prototype(file_path) >}}
**Description:** Interprets `file_path` as module protocol output.
This function is useful for reducing overhead by caching and then reading module protocol results from a file.
-[%CFEngine_function_attributes(file_path)%]
+{{< CFEngine_function_attributes(file_path) >}}
**Example:**
-[%CFEngine_include_example(read_module_protocol.cf)%]
+{{< CFEngine_include_example(read_module_protocol.cf) >}}
**See also:** [usemodule()][usemodule], [Module Protocol][commands#module]
diff --git a/reference/functions/readcsv.markdown b/content/reference/functions/readcsv.markdown
similarity index 73%
rename from reference/functions/readcsv.markdown
rename to content/reference/functions/readcsv.markdown
index 698da166a..d055a5c7a 100644
--- a/reference/functions/readcsv.markdown
+++ b/content/reference/functions/readcsv.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: readcsv
-published: true
+aliases:
+ - "/reference-functions-readcsv.html"
---
-[%CFEngine_function_prototype(filename, optional_maxbytes)%]
+{{< CFEngine_function_prototype(filename, optional_maxbytes) >}}
**Description:**
Parses CSV data from the file `filename` and returns the result as a `data` variable.
@@ -20,21 +21,21 @@ The returned data is in the same format as
`data_readstringarrayidx()`, that is, a data container that holds a
JSON array of JSON arrays.
-[%CFEngine_function_attributes(filename, optional_maxbytes)%]
+{{< CFEngine_function_attributes(filename, optional_maxbytes) >}}
**Example:**
Prepare:
-[%CFEngine_include_snippet(readcsv.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(readcsv.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(readcsv.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(readcsv.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(readcsv.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(readcsv.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Note:** CSV files formatted according to RFC 4180 must end with the `CRLF`
sequence. Thus a text file created on Unix with standard Unix tools
diff --git a/reference/functions/readdata.markdown b/content/reference/functions/readdata.markdown
similarity index 69%
rename from reference/functions/readdata.markdown
rename to content/reference/functions/readdata.markdown
index 02c69c6ec..26c536edc 100644
--- a/reference/functions/readdata.markdown
+++ b/content/reference/functions/readdata.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: readdata
-published: true
+aliases:
+ - "/reference-functions-readdata.html"
---
-[%CFEngine_function_prototype(filename, filetype)%]
+{{< CFEngine_function_prototype(filename, filetype) >}}
**Description:** Parses CSV, JSON, or YAML data from file `filename`
and returns the result as a `data` variable.
@@ -18,21 +19,21 @@ this function behaves like `readcsv()`, `readjson()`, `readyaml()` or `readenvfi
These functions have an optional parameter `maxbytes` (default: `inf`).
`maxbytes` can not be set using `readdata()`, if needed use one of the mentioned functions instead.
-[%CFEngine_function_attributes(filename, filetype)%]
+{{< CFEngine_function_attributes(filename, filetype) >}}
**Example:**
Prepare:
-[%CFEngine_include_snippet(readdata.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(readdata.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(readdata.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(readdata.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(readdata.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(readdata.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [`data_expand()`][data_expand], `readcsv()`, `readyaml()`, `readjson()`, `readenvfile()`, `validdata()`, `data` documentation.
diff --git a/reference/functions/readenvfile.markdown b/content/reference/functions/readenvfile.markdown
similarity index 65%
rename from reference/functions/readenvfile.markdown
rename to content/reference/functions/readenvfile.markdown
index e3e85c45f..ad032881a 100644
--- a/reference/functions/readenvfile.markdown
+++ b/content/reference/functions/readenvfile.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: readenvfile
-published: true
+aliases:
+ - "/reference-functions-readenvfile.html"
---
-[%CFEngine_function_prototype(filename, optional_maxbytes)%]
+{{< CFEngine_function_prototype(filename, optional_maxbytes) >}}
**Description:**
Parses key-value pairs from the file `filename` in env file format (`man os-release`).
@@ -13,7 +14,7 @@ Keys and values are interpreted as strings.
`maxbytes` is optional, if specified, only the first `maxbytes` bytes are read from `filename`.
[Details of the os-release/env file format on freedesktop.org](https://www.freedesktop.org/software/systemd/man/os-release.html)
-[%CFEngine_function_attributes(filename, otpional_maxbytes)%]
+{{< CFEngine_function_attributes(filename, otpional_maxbytes) >}}
**Syntax example:**
@@ -27,15 +28,15 @@ vars:
Prepare:
-[%CFEngine_include_snippet(readenvfile.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(readenvfile.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(readenvfile.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(readenvfile.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(readenvfile.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(readenvfile.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
This function is used internally to load `/etc/os-release` into `sys.os_release`.
diff --git a/reference/functions/readfile.markdown b/content/reference/functions/readfile.markdown
similarity index 63%
rename from reference/functions/readfile.markdown
rename to content/reference/functions/readfile.markdown
index a7147e9b0..fc9eee41e 100644
--- a/reference/functions/readfile.markdown
+++ b/content/reference/functions/readfile.markdown
@@ -1,31 +1,32 @@
---
layout: default
title: readfile
-published: true
+aliases:
+ - "/reference-functions-readfile.html"
---
-[%CFEngine_function_prototype(filename, optional_maxbytes)%]
+{{< CFEngine_function_prototype(filename, optional_maxbytes) >}}
**Description:**
Returns the first `maxbytes` bytes from file `filename`.
`maxbytes` is optional, if specified, only the first `maxbytes` bytes are read from `filename`.
When `maxbytes` is `0`, `inf` or not specified, the whole file will be read (but see **Notes** below).
-[%CFEngine_function_attributes(filename, optional_maxbytes)%]
+{{< CFEngine_function_attributes(filename, optional_maxbytes) >}}
**Example:**
Prepare:
-[%CFEngine_include_snippet(readfile.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(readfile.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(readfile.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(readfile.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(readfile.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(readfile.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
diff --git a/reference/functions/readintarray.markdown b/content/reference/functions/readintarray.markdown
similarity index 82%
rename from reference/functions/readintarray.markdown
rename to content/reference/functions/readintarray.markdown
index 01f4b3c24..1c5532be8 100644
--- a/reference/functions/readintarray.markdown
+++ b/content/reference/functions/readintarray.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: "readintarray"
-published: true
+aliases:
+ - "/reference-functions-readintarray.html"
---
**Prototype:** `readintarray(array, filename, comment, split, maxentries, maxbytes)`
@@ -37,14 +38,14 @@ lines matched.
Prepare:
-[%CFEngine_include_snippet(readintarray.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(readintarray.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(readintarray.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(readintarray.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(readintarray.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(readintarray.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [`readstringarray()`][readstringarray], [`readrealarray()`][readrealarray], [`parseintarray()`][parseintarray], [`parserealarray()`][parserealarray], [`parsestringarray()`][parsestringarray]
diff --git a/reference/functions/readintlist.markdown b/content/reference/functions/readintlist.markdown
similarity index 50%
rename from reference/functions/readintlist.markdown
rename to content/reference/functions/readintlist.markdown
index 189502046..08e3e7d49 100644
--- a/reference/functions/readintlist.markdown
+++ b/content/reference/functions/readintlist.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: readintlist
-published: true
+aliases:
+ - "/reference-functions-readintlist.html"
---
-[%CFEngine_function_prototype(filename, comment, split, maxentries, maxbytes)%]
+{{< CFEngine_function_prototype(filename, comment, split, maxentries, maxbytes) >}}
**Description:** Splits the file `filename` into separated
values and returns the list.
@@ -13,21 +14,21 @@ The `comment` field is a multiline regular expression and will strip out
unwanted patterns from the file being read, leaving unstripped characters to be
split into fields. Using the empty string (`""`) indicates no comments.
-[%CFEngine_function_attributes(filename, comment, split, maxentries, maxbytes)%]
+{{< CFEngine_function_attributes(filename, comment, split, maxentries, maxbytes) >}}
**Example:**
Prepare:
-[%CFEngine_include_snippet(readintlist.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(readintlist.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(readintlist.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(readintlist.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(readintlist.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(readintlist.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [`readstringlist()`][readstringlist], [`readreallist()`][readreallist]
diff --git a/reference/functions/readjson.markdown b/content/reference/functions/readjson.markdown
similarity index 75%
rename from reference/functions/readjson.markdown
rename to content/reference/functions/readjson.markdown
index ced2b6859..fe7552c2e 100644
--- a/reference/functions/readjson.markdown
+++ b/content/reference/functions/readjson.markdown
@@ -1,16 +1,17 @@
---
layout: default
title: readjson
-published: true
+aliases:
+ - "/reference-functions-readjson.html"
---
-[%CFEngine_function_prototype(filename, optional_maxbytes)%]
+{{< CFEngine_function_prototype(filename, optional_maxbytes) >}}
**Description:** Parses JSON data from the file `filename` and returns the
result as a `data` variable. `maxbytes` is optional, if specified, only the
first `maxbytes` bytes are read from `filename`.
-[%CFEngine_function_attributes(filename, optional_maxbytes)%]
+{{< CFEngine_function_attributes(filename, optional_maxbytes) >}}
**Example:**
diff --git a/reference/functions/readrealarray.markdown b/content/reference/functions/readrealarray.markdown
similarity index 90%
rename from reference/functions/readrealarray.markdown
rename to content/reference/functions/readrealarray.markdown
index 6ee8d9e60..8d65c5457 100644
--- a/reference/functions/readrealarray.markdown
+++ b/content/reference/functions/readrealarray.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: "readrealarray"
-published: true
+aliases:
+ - "/reference-functions-readrealarray.html"
---
**Prototype:** `readrealarray(array, filename, comment, split, maxentries, maxbytes)`
@@ -113,14 +114,14 @@ array_name[games][6] /bin/bash
```
Prepare:
-[%CFEngine_include_snippet(readrealarray.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(readrealarray.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(readrealarray.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(readrealarray.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(readrealarray.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(readrealarray.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [`readstringarray()`][readstringarray], [`readintarray()`][readintarray], [`parserealarray()`][parserealarray], [`parserealarray()`][parserealarray], [`parsestringarray()`][parsestringarray]
diff --git a/reference/functions/readreallist.markdown b/content/reference/functions/readreallist.markdown
similarity index 75%
rename from reference/functions/readreallist.markdown
rename to content/reference/functions/readreallist.markdown
index 82679807d..bf9aad581 100644
--- a/reference/functions/readreallist.markdown
+++ b/content/reference/functions/readreallist.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: readreallist
-published: true
+aliases:
+ - "/reference-functions-readreallist.html"
---
**Prototype:** `readreallist(filename, comment, split, maxentries, maxbytes)`
@@ -28,15 +29,15 @@ split into fields. Using the empty string (`""`) indicates no comments.
Prepare:
-[%CFEngine_include_snippet(readreallist.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(readreallist.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(readreallist.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(readreallist.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(readreallist.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(readreallist.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [`readstringlist()`][readstringlist], [`readintlist()`][readintlist]
diff --git a/reference/functions/readstringarray.markdown b/content/reference/functions/readstringarray.markdown
similarity index 90%
rename from reference/functions/readstringarray.markdown
rename to content/reference/functions/readstringarray.markdown
index 478ecdd4d..281e33501 100644
--- a/reference/functions/readstringarray.markdown
+++ b/content/reference/functions/readstringarray.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: "readstringarray"
-published: true
+aliases:
+ - "/reference-functions-readstringarray.html"
---
**Prototype:** `readstringarray(array, filename, comment, split, maxentries, maxbytes)`
@@ -113,14 +114,14 @@ array_name[games][6] /bin/bash
```
Prepare:
-[%CFEngine_include_snippet(readrealarray.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(readrealarray.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(readrealarray.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(readrealarray.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(readrealarray.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(readrealarray.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [`readrealarray()`][readrealarray], [`readintarray()`][readintarray], [`parserealarray()`][parserealarray], [`parserealarray()`][parserealarray], [`parsestringarray()`][parsestringarray]
diff --git a/reference/functions/readstringarrayidx.markdown b/content/reference/functions/readstringarrayidx.markdown
similarity index 88%
rename from reference/functions/readstringarrayidx.markdown
rename to content/reference/functions/readstringarrayidx.markdown
index 077faed4e..1a22f56ec 100644
--- a/reference/functions/readstringarrayidx.markdown
+++ b/content/reference/functions/readstringarrayidx.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: readstringarrayidx
-published: true
+aliases:
+ - "/reference-functions-readstringarrayidx.html"
---
-[%CFEngine_function_prototype(array, filename, comment, split, maxentries, maxbytes)%]
+{{< CFEngine_function_prototype(array, filename, comment, split, maxentries, maxbytes) >}}
**Description:** Populates the two-dimensional array `array` with up to
`maxentries` fields from the first `maxbytes` bytes of file `filename`.
@@ -23,7 +24,7 @@ matched). If you only want the fields in the first matching line (e.g., to
mimic the behavior of the *getpwnam(3)* on the file `/etc/passwd`), use
`getfields()`, instead.
-[%CFEngine_function_attributes(array, filename, comment, split, maxentries, maxbytes)%]
+{{< CFEngine_function_attributes(array, filename, comment, split, maxentries, maxbytes) >}}
**Example:**
diff --git a/reference/functions/readstringlist.markdown b/content/reference/functions/readstringlist.markdown
similarity index 75%
rename from reference/functions/readstringlist.markdown
rename to content/reference/functions/readstringlist.markdown
index 2ed7ab872..aa27f49cf 100644
--- a/reference/functions/readstringlist.markdown
+++ b/content/reference/functions/readstringlist.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: readstringlist
-published: true
+aliases:
+ - "/reference-functions-readstringlist.html"
---
**Prototype:** `readstringlist(filename, comment, split, maxentries, maxbytes)`
@@ -28,15 +29,15 @@ split into fields. Using the empty string (`""`) indicates no comments.
Prepare:
-[%CFEngine_include_snippet(readstringlist.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(readstringlist.cf, #\+begin_src prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(readstringlist.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(readstringlist.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(readstringlist.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(readstringlist.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [`readintlist()`][readintlist], [`readreallist()`][readreallist]
diff --git a/reference/functions/readtcp.markdown b/content/reference/functions/readtcp.markdown
similarity index 75%
rename from reference/functions/readtcp.markdown
rename to content/reference/functions/readtcp.markdown
index 532da1835..eedec36a0 100644
--- a/reference/functions/readtcp.markdown
+++ b/content/reference/functions/readtcp.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: readtcp
-published: true
+aliases:
+ - "/reference-functions-readtcp.html"
---
-[%CFEngine_function_prototype(hostnameip, port, sendstring, maxbytes)%]
+{{< CFEngine_function_prototype(hostnameip, port, sendstring, maxbytes) >}}
**Description:** Connects to tcp ```port``` of `hostnameip`, sends `sendstring`,
reads at most `maxbytes` from the response and returns those.
@@ -17,11 +18,11 @@ Not all Unix TCP read operations respond to signals for interruption, so
poorly formed requests can block the `cf-agent` process. Always test TCP
connections fully before deploying.
-[%CFEngine_function_attributes(host, port, sendstring, maxbytes)%]
+{{< CFEngine_function_attributes(host, port, sendstring, maxbytes) >}}
**Example:**
-[%CFEngine_include_snippet(readtcp.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(readtcp.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
diff --git a/reference/functions/readyaml.markdown b/content/reference/functions/readyaml.markdown
similarity index 72%
rename from reference/functions/readyaml.markdown
rename to content/reference/functions/readyaml.markdown
index 7b1091568..f5c81d840 100644
--- a/reference/functions/readyaml.markdown
+++ b/content/reference/functions/readyaml.markdown
@@ -1,16 +1,17 @@
---
layout: default
title: readyaml
-published: true
+aliases:
+ - "/reference-functions-readyaml.html"
---
-[%CFEngine_function_prototype(filename, optional_maxbytes)%]
+{{< CFEngine_function_prototype(filename, optional_maxbytes) >}}
**Description:** Parses YAML data from the file `filename` and returns the
result as a `data` variable. `maxbytes` is optional, if specified, only the
first `maxbytes` bytes are read from `filename`.
-[%CFEngine_function_attributes(filename, optional_maxbytes)%]
+{{< CFEngine_function_attributes(filename, optional_maxbytes) >}}
**Example:**
diff --git a/content/reference/functions/regarray.markdown b/content/reference/functions/regarray.markdown
new file mode 100644
index 000000000..855595516
--- /dev/null
+++ b/content/reference/functions/regarray.markdown
@@ -0,0 +1,21 @@
+---
+layout: default
+title: regarray
+aliases:
+ - "/reference-functions-regarray.html"
+---
+
+{{< CFEngine_function_prototype(array, regex) >}}
+
+**Description:** Returns whether `array` contains elements matching the
+[anchored][anchored]regular expression `regex`.
+
+{{< CFEngine_function_attributes(array, regex) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(regarray.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(regarray.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
diff --git a/reference/functions/regcmp.markdown b/content/reference/functions/regcmp.markdown
similarity index 64%
rename from reference/functions/regcmp.markdown
rename to content/reference/functions/regcmp.markdown
index 203493951..c5e19179f 100644
--- a/reference/functions/regcmp.markdown
+++ b/content/reference/functions/regcmp.markdown
@@ -1,23 +1,24 @@
---
layout: default
title: regcmp
-published: true
+aliases:
+ - "/reference-functions-regcmp.html"
---
-[%CFEngine_function_prototype(regex, string)%]
+{{< CFEngine_function_prototype(regex, string) >}}
**Description:** Returns whether the [anchored][anchored] regular expression
`regex` matches the `string.`
-[%CFEngine_function_attributes(regex, string)%]
+{{< CFEngine_function_attributes(regex, string) >}}
**Example:**
-[%CFEngine_include_snippet(regcmp.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(regcmp.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(regcmp.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(regcmp.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
If the string contains multiple lines, then it is necessary to code these
explicitly, as regular expressions do not normally match the end of line
diff --git a/reference/functions/regex_replace.markdown b/content/reference/functions/regex_replace.markdown
similarity index 76%
rename from reference/functions/regex_replace.markdown
rename to content/reference/functions/regex_replace.markdown
index 1579b2889..2be9bd2e5 100644
--- a/reference/functions/regex_replace.markdown
+++ b/content/reference/functions/regex_replace.markdown
@@ -1,14 +1,15 @@
---
layout: default
title: regex_replace
-published: true
+aliases:
+ - "/reference-functions-regex_replace.html"
---
-[%CFEngine_function_prototype(string, regex, replacement, options)%]
+{{< CFEngine_function_prototype(string, regex, replacement, options) >}}
**Description:** In a given string, replaces a regular expression with something else.
-[%CFEngine_function_attributes(string, regex, replacement, options)%]
+{{< CFEngine_function_attributes(string, regex, replacement, options) >}}
The supported options are single letters you place in the `options`
string in any order. Consult http://pcre.org/pcre.txt for the exact
@@ -34,11 +35,11 @@ regex match. `$&` holds the entire regex match.
**Example:**
-[%CFEngine_include_snippet(regex_replace.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(regex_replace.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(regex_replace.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(regex_replace.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in version 3.8.0 (2015)
diff --git a/reference/functions/regextract.markdown b/content/reference/functions/regextract.markdown
similarity index 64%
rename from reference/functions/regextract.markdown
rename to content/reference/functions/regextract.markdown
index 681cd4da9..5f5e3c7ee 100644
--- a/reference/functions/regextract.markdown
+++ b/content/reference/functions/regextract.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: regextract
-published: true
+aliases:
+ - "/reference-functions-regextract.html"
---
-[%CFEngine_function_prototype(regex, string, backref)%]
+{{< CFEngine_function_prototype(regex, string, backref) >}}
**Description:** Returns whether the [anchored][anchored] `regex` matches the
`string`, and fills the array `backref` with back-references.
@@ -20,14 +21,14 @@ $(backref[0]) = entire string
$(backref[1]) = back reference 1, etc
```
-[%CFEngine_function_attributes(regex, string, backref)%]
+{{< CFEngine_function_attributes(regex, string, backref) >}}
**Example:**
-[%CFEngine_include_snippet(regextract.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(regextract.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(regextract.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(regextract.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `data_regextract()` `regex_replace()`
diff --git a/reference/functions/registryvalue.markdown b/content/reference/functions/registryvalue.markdown
similarity index 52%
rename from reference/functions/registryvalue.markdown
rename to content/reference/functions/registryvalue.markdown
index 28ce5fafa..a2d96574e 100644
--- a/reference/functions/registryvalue.markdown
+++ b/content/reference/functions/registryvalue.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: registryvalue
-published: true
+aliases:
+ - "/reference-functions-registryvalue.html"
---
-[%CFEngine_function_prototype(key, valueid)%]
+{{< CFEngine_function_prototype(key, valueid) >}}
**Description:** Returns the value of `valueid` in the Windows registry key
`key`.
@@ -12,15 +13,15 @@ published: true
This function applies only to Windows-based systems. The value is parsed as a
string.
-[%CFEngine_function_attributes(key, valueid)%]
+{{< CFEngine_function_attributes(key, valueid) >}}
**Example:**
-[%CFEngine_include_snippet(registryvalue.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(registryvalue.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(registryvalue.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(registryvalue.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:** Currently values of type `REG_SZ` (string), `REG_EXPAND_SZ`
(expandable string) and `REG_DWORD` (double word) are supported.
diff --git a/reference/functions/regldap.markdown b/content/reference/functions/regldap.markdown
similarity index 83%
rename from reference/functions/regldap.markdown
rename to content/reference/functions/regldap.markdown
index ed180389d..7c7782451 100644
--- a/reference/functions/regldap.markdown
+++ b/content/reference/functions/regldap.markdown
@@ -1,12 +1,13 @@
---
layout: default
title: regldap
-published: true
+aliases:
+ - "/reference-functions-regldap.html"
---
**This function is only available in CFEngine Enterprise.**
-[%CFEngine_function_prototype(uri, dn, filter, record, scope, regex, security)%]
+{{< CFEngine_function_prototype(uri, dn, filter, record, scope, regex, security) >}}
**Description:** Returns whether the regular expression `regex` matches a
value item in the LDAP search.
@@ -15,7 +16,7 @@ This function retrieves a single field from all matching LDAP records
identified by the search parameters and compares it to the regular
expression `regex`.
-[%CFEngine_function_attributes(uri, dn, filter, record, scope, regex, security)%]
+{{< CFEngine_function_attributes(uri, dn, filter, record, scope, regex, security) >}}
`dn` specifies the distinguished name, an ldap formatted name built from
components, e.g. "dc=cfengine,dc=com". `filter` is an ldap search, e.g.
diff --git a/reference/functions/regline.markdown b/content/reference/functions/regline.markdown
similarity index 82%
rename from reference/functions/regline.markdown
rename to content/reference/functions/regline.markdown
index 9c868e0ed..9cf5159bb 100644
--- a/reference/functions/regline.markdown
+++ b/content/reference/functions/regline.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: regline
-published: true
+aliases:
+ - "/reference-functions-regline.html"
---
-[%CFEngine_function_prototype(regex, filename)%]
+{{< CFEngine_function_prototype(regex, filename) >}}
**Description:** Returns whether the [anchored][anchored] regular expression
`regex` matches a line in file `filename`.
@@ -12,15 +13,15 @@ published: true
Note that `regex` must match an entire line of the file in order to give a
true result.
-[%CFEngine_function_attributes(regex, filename)%]
+{{< CFEngine_function_attributes(regex, filename) >}}
**Examples:**
This example shows a way to determine if IPV4 forwarding is enabled or not.
-[%CFEngine_include_snippet(regline.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(regline.cf, #\+begin_src cfengine3, .*end_src) >}}
-[%CFEngine_include_snippet(regline.cf, #\+begin_src\s+random_example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(regline.cf, #\+begin_src\s+random_example_output\s*, .*end_src) >}}
For `edit_line` applications it may be useful to set a class for detecting the
presence of a string that does not exactly match one being inserted. For
diff --git a/reference/functions/reglist.markdown b/content/reference/functions/reglist.markdown
similarity index 68%
rename from reference/functions/reglist.markdown
rename to content/reference/functions/reglist.markdown
index 5f5af4058..6d3b9e6c2 100644
--- a/reference/functions/reglist.markdown
+++ b/content/reference/functions/reglist.markdown
@@ -1,25 +1,26 @@
---
layout: default
title: reglist
-published: true
+aliases:
+ - "/reference-functions-reglist.html"
---
-[%CFEngine_function_prototype(list, regex)%]
+{{< CFEngine_function_prototype(list, regex) >}}
**Description:** Returns whether the [anchored][anchored] regular expression
`regex` matches any item in `list`.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(list, regex)%]
+{{< CFEngine_function_attributes(list, regex) >}}
**Example:**
-[%CFEngine_include_snippet(reglist.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(reglist.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(reglist.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(reglist.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
In the example above, the IP address in `$(sys.ipv4[eth0])` must be `escape`d,
so that the (.) characters in the IP address are not interpreted as the
diff --git a/reference/functions/remoteclassesmatching.markdown b/content/reference/functions/remoteclassesmatching.markdown
similarity index 84%
rename from reference/functions/remoteclassesmatching.markdown
rename to content/reference/functions/remoteclassesmatching.markdown
index 9ee0f9499..d3bf4b34a 100644
--- a/reference/functions/remoteclassesmatching.markdown
+++ b/content/reference/functions/remoteclassesmatching.markdown
@@ -1,12 +1,13 @@
---
layout: default
title: remoteclassesmatching
-published: true
+aliases:
+ - "/reference-functions-remoteclassesmatching.html"
---
**This function is only available in CFEngine Enterprise.**
-[%CFEngine_function_prototype(regex, server, encrypt, prefix)%]
+{{< CFEngine_function_prototype(regex, server, encrypt, prefix) >}}
**Description:** Reads persistent classes matching regular expression `regex`
from a remote CFEngine server `server` and adds them into local context with
@@ -19,7 +20,7 @@ This function contacts a remote `cf-serverd` and requests access to defined
*persistent classes* on that system. Access must be granted by making an
`access` promise with `resource_type` set to `context`.
-[%CFEngine_function_attributes(regex, server, encrypt, prefix)%]
+{{< CFEngine_function_attributes(regex, server, encrypt, prefix) >}}
**Example:**
diff --git a/reference/functions/remotescalar.markdown b/content/reference/functions/remotescalar.markdown
similarity index 91%
rename from reference/functions/remotescalar.markdown
rename to content/reference/functions/remotescalar.markdown
index 3934ffb37..a704c8544 100644
--- a/reference/functions/remotescalar.markdown
+++ b/content/reference/functions/remotescalar.markdown
@@ -1,12 +1,13 @@
---
layout: default
title: remotescalar
-published: true
+aliases:
+ - "/reference-functions-remotescalar.html"
---
**This function is only available in CFEngine Enterprise.**
-[%CFEngine_function_prototype(id, server, encrypt)%]
+{{< CFEngine_function_prototype(id, server, encrypt) >}}
**Description:** Returns a scalar value identified by `id` from a remote CFEngine
`server`. Communication is encrytped depending on ```encrypt```.
@@ -27,7 +28,7 @@ needed to resolve the absence of a value can lead to undesirable
behavior. As a general rule, users are recommended to refrain from
relying on the availability of network resources.
-[%CFEngine_function_attributes(id, server, encrypt)%]
+{{< CFEngine_function_attributes(id, server, encrypt) >}}
**Example:**
diff --git a/reference/functions/returnszero.markdown b/content/reference/functions/returnszero.markdown
similarity index 74%
rename from reference/functions/returnszero.markdown
rename to content/reference/functions/returnszero.markdown
index 1d54aa77b..4649f66bd 100644
--- a/reference/functions/returnszero.markdown
+++ b/content/reference/functions/returnszero.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: returnszero
-published: true
+aliases:
+ - "/reference-functions-returnszero.html"
---
-[%CFEngine_function_prototype(command, shell)%]
+{{< CFEngine_function_prototype(command, shell) >}}
**Description:** Runs `command` and returns whether it has returned with exit
status zero.
@@ -12,15 +13,15 @@ status zero.
This is the complement of `execresult()`, but it returns a class result
rather than the output of the command.
-[%CFEngine_function_attributes(command, shell)%]
+{{< CFEngine_function_attributes(command, shell) >}}
**Example:**
-[%CFEngine_include_snippet(returnszero.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(returnszero.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(returnszero.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(returnszero.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:** you should never use this function to execute commands that
make changes to the system, or perform lengthy computations. Such an
diff --git a/reference/functions/reverse.markdown b/content/reference/functions/reverse.markdown
similarity index 69%
rename from reference/functions/reverse.markdown
rename to content/reference/functions/reverse.markdown
index 91f75534a..93c80f844 100644
--- a/reference/functions/reverse.markdown
+++ b/content/reference/functions/reverse.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: reverse
-published: true
+aliases:
+ - "/reference-functions-reverse.html"
---
-[%CFEngine_function_prototype(list)%]
+{{< CFEngine_function_prototype(list) >}}
**Description:** Reverses a list.
@@ -20,11 +21,11 @@ This is a simple function to reverse a list.
**Example:**
-[%CFEngine_include_snippet(reverse.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(reverse.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(reverse.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(reverse.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/rrange.markdown b/content/reference/functions/rrange.markdown
similarity index 50%
rename from reference/functions/rrange.markdown
rename to content/reference/functions/rrange.markdown
index 8502e618c..73b5c73ff 100644
--- a/reference/functions/rrange.markdown
+++ b/content/reference/functions/rrange.markdown
@@ -1,14 +1,15 @@
---
layout: default
title: rrange
-published: true
+aliases:
+ - "/reference-functions-rrange.html"
---
-[%CFEngine_function_prototype(arg1, arg2)%]
+{{< CFEngine_function_prototype(arg1, arg2) >}}
**Description:** Define a range of real numbers for CFEngine internal use.
-[%CFEngine_function_attributes(arg1, arg2)%]
+{{< CFEngine_function_attributes(arg1, arg2) >}}
**Notes:**
This is not yet used.
diff --git a/reference/functions/selectservers.markdown b/content/reference/functions/selectservers.markdown
similarity index 88%
rename from reference/functions/selectservers.markdown
rename to content/reference/functions/selectservers.markdown
index 64fb267bd..63357e6ac 100644
--- a/reference/functions/selectservers.markdown
+++ b/content/reference/functions/selectservers.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: selectservers
-published: true
+aliases:
+ - "/reference-functions-selectservers.html"
---
-[%CFEngine_function_prototype(hostlist, port, query, regex, maxbytes, array)%]
+{{< CFEngine_function_prototype(hostlist, port, query, regex, maxbytes, array) >}}
**Description:** Returns the number of tcp servers from `hostlist` which
respond with a reply matching `regex` to a `query` send to ```port```, and
@@ -18,7 +19,7 @@ This function allows discovery of all the TCP ports that are active and
functioning from an ordered list, and builds an array of their names. This
allows maintaining a list of pretested failover alternatives.
-[%CFEngine_function_attributes(hostlist, port, query, regex, maxbyes, array)%]
+{{< CFEngine_function_attributes(hostlist, port, query, regex, maxbyes, array) >}}
**Example:**
diff --git a/reference/functions/shuffle.markdown b/content/reference/functions/shuffle.markdown
similarity index 63%
rename from reference/functions/shuffle.markdown
rename to content/reference/functions/shuffle.markdown
index 48135af56..75821d568 100644
--- a/reference/functions/shuffle.markdown
+++ b/content/reference/functions/shuffle.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: shuffle
-published: true
+aliases:
+ - "/reference-functions-shuffle.html"
---
-[%CFEngine_function_prototype(list, seed)%]
+{{< CFEngine_function_prototype(list, seed) >}}
**Description:** Return `list` shuffled with `seed`.
@@ -13,15 +14,15 @@ published: true
The same seed will produce the same shuffle every time. For a random shuffle,
provide a random seed with the `randomint` function.
-[%CFEngine_function_attributes(list, seed)%]
+{{< CFEngine_function_attributes(list, seed) >}}
**Example:**
-[%CFEngine_include_snippet(shuffle.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(shuffle.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(shuffle.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(shuffle.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/some.markdown b/content/reference/functions/some.markdown
similarity index 71%
rename from reference/functions/some.markdown
rename to content/reference/functions/some.markdown
index 2fab47afe..e5c80c2c4 100644
--- a/reference/functions/some.markdown
+++ b/content/reference/functions/some.markdown
@@ -1,17 +1,18 @@
---
layout: default
title: some
-published: true
+aliases:
+ - "/reference-functions-some.html"
---
-[%CFEngine_function_prototype(regex, list)%]
+{{< CFEngine_function_prototype(regex, list) >}}
**Description:** Return whether any element of `list` matches the
[Unanchored][unanchored] regular expression `regex`.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(regex, list)%]
+{{< CFEngine_function_attributes(regex, list) >}}
`some()` will return as soon as any element matches.
@@ -22,11 +23,11 @@ possible, that is better than using `length()` or `every()` or
**Example:**
-[%CFEngine_include_snippet(some.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(some.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(some.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(some.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/sort.markdown b/content/reference/functions/sort.markdown
similarity index 93%
rename from reference/functions/sort.markdown
rename to content/reference/functions/sort.markdown
index ede0cc2e5..f1b73bd0b 100644
--- a/reference/functions/sort.markdown
+++ b/content/reference/functions/sort.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: sort
-published: true
+aliases:
+ - "/reference-functions-sort.html"
---
-[%CFEngine_function_prototype(list, mode)%]
+{{< CFEngine_function_prototype(list, mode) >}}
**Description:** Returns `list` sorted according to `mode`.
@@ -17,11 +18,11 @@ action. `mode` is optional, and defaults to `lex`.
Note IPv6 addresses can not use uppercase hexadecimal characters
(`A-Z`) but must use lowercase (`a-z`) instead.
-[%CFEngine_function_attributes(list, mode)%]
+{{< CFEngine_function_attributes(list, mode) >}}
**Example:**
-[%CFEngine_include_snippet(sort.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(sort.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
diff --git a/reference/functions/splayclass.markdown b/content/reference/functions/splayclass.markdown
similarity index 93%
rename from reference/functions/splayclass.markdown
rename to content/reference/functions/splayclass.markdown
index 43857b252..6eaaa02d6 100644
--- a/reference/functions/splayclass.markdown
+++ b/content/reference/functions/splayclass.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: splayclass
-published: true
+aliases:
+ - "/reference-functions-splayclass.html"
---
-[%CFEngine_function_prototype(input, policy)%]
+{{< CFEngine_function_prototype(input, policy) >}}
**Description:** Returns whether `input`'s time-slot has arrived,
according to a ```policy```.
@@ -18,7 +19,7 @@ This function may be used to distribute a task, typically on multiple hosts, in
The function is similar to the `splaytime` feature in `cf-execd`, except that it allows you to base the decision on any string-criterion on a given host.
-[%CFEngine_function_attributes(input, policy)%]
+{{< CFEngine_function_attributes(input, policy) >}}
The variation in `input` determines how effectively CFEngine will be able to
distribute tasks. CFEngine instances with the same `input` will yield a true
diff --git a/reference/functions/splitstring.markdown b/content/reference/functions/splitstring.markdown
similarity index 58%
rename from reference/functions/splitstring.markdown
rename to content/reference/functions/splitstring.markdown
index e22ed9af3..02bcc8a9a 100644
--- a/reference/functions/splitstring.markdown
+++ b/content/reference/functions/splitstring.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: splitstring
-published: true
+aliases:
+ - "/reference-functions-splitstring.html"
---
-[%CFEngine_function_prototype(string, regex, maxent)%]
+{{< CFEngine_function_prototype(string, regex, maxent) >}}
**Description:** Splits `string` into at most `maxent` substrings wherever
`regex` occurs, and returns the list with those strings.
@@ -14,15 +15,15 @@ The regular expression is [unanchored][unanchored].
If the maximum number of substrings is insufficient to accommodate all the
entries, the rest of the un-split string is thrown away.
-[%CFEngine_function_attributes(string, regex, maxent)%]
+{{< CFEngine_function_attributes(string, regex, maxent) >}}
**Example:**
-[%CFEngine_include_snippet(splitstring.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(splitstring.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(splitstring.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(splitstring.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Deprecated in CFEngine 3.6 in favor of `string_split`
diff --git a/reference/functions/storejson.markdown b/content/reference/functions/storejson.markdown
similarity index 71%
rename from reference/functions/storejson.markdown
rename to content/reference/functions/storejson.markdown
index eed076b43..82fa54c47 100644
--- a/reference/functions/storejson.markdown
+++ b/content/reference/functions/storejson.markdown
@@ -1,20 +1,21 @@
---
layout: default
title: storejson
-published: true
+aliases:
+ - "/reference-functions-storejson.html"
---
-[%CFEngine_function_prototype(data_container)%]
+{{< CFEngine_function_prototype(data_container) >}}
**Description:** Converts a data container to a JSON string.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(data_container)%]
+{{< CFEngine_function_attributes(data_container) >}}
**Example:**
-[%CFEngine_include_example(storejson.cf)%]
+{{< CFEngine_include_example(storejson.cf) >}}
**History:**
diff --git a/content/reference/functions/strcmp.markdown b/content/reference/functions/strcmp.markdown
new file mode 100644
index 000000000..0836f535e
--- /dev/null
+++ b/content/reference/functions/strcmp.markdown
@@ -0,0 +1,23 @@
+---
+layout: default
+title: strcmp
+aliases:
+ - "/reference-functions-strcmp.html"
+---
+
+{{< CFEngine_function_prototype(string1, string2) >}}
+
+**Description:** Returns whether the two strings `string1` and `string2` match
+exactly.
+
+{{< CFEngine_function_attributes(string1, string2) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(strcmp.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(strcmp.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**See also:** `regcmp()`, `regline()`
diff --git a/reference/functions/strftime.markdown b/content/reference/functions/strftime.markdown
similarity index 68%
rename from reference/functions/strftime.markdown
rename to content/reference/functions/strftime.markdown
index 6e44cacca..ff32fa5c4 100644
--- a/reference/functions/strftime.markdown
+++ b/content/reference/functions/strftime.markdown
@@ -1,15 +1,16 @@
---
layout: default
title: strftime
-published: true
+aliases:
+ - "/reference-functions-strftime.html"
---
-[%CFEngine_function_prototype(mode, template, time)%]
+{{< CFEngine_function_prototype(mode, template, time) >}}
**Description:** Interprets a time and date format string at a particular
point in GMT or local time using Unix epoch time.
-[%CFEngine_function_attributes(mode, template, time)%]
+{{< CFEngine_function_attributes(mode, template, time) >}}
The `mode` is either `gmtime` (to get GMT times and dates) or
`localtime` (to get times and dates according to the local
@@ -20,11 +21,11 @@ are specialized for printing components of the date and time according to the sy
**Example:**
-[%CFEngine_include_snippet(strftime.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(strftime.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(strftime.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(strftime.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:** Note that `strftime` is a standard C function and you should consult
its
diff --git a/reference/functions/string.markdown b/content/reference/functions/string.markdown
similarity index 65%
rename from reference/functions/string.markdown
rename to content/reference/functions/string.markdown
index a13b6f892..60bb54b66 100644
--- a/reference/functions/string.markdown
+++ b/content/reference/functions/string.markdown
@@ -1,14 +1,15 @@
---
layout: default
title: string
-published: true
+aliases:
+ - "/reference-functions-string.html"
---
-[%CFEngine_function_prototype(arg)%]
+{{< CFEngine_function_prototype(arg) >}}
**Description:** Convert `arg` to string.
-[%CFEngine_function_attributes(arg)%]
+{{< CFEngine_function_attributes(arg) >}}
If `arg` is a container reference it will be serialized to a string.
The reference must be indicated with `@(some_container)`.
@@ -16,7 +17,7 @@ Strings are *not* interpreted as references.
**Example:**
-[%CFEngine_include_example(string.cf)%]
+{{< CFEngine_include_example(string.cf) >}}
**See also:** [`int()`][int]
diff --git a/content/reference/functions/string_downcase.markdown b/content/reference/functions/string_downcase.markdown
new file mode 100644
index 000000000..6edc2742b
--- /dev/null
+++ b/content/reference/functions/string_downcase.markdown
@@ -0,0 +1,24 @@
+---
+layout: default
+title: string_downcase
+aliases:
+ - "/reference-functions-string_downcase.html"
+---
+
+{{< CFEngine_function_prototype(data) >}}
+
+**Description:** Returns `data` in lower case.
+
+{{< CFEngine_function_attributes(data) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(string_downcase.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(string_downcase.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**History:** Introduced in CFEngine 3.6
+
+**See also:** `string_upcase()`.
diff --git a/content/reference/functions/string_head.markdown b/content/reference/functions/string_head.markdown
new file mode 100644
index 000000000..d8039780f
--- /dev/null
+++ b/content/reference/functions/string_head.markdown
@@ -0,0 +1,26 @@
+---
+layout: default
+title: string_head
+aliases:
+ - "/reference-functions-string_head.html"
+---
+
+{{< CFEngine_function_prototype(data, max) >}}
+
+**Description:** Returns the first `max` bytes of `data`.
+
+If `max` is negative, then everything but the last `max` bytes is returned.
+
+{{< CFEngine_function_attributes(data, max) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(string_head.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(string_head.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**History:** Introduced in CFEngine 3.6
+
+**See also:** `string_tail()`, `string_length()`, `string_reverse()`.
diff --git a/content/reference/functions/string_length.markdown b/content/reference/functions/string_length.markdown
new file mode 100644
index 000000000..545bfe223
--- /dev/null
+++ b/content/reference/functions/string_length.markdown
@@ -0,0 +1,24 @@
+---
+layout: default
+title: string_length
+aliases:
+ - "/reference-functions-string_length.html"
+---
+
+{{< CFEngine_function_prototype(data) >}}
+
+**Description:** Returns the byte length of `data`.
+
+{{< CFEngine_function_attributes(data) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(string_length.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(string_length.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**History:** Introduced in CFEngine 3.6
+
+**See also:** `string_head()`, `string_tail()`, `string_reverse()`.
diff --git a/reference/functions/string_mustache.markdown b/content/reference/functions/string_mustache.markdown
similarity index 52%
rename from reference/functions/string_mustache.markdown
rename to content/reference/functions/string_mustache.markdown
index d4e205b2f..9442256ac 100644
--- a/reference/functions/string_mustache.markdown
+++ b/content/reference/functions/string_mustache.markdown
@@ -1,25 +1,26 @@
---
layout: default
title: string_mustache
-published: true
+aliases:
+ - "/reference-functions-string_mustache.html"
---
-[%CFEngine_function_prototype(template_string, optional_data_container)%]
+{{< CFEngine_function_prototype(template_string, optional_data_container) >}}
**Description:** Formats a Mustache string template into a string, using either the system `datastate()` or an explicitly provided data container.
The usual Mustache facilities like conditional evaluation and loops are available, see the example below.
-[%CFEngine_function_attributes(template_string, optional_data_container)%]
+{{< CFEngine_function_attributes(template_string, optional_data_container) >}}
**Example:**
-{%raw%}
-[%CFEngine_include_snippet(string_mustache.cf, #\+begin_src cfengine3, .*end_src)%]
-{%endraw%}
+
+{{< CFEngine_include_snippet(string_mustache.cf, #\+begin_src cfengine3, .*end_src) >}}
+
Output:
-[%CFEngine_include_snippet(string_mustache.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(string_mustache.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Introduced in CFEngine 3.7
diff --git a/reference/functions/string_replace.markdown b/content/reference/functions/string_replace.markdown
similarity index 64%
rename from reference/functions/string_replace.markdown
rename to content/reference/functions/string_replace.markdown
index 32b66ff45..07c50e8e7 100644
--- a/reference/functions/string_replace.markdown
+++ b/content/reference/functions/string_replace.markdown
@@ -1,14 +1,15 @@
---
layout: default
title: string_replace
-published: true
+aliases:
+ - "/reference-functions-string_replace.html"
---
-[%CFEngine_function_prototype(string, match, replacement)%]
+{{< CFEngine_function_prototype(string, match, replacement) >}}
**Description:** In a given string, replaces a substring with another string.
-[%CFEngine_function_attributes(string, match, replacement)%]
+{{< CFEngine_function_attributes(string, match, replacement) >}}
Reads a string from left to right, replacing the occurences of the second
argument with the third argument in order.
@@ -20,11 +21,11 @@ advanced replace functionality, check out `regex_replace()`.
**Example:**
-[%CFEngine_include_snippet(string_replace.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(string_replace.cf, #\+begin_src cfengine3, .*end_src) >}}
**Output:**
-[%CFEngine_include_snippet(string_replace.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(string_replace.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Introduced in 3.12.1 (2018) as a simpler version of `regex_replace()`
diff --git a/content/reference/functions/string_reverse.markdown b/content/reference/functions/string_reverse.markdown
new file mode 100644
index 000000000..93f9d09e1
--- /dev/null
+++ b/content/reference/functions/string_reverse.markdown
@@ -0,0 +1,24 @@
+---
+layout: default
+title: string_reverse
+aliases:
+ - "/reference-functions-string_reverse.html"
+---
+
+{{< CFEngine_function_prototype(data) >}}
+
+**Description:** Returns `data` reversed.
+
+{{< CFEngine_function_attributes(data) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(string_reverse.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(string_reverse.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**History:** Introduced in CFEngine 3.6
+
+**See also:** `string_head()`, `string_tail()`, `string_length()`.
diff --git a/reference/functions/string_split.markdown b/content/reference/functions/string_split.markdown
similarity index 66%
rename from reference/functions/string_split.markdown
rename to content/reference/functions/string_split.markdown
index 10994bfa2..64c2ce6c9 100644
--- a/reference/functions/string_split.markdown
+++ b/content/reference/functions/string_split.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: string_split
-published: true
+aliases:
+ - "/reference-functions-string_split.html"
---
-[%CFEngine_function_prototype(string, regex, maxent)%]
+{{< CFEngine_function_prototype(string, regex, maxent) >}}
**Description:** Splits `string` into at most `maxent` substrings wherever
`regex` occurs, and returns the list with those strings.
@@ -17,15 +18,15 @@ last one will contain the rest of the string starting with the
`maxent-1`-th delimiter. This is standard behavior in many languages
like Perl or Ruby, and different from the `splitstring()` behavior.
-[%CFEngine_function_attributes(string, regex, maxent)%]
+{{< CFEngine_function_attributes(string, regex, maxent) >}}
**Example:**
-[%CFEngine_include_snippet(string_split.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(string_split.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(string_split.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(string_split.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Introduced in CFEngine 3.6; deprecates `splitstring()`.
diff --git a/content/reference/functions/string_tail.markdown b/content/reference/functions/string_tail.markdown
new file mode 100644
index 000000000..5a1ecf665
--- /dev/null
+++ b/content/reference/functions/string_tail.markdown
@@ -0,0 +1,26 @@
+---
+layout: default
+title: string_tail
+aliases:
+ - "/reference-functions-string_tail.html"
+---
+
+{{< CFEngine_function_prototype(data, max) >}}
+
+**Description:** Returns the last `max` bytes of `data`.
+
+If `max` is negative, then everything but the first `max` bytes is returned.
+
+{{< CFEngine_function_attributes(data, max) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(string_tail.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(string_tail.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**History:** Introduced in CFEngine 3.6
+
+**See also:** `string_head()`, `string_length()`, `string_reverse()`.
diff --git a/reference/functions/string_trim.markdown b/content/reference/functions/string_trim.markdown
similarity index 57%
rename from reference/functions/string_trim.markdown
rename to content/reference/functions/string_trim.markdown
index 153fff677..6e6b41b2c 100644
--- a/reference/functions/string_trim.markdown
+++ b/content/reference/functions/string_trim.markdown
@@ -1,18 +1,19 @@
---
layout: default
title: string_trim
-published: true
+aliases:
+ - "/reference-functions-string_trim.html"
---
-[%CFEngine_function_prototype(string)%]
+{{< CFEngine_function_prototype(string) >}}
**Description:** Trim whitespace from beginning and end of `string`.
-[%CFEngine_function_attributes(string)%]
+{{< CFEngine_function_attributes(string) >}}
**Example:**
-[%CFEngine_include_example(string_trim.cf)%]
+{{< CFEngine_include_example(string_trim.cf) >}}
**History:** Introduced in CFEngine 3.16
diff --git a/content/reference/functions/string_upcase.markdown b/content/reference/functions/string_upcase.markdown
new file mode 100644
index 000000000..7b7e7c245
--- /dev/null
+++ b/content/reference/functions/string_upcase.markdown
@@ -0,0 +1,24 @@
+---
+layout: default
+title: string_upcase
+aliases:
+ - "/reference-functions-string_upcase.html"
+---
+
+{{< CFEngine_function_prototype(data) >}}
+
+**Description:** Returns `data` in uppercase.
+
+{{< CFEngine_function_attributes(data) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(string_upcase.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(string_upcase.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**History:** Introduced in CFEngine 3.6
+
+**See also:** `string_downcase()`.
diff --git a/reference/functions/sublist.markdown b/content/reference/functions/sublist.markdown
similarity index 58%
rename from reference/functions/sublist.markdown
rename to content/reference/functions/sublist.markdown
index 403298c98..a38b305eb 100644
--- a/reference/functions/sublist.markdown
+++ b/content/reference/functions/sublist.markdown
@@ -1,24 +1,25 @@
---
layout: default
title: sublist
-published: true
+aliases:
+ - "/reference-functions-sublist.html"
---
-[%CFEngine_function_prototype(list, head_or_tail, max_elements)%]
+{{< CFEngine_function_prototype(list, head_or_tail, max_elements) >}}
**Description:** Returns list of up to `max_elements` of `list`, obtained from head or tail depending on `head_or_tail`.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(list, head_or_tail, max_elements)%]
+{{< CFEngine_function_attributes(list, head_or_tail, max_elements) >}}
**Example:**
-[%CFEngine_include_snippet(sublist.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(sublist.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(sublist.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(sublist.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/sum.markdown b/content/reference/functions/sum.markdown
similarity index 74%
rename from reference/functions/sum.markdown
rename to content/reference/functions/sum.markdown
index bf47a9475..9f3d1a726 100644
--- a/reference/functions/sum.markdown
+++ b/content/reference/functions/sum.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: sum
-published: true
+aliases:
+ - "/reference-functions-sum.html"
---
-[%CFEngine_function_prototype(list)%]
+{{< CFEngine_function_prototype(list) >}}
**Description:** Return the sum of the reals in `list`.
@@ -14,15 +15,15 @@ This function might be used for simple ring computation. Of course, you could
easily combine `sum` with `readstringarray` or `readreallist` etc., to collect
summary information from a source external to CFEngine.
-[%CFEngine_function_attributes(list)%]
+{{< CFEngine_function_attributes(list) >}}
**Example:**
-[%CFEngine_include_snippet(sum.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(sum.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(sum.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(sum.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
Because `$(six)` and `$(zero)` are both real numbers, the report that is
generated will be:
diff --git a/reference/functions/sysctlvalue.markdown b/content/reference/functions/sysctlvalue.markdown
similarity index 78%
rename from reference/functions/sysctlvalue.markdown
rename to content/reference/functions/sysctlvalue.markdown
index 3300860a3..a46ed07a4 100644
--- a/reference/functions/sysctlvalue.markdown
+++ b/content/reference/functions/sysctlvalue.markdown
@@ -1,14 +1,15 @@
---
layout: default
title: sysctlvalue
-published: true
+aliases:
+ - "/reference-functions-sysctlvalue.html"
---
-[%CFEngine_function_prototype(key)%]
+{{< CFEngine_function_prototype(key) >}}
**Description:** Returns the sysctl value of `key` using `/proc/sys`.
-[%CFEngine_function_attributes(key)%]
+{{< CFEngine_function_attributes(key) >}}
**Example:**
diff --git a/reference/functions/translatepath.markdown b/content/reference/functions/translatepath.markdown
similarity index 69%
rename from reference/functions/translatepath.markdown
rename to content/reference/functions/translatepath.markdown
index 94b46713b..5459ba2bf 100644
--- a/reference/functions/translatepath.markdown
+++ b/content/reference/functions/translatepath.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: translatepath
-published: true
+aliases:
+ - "/reference-functions-translatepath.html"
---
-[%CFEngine_function_prototype(path)%]
+{{< CFEngine_function_prototype(path) >}}
**Description:** Translate separators in `path` from Unix style to the host's
native style and returns the result.
@@ -14,15 +15,15 @@ these to the native format for path separators on the host. For example
translatepath("a/b/c") would yield "a/b/c" on Unix platforms, but
"a\\b\\c" on Windows.
-[%CFEngine_function_attributes(path)%]
+{{< CFEngine_function_attributes(path) >}}
**Example:**
-[%CFEngine_include_snippet(translatepath.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(translatepath.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(translatepath.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(translatepath.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:** Be careful when using this function in combination with regular
expressions, since backslash is also used as escape character in
diff --git a/reference/functions/type.markdown b/content/reference/functions/type.markdown
similarity index 87%
rename from reference/functions/type.markdown
rename to content/reference/functions/type.markdown
index abaa43c68..74c696805 100644
--- a/reference/functions/type.markdown
+++ b/content/reference/functions/type.markdown
@@ -1,14 +1,15 @@
---
layout: default
title: type
-published: true
+aliases:
+ - "/reference-functions-type.html"
---
-[%CFEngine_function_prototype(var, detail)%]
+{{< CFEngine_function_prototype(var, detail) >}}
**Description:** Returns a variables type description.
-[%CFEngine_function_attributes(var, detail)%]
+{{< CFEngine_function_attributes(var, detail) >}}
This function returns a variables type description as a string. The function
expects a variable identifier as the first argument `var`. An optional second
@@ -58,11 +59,11 @@ with different combinations of the arguments `type` and `detail`.
**Example:**
-[%CFEngine_include_snippet(type.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(type.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(type.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(type.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:**
diff --git a/reference/functions/unique.markdown b/content/reference/functions/unique.markdown
similarity index 58%
rename from reference/functions/unique.markdown
rename to content/reference/functions/unique.markdown
index f4131a162..254457566 100644
--- a/reference/functions/unique.markdown
+++ b/content/reference/functions/unique.markdown
@@ -1,24 +1,25 @@
---
layout: default
title: unique
-published: true
+aliases:
+ - "/reference-functions-unique.html"
---
-[%CFEngine_function_prototype(list)%]
+{{< CFEngine_function_prototype(list) >}}
**Description:** Returns list of unique elements from `list`.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(list)%]
+{{< CFEngine_function_attributes(list) >}}
**Example:**
-[%CFEngine_include_snippet(unique.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(unique.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(unique.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(unique.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/url_get.markdown b/content/reference/functions/url_get.markdown
similarity index 96%
rename from reference/functions/url_get.markdown
rename to content/reference/functions/url_get.markdown
index 2685c3345..e9f50c9c0 100644
--- a/reference/functions/url_get.markdown
+++ b/content/reference/functions/url_get.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: url_get
-published: true
+aliases:
+ - "/reference-functions-url_get.html"
---
-[%CFEngine_function_prototype(url, options_container)%]
+{{< CFEngine_function_prototype(url, options_container) >}}
**Description:** Retrieves the contents of a `url` using options from
a data container. The data is returned in a
@@ -47,7 +48,7 @@ The returned data container will have the following keys:
* `content`: the response content as a string
* `headers`: the response headers as a string
-[%CFEngine_function_attributes(url, options_container)%]
+{{< CFEngine_function_attributes(url, options_container) >}}
**Example:**
diff --git a/reference/functions/usemodule.markdown b/content/reference/functions/usemodule.markdown
similarity index 77%
rename from reference/functions/usemodule.markdown
rename to content/reference/functions/usemodule.markdown
index 87cbea763..83557d37c 100644
--- a/reference/functions/usemodule.markdown
+++ b/content/reference/functions/usemodule.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: usemodule
-published: true
+aliases:
+ - "/reference-functions-usemodule.html"
---
-[%CFEngine_function_prototype(module, args)%]
+{{< CFEngine_function_prototype(module, args) >}}
**Description:** Execute CFEngine module script `module` with `args`, and
return whether successful.
@@ -12,7 +13,7 @@ return whether successful.
The module script is expected to be located in the registered modules
directory, `WORKDIR/modules`.
-[%CFEngine_function_attributes(module, args)%]
+{{< CFEngine_function_attributes(module, args) >}}
**Example:**
diff --git a/content/reference/functions/userexists.markdown b/content/reference/functions/userexists.markdown
new file mode 100644
index 000000000..e15d169c4
--- /dev/null
+++ b/content/reference/functions/userexists.markdown
@@ -0,0 +1,24 @@
+---
+layout: default
+title: userexists
+aliases:
+ - "/reference-functions-userexists.html"
+---
+
+{{< CFEngine_function_prototype(user) >}}
+
+**Description:** Return whether `user` name or numerical id exists on this
+host.
+
+Checks whether the user is in the password database for the current host. The
+argument must be a user name or user id.
+
+{{< CFEngine_function_attributes(user) >}}
+
+**Example:**
+
+{{< CFEngine_include_snippet(userexists.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(userexists.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
diff --git a/reference/functions/validdata.markdown b/content/reference/functions/validdata.markdown
similarity index 57%
rename from reference/functions/validdata.markdown
rename to content/reference/functions/validdata.markdown
index 1a1c483c3..c5f8f40f8 100644
--- a/reference/functions/validdata.markdown
+++ b/content/reference/functions/validdata.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: validdata
-published: true
+aliases:
+ - "/reference-functions-validdata.html"
---
-[%CFEngine_function_prototype(data_container, type)%]
+{{< CFEngine_function_prototype(data_container, type) >}}
**Description:** Validates a JSON container from `data_container` and returns
`true` if the contents are valid JSON.
@@ -13,17 +14,17 @@ This function is intended to be expanded with functionality for validating
CSV and YAML files eventually, mirroring `readdata()`. If `type` is `JSON`,
it behaves the same as `validjson()`.
-[%CFEngine_function_attributes(data_container, type)%]
+{{< CFEngine_function_attributes(data_container, type) >}}
**Example:**
Run:
-[%CFEngine_include_snippet(validdata.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(validdata.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(validdata.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(validdata.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** `readdata()`, `validjson()`
diff --git a/content/reference/functions/validjson.markdown b/content/reference/functions/validjson.markdown
new file mode 100644
index 000000000..2d772c4cc
--- /dev/null
+++ b/content/reference/functions/validjson.markdown
@@ -0,0 +1,27 @@
+---
+layout: default
+title: validjson
+aliases:
+ - "/reference-functions-validjson.html"
+---
+
+{{< CFEngine_function_prototype(string) >}}
+
+**Description:** Validates a JSON container from `string` and returns
+`true` if the contents are valid JSON.
+
+{{< CFEngine_function_attributes(string) >}}
+
+**Example:**
+
+Run:
+
+{{< CFEngine_include_snippet(validjson.cf, #\+begin_src cfengine3, .*end_src) >}}
+
+Output:
+
+{{< CFEngine_include_snippet(validjson.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
+
+**See also:** `readjson()`, `validdata()`
+
+**History:** Was introduced in 3.16.0.
diff --git a/reference/functions/variablesmatching.markdown b/content/reference/functions/variablesmatching.markdown
similarity index 77%
rename from reference/functions/variablesmatching.markdown
rename to content/reference/functions/variablesmatching.markdown
index fb689542f..b0485e979 100644
--- a/reference/functions/variablesmatching.markdown
+++ b/content/reference/functions/variablesmatching.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: variablesmatching
-published: true
+aliases:
+ - "/reference-functions-variablesmatching.html"
---
-[%CFEngine_function_prototype(name, tag1, tag2, ...)%]
+{{< CFEngine_function_prototype(name, tag1, tag2, ...) >}}
**Description:** Return the list of variables matching `name` and any tags
given. Both `name` and tags are regular expressions.
@@ -26,15 +27,15 @@ This function behaves exactly like `variablesmatching_as_data()` but returns
just the list of all the variables. If you want their contents as well, see that
function.
-[%CFEngine_function_attributes(regex, tag1, tag2, ...)%]
+{{< CFEngine_function_attributes(regex, tag1, tag2, ...) >}}
**Example:**
-[%CFEngine_include_snippet(variablesmatching.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(variablesmatching.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(variablesmatching.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(variablesmatching.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [classesmatching()][classesmatching], [bundlesmatching()][bundlesmatching], [variablesmatching_as_data()][variablesmatching_as_data]
diff --git a/reference/functions/variablesmatching_as_data.markdown b/content/reference/functions/variablesmatching_as_data.markdown
similarity index 77%
rename from reference/functions/variablesmatching_as_data.markdown
rename to content/reference/functions/variablesmatching_as_data.markdown
index a079e1a36..52df6b755 100644
--- a/reference/functions/variablesmatching_as_data.markdown
+++ b/content/reference/functions/variablesmatching_as_data.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: variablesmatching_as_data
-published: true
+aliases:
+ - "/reference-functions-variablesmatching_as_data.html"
---
-[%CFEngine_function_prototype(name, tag1, tag2, ...)%]
+{{< CFEngine_function_prototype(name, tag1, tag2, ...) >}}
**Description:** Return a data container with the map of variables matching
`name` and any tags given to the variable contents. Both `name` and tags are
@@ -27,15 +28,15 @@ This function behaves exactly like `variablesmatching()` but returns a data
container with the full contents of all the variables instead of just their
names.
-[%CFEngine_function_attributes(regex, tag1, tag2, ...)%]
+{{< CFEngine_function_attributes(regex, tag1, tag2, ...) >}}
**Example:**
-[%CFEngine_include_snippet(variablesmatching_as_data.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(variablesmatching_as_data.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(variablesmatching_as_data.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(variablesmatching_as_data.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [classesmatching()][classesmatching], [bundlesmatching()][bundlesmatching], [variablesmatching()][variablesmatching]
diff --git a/reference/functions/variance.markdown b/content/reference/functions/variance.markdown
similarity index 67%
rename from reference/functions/variance.markdown
rename to content/reference/functions/variance.markdown
index ab635cebe..a4b8498e8 100644
--- a/reference/functions/variance.markdown
+++ b/content/reference/functions/variance.markdown
@@ -1,16 +1,17 @@
---
layout: default
title: variance
-published: true
+aliases:
+ - "/reference-functions-variance.html"
---
-[%CFEngine_function_prototype(list)%]
+{{< CFEngine_function_prototype(list) >}}
**Description:** Return the variance of the numbers in `list`.
[This function can accept many types of data parameters.][Functions#collecting functions]
-[%CFEngine_function_attributes(list)%]
+{{< CFEngine_function_attributes(list) >}}
Use the `eval()` function to easily get the standard deviation (square root of the variance).
@@ -18,11 +19,11 @@ This is not part of a full statistical package but a convenience function.
**Example:**
-[%CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(max-min-mean-variance.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in version 3.6.0 (2014). The [collecting function][Functions#collecting functions] behavior was added in 3.9.
diff --git a/reference/functions/version_compare.markdown b/content/reference/functions/version_compare.markdown
similarity index 87%
rename from reference/functions/version_compare.markdown
rename to content/reference/functions/version_compare.markdown
index b85d18809..2997170e1 100644
--- a/reference/functions/version_compare.markdown
+++ b/content/reference/functions/version_compare.markdown
@@ -1,25 +1,26 @@
---
layout: default
title: version_compare
-published: true
+aliases:
+ - "/reference-functions-version_compare.html"
---
-[%CFEngine_function_prototype(version1, comparison, version2)%]
+{{< CFEngine_function_prototype(version1, comparison, version2) >}}
**Description:** Returns `true` if the specified version comparison expression is true.
-[%CFEngine_function_attributes(version1, comparison, version2)%]
+{{< CFEngine_function_attributes(version1, comparison, version2) >}}
The `version_compare()` function can be used to compare 2 arbitrary semver version numbers.
This can be useful if you have 2 versions of a package and you want to know if they are the same version, if one is newer than the other etc.
**Example:**
-[%CFEngine_include_snippet(version_compare.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(version_compare.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(version_compare.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(version_compare.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**Notes:**
diff --git a/reference/language-concepts.markdown b/content/reference/language-concepts/_index.markdown
similarity index 99%
rename from reference/language-concepts.markdown
rename to content/reference/language-concepts/_index.markdown
index 5e814a78d..869cfab01 100644
--- a/reference/language-concepts.markdown
+++ b/content/reference/language-concepts/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Language concepts
-published: true
sorting: 50
+aliases:
+ - "/reference-language-concepts.html"
---
There is only one grammatical form for statements in the language:
diff --git a/reference/language-concepts/augments.markdown b/content/reference/language-concepts/augments.markdown
similarity index 99%
rename from reference/language-concepts/augments.markdown
rename to content/reference/language-concepts/augments.markdown
index 4d618d2c5..ae9d076e1 100644
--- a/reference/language-concepts/augments.markdown
+++ b/content/reference/language-concepts/augments.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Augments
-published: true
sorting: 70
+aliases:
+ - "/reference-language-concepts-augments.html"
---
Augments files can be used to define variables and classes for use by
diff --git a/reference/language-concepts/bodies.markdown b/content/reference/language-concepts/bodies.markdown
similarity index 73%
rename from reference/language-concepts/bodies.markdown
rename to content/reference/language-concepts/bodies.markdown
index d992c1b06..592206f3e 100644
--- a/reference/language-concepts/bodies.markdown
+++ b/content/reference/language-concepts/bodies.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Bodies
-published: true
sorting: 20
+aliases:
+ - "/reference-language-concepts-bodies.html"
---
While the idea of a promise is very simple, the definition of a promise can
@@ -171,21 +172,57 @@ Agents][Components]
#### Default bodies
-CFEngine 3.9 introduced a way to create default bodies. It allows defining, for given
-promise and body types, a body that will be used each time no body is defined.
-To use a body as default, name it `_` and put it
-in the `bodydefault` namespace. For example, a default `action` body for `files`
-promises will be named `files_action`, and in each `files` promise, if no
-`action` attribute is set, the `files_action` action will be used.
+Default bodies are automatically attached to promises not already using that
+body in the default namespace. To use a body as default, name it
+`_` and put it in the `bodydefault` namespace.
+
+```cf3
+body file control
+{
+ # Default bodies /must/ be defined in the /bodydefault/ namespace
+ namespace => "bodydefault";
+}
+
+body _
+{
+ # Attributes set for body will be applied to all
+ # promises that do not already have a body of attached.
+}
+```
+
+For example, a default `action` body for `files` promises will be named
+`files_action`, and in each `files` promise, if no `action` attribute is set,
+the `files_action` action will be used.
**Note:** The default bodies **only** apply to promises in the `default` namespace.
In the following example, we define a default `action` body for `files`
-promises, that specifies an `action_policy => "warn"` to prevent actually modifying files
-and to only warn about considered modifications. We define it once,
-and don't have to explicitly put this body in all our `files` promises.
+promises, that specifies an `action_policy => "warn"` to prevent actually
+modifying files and to only warn about considered modifications. We define it
+once, and don't have to explicitly put this body in all our `files` promises.
+The example also illustrates how promises in a non-`default` namespace are
+unaffected.
```cf3
+bundle agent example
+{
+ files:
+
+ # Since the 'files_action' action body is defined in the 'bodydefault' namespce,
+ # and since this promise is in the 'default' namespace (no alternate namespace is
+ # declared previously) this promise will not actually modify the file content if
+ # it is not as promised. Instead it will warn that a change wants to be made.
+
+ "/etc/motd"
+ content => "There are, in fact, rules. You have been notified.";
+
+ # Since this promise has an action body attached, the default action body for
+ # files will not be applied and this file would be fixed.
+
+ "/etc/issue.net"
+ content => "WARNING: You are being monitored. We are all being monitored. This is a cry for help.",
+ action => if_elapsed_day;
+}
body file control
{
namespace => "bodydefault";
@@ -198,6 +235,17 @@ body action files_action
body file control
{
- namespace => "default";
+ namespace => "not_affected";
+}
+
+bundle agent not_affected
+{
+ files:
+ "/etc/not-affected-by-bodydefault-files-action-body"
+ content => "Hello world!";
}
```
+
+**History:**
+
+- Added in CFEngine 3.9.0
diff --git a/reference/language-concepts/bundles.markdown b/content/reference/language-concepts/bundles.markdown
similarity index 96%
rename from reference/language-concepts/bundles.markdown
rename to content/reference/language-concepts/bundles.markdown
index 9b3ad12c1..6f0db559c 100644
--- a/reference/language-concepts/bundles.markdown
+++ b/content/reference/language-concepts/bundles.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Bundles
-published: true
sorting: 10
+aliases:
+ - "/reference-language-concepts-bundles.html"
---
A bundle is a collection of promises. They allow to group related promises
@@ -169,11 +170,11 @@ namespace). You just say `namespace:bundle_name` instead of
When running `cf-agent`, the order of bundles to evaluate is determined by the `bundlesequence`.
The default `bundlesequence` contains `main` for convenience, so this example works:
-[%CFEngine_include_example(main.cf)%]
+{{< CFEngine_include_example(main.cf) >}}
#### Custom bundle sequences
You can specify a custom `bundlesequence` from the command line using `--bundlesequence`, or in policy:
-[%CFEngine_include_example(bundlesequence.cf)%]
+{{< CFEngine_include_example(bundlesequence.cf) >}}
In this example, cf-agent will not look for a `main` bundle, since it is not in the `bundlesequence`.
@@ -189,9 +190,9 @@ Each file can include its own testsuite or some default behavior in a `__main__`
All parts of the library will then be runnable directly, but also easy to include from other policy:
`main_library.cf`:
-[%CFEngine_include_example(main_library.cf)%]
+{{< CFEngine_include_example(main_library.cf) >}}
`main_entry_point.cf`:
-[%CFEngine_include_example(main_entry_point.cf)%]
+{{< CFEngine_include_example(main_entry_point.cf) >}}
Both of these policy files can be run directly, the included library policy will not have a `main` bundle.
diff --git a/reference/language-concepts/classes.markdown b/content/reference/language-concepts/classes.markdown
similarity index 99%
rename from reference/language-concepts/classes.markdown
rename to content/reference/language-concepts/classes.markdown
index cfdce53e8..525e35fdc 100644
--- a/reference/language-concepts/classes.markdown
+++ b/content/reference/language-concepts/classes.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Classes and decisions
-published: true
sorting: 50
+aliases:
+ - "/reference-language-concepts-classes.html"
---
Classes are used to apply promises only to particular environments, depending
@@ -298,7 +299,7 @@ Class guards are the most common way to restrict a promise to a specific context
This example illustrates how a class guard applies (to multiple promises) until a new context is specified.
-[%CFEngine_include_example(classes_context_applies_multiple_promises.cf)%]
+{{< CFEngine_include_example(classes_context_applies_multiple_promises.cf) >}}
Another Example:
@@ -463,7 +464,7 @@ are not automatically canonified when they are checked.
This example shows how classes are automatically canonified when they are
defined and that you must explicitly canonify when verifying classes.
-[%CFEngine_include_example(class-automatic-canonificiation.cf)%]
+{{< CFEngine_include_example(class-automatic-canonificiation.cf) >}}
## Operators and precedence
diff --git a/reference/language-concepts/loops.markdown b/content/reference/language-concepts/loops.markdown
similarity index 98%
rename from reference/language-concepts/loops.markdown
rename to content/reference/language-concepts/loops.markdown
index 00988847b..b3dcf5b64 100644
--- a/reference/language-concepts/loops.markdown
+++ b/content/reference/language-concepts/loops.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Loops
-published: true
sorting: 70
+aliases:
+ - "/reference-language-concepts-loops.html"
---
There are no explicit loops in CFEngine, instead there are lists. To make a
diff --git a/reference/language-concepts/modules.markdown b/content/reference/language-concepts/modules/_index.markdown
similarity index 98%
rename from reference/language-concepts/modules.markdown
rename to content/reference/language-concepts/modules/_index.markdown
index 85a2ede32..1acb236aa 100644
--- a/reference/language-concepts/modules.markdown
+++ b/content/reference/language-concepts/modules/_index.markdown
@@ -1,18 +1,19 @@
---
layout: default
title: Modules
-published: true
+aliases:
+ - "/reference-language-concepts-modules.html"
---
Modules allow users to extend the capabilities of CFEngine in a modular way, they can be easily added and upgraded independently of when you upgrade your CFEngine version. Several different types of modules are available.
-{% comment %}
+
## Promise modules
diff --git a/reference/language-concepts/modules/package-module-api.markdown b/content/reference/language-concepts/modules/package-module-api.markdown
similarity index 99%
rename from reference/language-concepts/modules/package-module-api.markdown
rename to content/reference/language-concepts/modules/package-module-api.markdown
index 7d7955bd6..1db1a59b4 100644
--- a/reference/language-concepts/modules/package-module-api.markdown
+++ b/content/reference/language-concepts/modules/package-module-api.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Package modules
-published: true
sorting: 70
+aliases:
+ - "/reference-language-concepts-modules-package-module-api.html"
---
Package modules are back-ends that enable the package promise to work
diff --git a/reference/language-concepts/namespaces.markdown b/content/reference/language-concepts/namespaces.markdown
similarity index 84%
rename from reference/language-concepts/namespaces.markdown
rename to content/reference/language-concepts/namespaces.markdown
index bfa099a3c..a557139f3 100644
--- a/reference/language-concepts/namespaces.markdown
+++ b/content/reference/language-concepts/namespaces.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Namespaces
-published: true
sorting: 100
+aliases:
+ - "/reference-language-concepts-namespaces.html"
---
By default all promises are made in the `default` namespace. Specifying a namespace
@@ -20,7 +21,7 @@ namespace applies within a single file to all subsequently defined bodies and bu
following the namespace declaration until a different namespace has been
declared or until the end of the file.
-[%CFEngine_include_example(namespace_declaration.cf)%]
+{{< CFEngine_include_example(namespace_declaration.cf) >}}
**Notes:**
@@ -35,7 +36,7 @@ the promiser. To refer to a bundle in another namespace you *must* specify the
namespace by prefixing the bundle name with the namespace followed by a colon
(`:`).
-[%CFEngine_include_example(namespace_methods-usebundle.cf)%]
+{{< CFEngine_include_example(namespace_methods-usebundle.cf) >}}
## Bodies
@@ -43,19 +44,19 @@ Bodies are assumed to be within the same namespace as the promiser. To use a bod
A common mistake is forgetting to specify `default:` when using bodies from the standard library which resides in the `default` namespace.
-[%CFEngine_include_example(namespace_bodies.cf)%]
+{{< CFEngine_include_example(namespace_bodies.cf) >}}
## Variables
Variables (except for [Special variables][Special variables]) are assumed to be within the same scope
as the promiser but can also be referenced fully qualified with the namespace.
-[%CFEngine_include_example(namespace_variable_references.cf)%]
+{{< CFEngine_include_example(namespace_variable_references.cf) >}}
[Special variables][Special variables] are always accessible without a namespace
prefix. For example, `this`, `mon`, `sys`, and `const` fall in this category.
-[%CFEngine_include_example(namespace_special_var_exception.cf)%]
+{{< CFEngine_include_example(namespace_special_var_exception.cf) >}}
**Notes:**
@@ -71,9 +72,9 @@ specified (except for Hard classes). To refer to a
class in a different namespace prefix the class with the namespace suffixed by a
colon (`:`).
-[%CFEngine_include_example(namespace_classes.cf)%]
+{{< CFEngine_include_example(namespace_classes.cf) >}}
[Hard classes][Classes and decisions#Hard classes] exist in all namespaces and
thus can be referred to from any namespace without qualification.
-[%CFEngine_include_example(namespace_hard_classes.cf)%]
+{{< CFEngine_include_example(namespace_hard_classes.cf) >}}
diff --git a/reference/language-concepts/normal-ordering.markdown b/content/reference/language-concepts/normal-ordering.markdown
similarity index 99%
rename from reference/language-concepts/normal-ordering.markdown
rename to content/reference/language-concepts/normal-ordering.markdown
index 9fea7ae42..17157c5ae 100644
--- a/reference/language-concepts/normal-ordering.markdown
+++ b/content/reference/language-concepts/normal-ordering.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Normal ordering
-published: true
sorting: 40
+aliases:
+ - "/reference-language-concepts-normal-ordering.html"
---
CFEngine takes a pragmatic point of view to ordering. When promising `scalar`
@@ -77,6 +78,7 @@ evaluation perspective as bundles placed in files included in body common
control inputs will be evaluated before bundles from file control inputs.
The following steps are executed per-bundle for each file parsed, in this order:
+
1. if it's a common bundle, evaluate **vars** promises
2. if it's a common bundle, evaluate **classes** promises
3. evaluate **vars** promises
diff --git a/reference/language-concepts/pattern-matching-and-referencing.markdown b/content/reference/language-concepts/pattern-matching-and-referencing.markdown
similarity index 99%
rename from reference/language-concepts/pattern-matching-and-referencing.markdown
rename to content/reference/language-concepts/pattern-matching-and-referencing.markdown
index 41b54703d..bbc32d7ec 100644
--- a/reference/language-concepts/pattern-matching-and-referencing.markdown
+++ b/content/reference/language-concepts/pattern-matching-and-referencing.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Pattern matching and referencing
-published: true
sorting: 80
+aliases:
+ - "/reference-language-concepts-pattern-matching-and-referencing.html"
---
One of the strengths of CFEngine 3 is the ability to recognize and exploit
diff --git a/reference/language-concepts/promises.markdown b/content/reference/language-concepts/promises.markdown
similarity index 99%
rename from reference/language-concepts/promises.markdown
rename to content/reference/language-concepts/promises.markdown
index ff7799400..809b2dc78 100644
--- a/reference/language-concepts/promises.markdown
+++ b/content/reference/language-concepts/promises.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Promises
-published: true
sorting: 30
+aliases:
+ - "/reference-language-concepts-promises.html"
---
One concept in CFEngine should stand out from the rest as being the most
diff --git a/reference/language-concepts/variables.markdown b/content/reference/language-concepts/variables.markdown
similarity index 97%
rename from reference/language-concepts/variables.markdown
rename to content/reference/language-concepts/variables.markdown
index ac0e2597b..a386eedc9 100644
--- a/reference/language-concepts/variables.markdown
+++ b/content/reference/language-concepts/variables.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Variables
-published: true
sorting: 60
+aliases:
+ - "/reference-language-concepts-variables.html"
---
Just like [classes][classes and decisions] are defined as
@@ -81,7 +82,7 @@ allows flexibilty when defining strings that contain quotes. Single or double
quotes can be escaped with `\` however, please note that backticks (`` ` ``) can **not**
be escaped.
-[%CFEngine_include_example(quoting.cf)%]
+{{< CFEngine_include_example(quoting.cf) >}}
### Scalar size limitations
@@ -161,7 +162,7 @@ They can **NOT** be *modified*, once created, but they can be re-defined.
Data containers do not have the size limitations of regular scalar
variables.
-[%CFEngine_include_example(reference_values_inside_data.cf)%]
+{{< CFEngine_include_example(reference_values_inside_data.cf) >}}
## Associative arrays
@@ -188,6 +189,6 @@ from array variables for iteration purposes.
**Example:**
-[%CFEngine_include_example(arrays.cf)%]
+{{< CFEngine_include_example(arrays.cf) >}}
**See also:** `getindices()`, `getvalues()`
diff --git a/reference/macros.markdown b/content/reference/macros.markdown
similarity index 99%
rename from reference/macros.markdown
rename to content/reference/macros.markdown
index e9fd45136..57dcb678d 100644
--- a/reference/macros.markdown
+++ b/content/reference/macros.markdown
@@ -2,8 +2,9 @@
layout: default
title: Macros
categories: [Reference, Macros]
-published: true
alias: reference-macros.html
+aliases:
+ - "/reference-macros.html"
---
Macros allow you to target different versions of the CFEngine binaries / parser.
diff --git a/content/reference/masterfiles-policy-framework/_index.markdown b/content/reference/masterfiles-policy-framework/_index.markdown
new file mode 100644
index 000000000..c90fa56fc
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/_index.markdown
@@ -0,0 +1,12 @@
+---
+layout: default
+title: Masterfiles Policy Framework
+sorting: 90
+aliases:
+ - "/reference-masterfiles-policy-framework.html"
+---
+
+The Masterfiles Policy Framework or MPF also commonly referred to as simply
+masterfiles is the policy framework that ships with CFEngine.
+
+{{< CFEngine_include_markdown(../../masterfiles/MPF.md) >}}
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-CFE_cfengine.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-CFE_cfengine.markdown
new file mode 100644
index 000000000..3fd9b751e
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-CFE_cfengine.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: cfe_internal/CFE_cfengine.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-CFE_cfengine.html"
+---
+
+{{< CFEngine_library_include(cfe_internal/CFE_cfengine) >}}
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-core-watchdog-watchdog.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-core-watchdog-watchdog.markdown
new file mode 100644
index 000000000..ccfb8cd0b
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-core-watchdog-watchdog.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: cfe_internal/core/watchdog/watchdog.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-core-watchdog-watchdog.html"
+---
+
+{{< CFEngine_library_include(cfe_internal/core/watchdog/watchdog) >}}
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-core-watchdog.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-core-watchdog.markdown
new file mode 100644
index 000000000..235d3ead9
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-core-watchdog.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: cfe_internal/core/watchdog
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-core-watchdog.html"
+---
+
+{{< CFEngine_include_markdown(../../masterfiles/cfe_internal/core/watchdog/README.md) >}}
diff --git a/reference/masterfiles-policy-framework/cfe_internal-core.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-core.markdown
similarity index 68%
rename from reference/masterfiles-policy-framework/cfe_internal-core.markdown
rename to content/reference/masterfiles-policy-framework/cfe_internal-core.markdown
index 50527465b..b6b1fcdbb 100644
--- a/reference/masterfiles-policy-framework/cfe_internal-core.markdown
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-core.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: cfe_internal/core/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-core.html"
---
This directory contains internal management polcies related to CFEngine
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-enterprise-federation-federation.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-enterprise-federation-federation.markdown
new file mode 100644
index 000000000..3c7e671a0
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-enterprise-federation-federation.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: cfe_internal/enterprise/federation/federation.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-enterprise-federation-federation.html"
+---
+
+This policy file handles Federated reporting setup and ongoing operations.
+
+{{< CFEngine_library_include(cfe_internal/enterprise/federation/federation) >}}
diff --git a/reference/masterfiles-policy-framework/cfe_internal-enterprise-federation.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-enterprise-federation.markdown
similarity index 68%
rename from reference/masterfiles-policy-framework/cfe_internal-enterprise-federation.markdown
rename to content/reference/masterfiles-policy-framework/cfe_internal-enterprise-federation.markdown
index 1954e7017..ab120b625 100644
--- a/reference/masterfiles-policy-framework/cfe_internal-enterprise-federation.markdown
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-enterprise-federation.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: cfe_internal/enterprise/federation/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-enterprise-federation.html"
---
This directory contains assets related to the function and configuration of [CFEngine Enterprise Federated reporting][Federated reporting].
diff --git a/reference/masterfiles-policy-framework/cfe_internal-enterprise.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-enterprise.markdown
similarity index 67%
rename from reference/masterfiles-policy-framework/cfe_internal-enterprise.markdown
rename to content/reference/masterfiles-policy-framework/cfe_internal-enterprise.markdown
index a90d170ce..b324d565f 100644
--- a/reference/masterfiles-policy-framework/cfe_internal-enterprise.markdown
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-enterprise.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: cfe_internal/enterprise/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-enterprise.html"
---
This directory contains internal management polcies related to CFEngine
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-recommendations.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-recommendations.markdown
new file mode 100644
index 000000000..393006d11
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-recommendations.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: cfe_internal/recommendations.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-recommendations.html"
+---
+
+{{< CFEngine_library_include(cfe_internal/recommendations) >}}
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-update-cfe_internal_dc_workflow.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-update-cfe_internal_dc_workflow.markdown
new file mode 100644
index 000000000..e6ce03b88
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-update-cfe_internal_dc_workflow.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: cfe_internal/update/cfe_internal_dc_workflow.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-update-cfe_internal_dc_workflow.html"
+---
+
+{{< CFEngine_library_include(cfe_internal/update/cfe_internal_dc_workflow) >}}
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-update-cfe_internal_update_from_repository.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-update-cfe_internal_update_from_repository.markdown
new file mode 100644
index 000000000..b60ae8804
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-update-cfe_internal_update_from_repository.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: cfe_internal/update/cfe_internal_update_from_repository.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-update-cfe_internal_update_from_repository.html"
+---
+
+{{< CFEngine_library_include(cfe_internal/update/cfe_internal_update_from_repository) >}}
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-update-lib.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-update-lib.markdown
new file mode 100644
index 000000000..39b2b9c96
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-update-lib.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: cfe_internal/update/lib.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-update-lib.html"
+---
+
+{{< CFEngine_library_include(cfe_internal/update/lib) >}}
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-update-systemd_units.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-update-systemd_units.markdown
new file mode 100644
index 000000000..2ec489e43
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-update-systemd_units.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: cfe_internal/update/systemd_units.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-update-systemd_units.html"
+---
+
+{{< CFEngine_library_include(cfe_internal/update/systemd_units) >}}
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-update-update_bins.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-update-update_bins.markdown
new file mode 100644
index 000000000..6c4842aa0
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-update-update_bins.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: cfe_internal/update/update_bins.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-update-update_bins.html"
+---
+
+{{< CFEngine_library_include(cfe_internal/update/update_bins) >}}
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-update-update_policy.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-update-update_policy.markdown
new file mode 100644
index 000000000..1a409a79e
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-update-update_policy.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: cfe_internal/update/update_policy.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-update-update_policy.html"
+---
+
+{{< CFEngine_library_include(cfe_internal/update/update_policy) >}}
diff --git a/content/reference/masterfiles-policy-framework/cfe_internal-update-update_processes.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-update-update_processes.markdown
new file mode 100644
index 000000000..7ed0af518
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-update-update_processes.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: cfe_internal/update/update_processes.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-update-update_processes.html"
+---
+
+{{< CFEngine_library_include(cfe_internal/update/update_processes) >}}
diff --git a/reference/masterfiles-policy-framework/cfe_internal-update.markdown b/content/reference/masterfiles-policy-framework/cfe_internal-update.markdown
similarity index 83%
rename from reference/masterfiles-policy-framework/cfe_internal-update.markdown
rename to content/reference/masterfiles-policy-framework/cfe_internal-update.markdown
index 53d4d2bc8..4b2e3be6b 100644
--- a/reference/masterfiles-policy-framework/cfe_internal-update.markdown
+++ b/content/reference/masterfiles-policy-framework/cfe_internal-update.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: cfe_internal/update/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal-update.html"
---
This directory contains internal management polcies related to the default
diff --git a/reference/masterfiles-policy-framework/cfe_internal.markdown b/content/reference/masterfiles-policy-framework/cfe_internal.markdown
similarity index 91%
rename from reference/masterfiles-policy-framework/cfe_internal.markdown
rename to content/reference/masterfiles-policy-framework/cfe_internal.markdown
index 5c29877d1..5f24ccc6e 100644
--- a/reference/masterfiles-policy-framework/cfe_internal.markdown
+++ b/content/reference/masterfiles-policy-framework/cfe_internal.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: cfe_internal/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-cfe_internal.html"
---
This directory contains policy related to the internal control and functioning
diff --git a/reference/masterfiles-policy-framework/controls-cf-hub.markdown b/content/reference/masterfiles-policy-framework/controls-cf-hub.markdown
similarity index 65%
rename from reference/masterfiles-policy-framework/controls-cf-hub.markdown
rename to content/reference/masterfiles-policy-framework/controls-cf-hub.markdown
index 8a6dd39fa..54f277f97 100644
--- a/reference/masterfiles-policy-framework/controls-cf-hub.markdown
+++ b/content/reference/masterfiles-policy-framework/controls-cf-hub.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: controls/cf_hub.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls-cf-hub.html"
---
This is where `body hub control` is defined. `body hub control` is where
@@ -9,4 +10,4 @@ various settings related to `cf-hub` can be tuned.
Note: `cf-hub` is only available in CFEngine Enterprise.
-[%CFEngine_library_include(controls/cf_hub)%]
+{{< CFEngine_library_include(controls/cf_hub) >}}
diff --git a/reference/masterfiles-policy-framework/controls-cf_agent.markdown b/content/reference/masterfiles-policy-framework/controls-cf_agent.markdown
similarity index 58%
rename from reference/masterfiles-policy-framework/controls-cf_agent.markdown
rename to content/reference/masterfiles-policy-framework/controls-cf_agent.markdown
index 3d3387117..6acb09a5c 100644
--- a/reference/masterfiles-policy-framework/controls-cf_agent.markdown
+++ b/content/reference/masterfiles-policy-framework/controls-cf_agent.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: controls/cf_agent.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls-cf_agent.html"
---
This is where `body agent control` is defined. `body agent control` is where
various settings related to `cf-agent` can be tuned.
-[%CFEngine_library_include(controls/cf_agent)%]
+{{< CFEngine_library_include(controls/cf_agent) >}}
diff --git a/reference/masterfiles-policy-framework/controls-cf_execd.markdown b/content/reference/masterfiles-policy-framework/controls-cf_execd.markdown
similarity index 59%
rename from reference/masterfiles-policy-framework/controls-cf_execd.markdown
rename to content/reference/masterfiles-policy-framework/controls-cf_execd.markdown
index 65c42fed1..b5e4278e0 100644
--- a/reference/masterfiles-policy-framework/controls-cf_execd.markdown
+++ b/content/reference/masterfiles-policy-framework/controls-cf_execd.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: controls/cf_execd.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls-cf_execd.html"
---
This is where `body executor control` is defined. `body executor control` is where
various settings related to `cf-execd` can be tuned.
-[%CFEngine_library_include(controls/cf_execd)%]
+{{< CFEngine_library_include(controls/cf_execd) >}}
diff --git a/reference/masterfiles-policy-framework/controls-cf_monitord.markdown b/content/reference/masterfiles-policy-framework/controls-cf_monitord.markdown
similarity index 58%
rename from reference/masterfiles-policy-framework/controls-cf_monitord.markdown
rename to content/reference/masterfiles-policy-framework/controls-cf_monitord.markdown
index b80a80469..cd5cfddff 100644
--- a/reference/masterfiles-policy-framework/controls-cf_monitord.markdown
+++ b/content/reference/masterfiles-policy-framework/controls-cf_monitord.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: controls/cf_monitord.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls-cf_monitord.html"
---
This is where `body monitor control` is defined. `body monitor control` is where
various settings related to `cf-monitord` can be tuned.
-[%CFEngine_library_include(controls/cf_monitord)%]
+{{< CFEngine_library_include(controls/cf_monitord) >}}
diff --git a/reference/masterfiles-policy-framework/controls-cf_runagent.markdown b/content/reference/masterfiles-policy-framework/controls-cf_runagent.markdown
similarity index 70%
rename from reference/masterfiles-policy-framework/controls-cf_runagent.markdown
rename to content/reference/masterfiles-policy-framework/controls-cf_runagent.markdown
index ecda64ff1..c6d49d5f7 100644
--- a/reference/masterfiles-policy-framework/controls-cf_runagent.markdown
+++ b/content/reference/masterfiles-policy-framework/controls-cf_runagent.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: controls/cf_runagent.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls-cf_runagent.html"
---
This is where `body runagent control` is defined. `body runagent control` is where
@@ -9,4 +10,4 @@ various settings related to `cf-runagent` can be tuned.
**See also:** [Run agent on multiple hosts sharing a class][Manual Execution#Remote agent run for many hosts sharing a class]
-[%CFEngine_library_include(controls/cf_runagent)%]
+{{< CFEngine_library_include(controls/cf_runagent) >}}
diff --git a/reference/masterfiles-policy-framework/controls-cf_serverd.markdown b/content/reference/masterfiles-policy-framework/controls-cf_serverd.markdown
similarity index 58%
rename from reference/masterfiles-policy-framework/controls-cf_serverd.markdown
rename to content/reference/masterfiles-policy-framework/controls-cf_serverd.markdown
index 0f69edde8..95eea2c43 100644
--- a/reference/masterfiles-policy-framework/controls-cf_serverd.markdown
+++ b/content/reference/masterfiles-policy-framework/controls-cf_serverd.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: controls/cf_serverd.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls-cf_serverd.html"
---
This is where `body server control` is defined. `body server control` is where
various settings related to `cf-serverd` can be tuned.
-[%CFEngine_library_include(controls/cf_serverd)%]
+{{< CFEngine_library_include(controls/cf_serverd) >}}
diff --git a/reference/masterfiles-policy-framework/controls-def.markdown b/content/reference/masterfiles-policy-framework/controls-def.markdown
similarity index 58%
rename from reference/masterfiles-policy-framework/controls-def.markdown
rename to content/reference/masterfiles-policy-framework/controls-def.markdown
index 104555bc7..6e2400f4b 100644
--- a/reference/masterfiles-policy-framework/controls-def.markdown
+++ b/content/reference/masterfiles-policy-framework/controls-def.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: controls/def.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls-def.html"
---
This is where most common variables and classes are defined. Note its variable scope can be augmented with `def.json`.
-[%CFEngine_library_include(controls/def)%]
+{{< CFEngine_library_include(controls/def) >}}
diff --git a/reference/masterfiles-policy-framework/controls-def_inputs.markdown b/content/reference/masterfiles-policy-framework/controls-def_inputs.markdown
similarity index 53%
rename from reference/masterfiles-policy-framework/controls-def_inputs.markdown
rename to content/reference/masterfiles-policy-framework/controls-def_inputs.markdown
index 6e4346263..19da41be1 100644
--- a/reference/masterfiles-policy-framework/controls-def_inputs.markdown
+++ b/content/reference/masterfiles-policy-framework/controls-def_inputs.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: controls/def_inputs.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls-def_inputs.html"
---
This is where the list of policy files to include as defined from the augments
file is included.
-[%CFEngine_library_include(controls/def_inputs)%]
+{{< CFEngine_library_include(controls/def_inputs) >}}
diff --git a/reference/masterfiles-policy-framework/controls-reports.markdown b/content/reference/masterfiles-policy-framework/controls-reports.markdown
similarity index 72%
rename from reference/masterfiles-policy-framework/controls-reports.markdown
rename to content/reference/masterfiles-policy-framework/controls-reports.markdown
index bcfd17adc..afd1db7f3 100644
--- a/reference/masterfiles-policy-framework/controls-reports.markdown
+++ b/content/reference/masterfiles-policy-framework/controls-reports.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: controls/reports.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls-reports.html"
---
This is where report settings for CFEngine Enterprise are found. Control which
@@ -9,4 +10,4 @@ variables and classes should be collected by central reporting based on tags
that should be included or excluded. It also controls which measuremtnts taken
by `cf-monitord` will be collected for central reporting.
-[%CFEngine_library_include(controls/reports)%]
+{{< CFEngine_library_include(controls/reports) >}}
diff --git a/reference/masterfiles-policy-framework/controls-update_def.markdown b/content/reference/masterfiles-policy-framework/controls-update_def.markdown
similarity index 59%
rename from reference/masterfiles-policy-framework/controls-update_def.markdown
rename to content/reference/masterfiles-policy-framework/controls-update_def.markdown
index 8117e51ac..1c6822371 100644
--- a/reference/masterfiles-policy-framework/controls-update_def.markdown
+++ b/content/reference/masterfiles-policy-framework/controls-update_def.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: controls/update_def.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls-update_def.html"
---
This is where most common variables and classes are defined for the update
policy. Note its variable scope can be augmented with `def.json`.
-[%CFEngine_library_include(controls/update_def)%]
+{{< CFEngine_library_include(controls/update_def) >}}
diff --git a/reference/masterfiles-policy-framework/controls-update_def_inputs.markdown b/content/reference/masterfiles-policy-framework/controls-update_def_inputs.markdown
similarity index 54%
rename from reference/masterfiles-policy-framework/controls-update_def_inputs.markdown
rename to content/reference/masterfiles-policy-framework/controls-update_def_inputs.markdown
index 71762a22f..927dbbb33 100644
--- a/reference/masterfiles-policy-framework/controls-update_def_inputs.markdown
+++ b/content/reference/masterfiles-policy-framework/controls-update_def_inputs.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: controls/update_def_inputs.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls-update_def_inputs.html"
---
This is where the list of update related policy files to include as defined
from the augments file is included.
-[%CFEngine_library_include(controls/update_def_inputs)%]
+{{< CFEngine_library_include(controls/update_def_inputs) >}}
diff --git a/reference/masterfiles-policy-framework/controls.markdown b/content/reference/masterfiles-policy-framework/controls.markdown
similarity index 87%
rename from reference/masterfiles-policy-framework/controls.markdown
rename to content/reference/masterfiles-policy-framework/controls.markdown
index c1989ec3f..12410722e 100644
--- a/reference/masterfiles-policy-framework/controls.markdown
+++ b/content/reference/masterfiles-policy-framework/controls.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: controls/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-controls.html"
---
This directory contains policy related to the internal control and functioning
diff --git a/reference/masterfiles-policy-framework/inventory-any.markdown b/content/reference/masterfiles-policy-framework/inventory-any.markdown
similarity index 80%
rename from reference/masterfiles-policy-framework/inventory-any.markdown
rename to content/reference/masterfiles-policy-framework/inventory-any.markdown
index 8da56d649..bf34cbc18 100644
--- a/reference/masterfiles-policy-framework/inventory-any.markdown
+++ b/content/reference/masterfiles-policy-framework/inventory-any.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: inventory/any.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory-any.html"
---
This policy is inventory related policy that can be run on any OS. This
@@ -11,4 +12,4 @@ these inventoried variables and classes are automatically collected into a
centralized reporting system. In the CFEngine Community Edition these variables
are availbale from within policy, and may be reporting in numerous ways.
-[%CFEngine_library_include(inventory/any)%]
+{{< CFEngine_library_include(inventory/any) >}}
diff --git a/content/reference/masterfiles-policy-framework/inventory-debian.markdown b/content/reference/masterfiles-policy-framework/inventory-debian.markdown
new file mode 100644
index 000000000..aafc441ba
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/inventory-debian.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: inventory/debian.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory-debian.html"
+---
+
+This policy is inventory related to debian hosts.
+
+{{< CFEngine_library_include(inventory/debian) >}}
diff --git a/content/reference/masterfiles-policy-framework/inventory-freebsd.markdown b/content/reference/masterfiles-policy-framework/inventory-freebsd.markdown
new file mode 100644
index 000000000..b11b80b08
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/inventory-freebsd.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: inventory/freebsd.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory-freebsd.html"
+---
+
+This policy is inventory related to freebsd hosts.
+
+{{< CFEngine_library_include(inventory/freebsd) >}}
diff --git a/content/reference/masterfiles-policy-framework/inventory-generic.markdown b/content/reference/masterfiles-policy-framework/inventory-generic.markdown
new file mode 100644
index 000000000..c2cfb6328
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/inventory-generic.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: inventory/generic.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory-generic.html"
+---
+
+This policy is inventory related to generic hosts.
+
+{{< CFEngine_library_include(inventory/generic) >}}
diff --git a/content/reference/masterfiles-policy-framework/inventory-linux.markdown b/content/reference/masterfiles-policy-framework/inventory-linux.markdown
new file mode 100644
index 000000000..adf2c97d3
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/inventory-linux.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: inventory/linux.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory-linux.html"
+---
+
+This policy is inventory related to linux hosts.
+
+{{< CFEngine_library_include(inventory/linux) >}}
diff --git a/content/reference/masterfiles-policy-framework/inventory-lsb.markdown b/content/reference/masterfiles-policy-framework/inventory-lsb.markdown
new file mode 100644
index 000000000..5e51ecf4a
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/inventory-lsb.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: inventory/lsb.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory-lsb.html"
+---
+
+This policy is inventory related to lsb hosts.
+
+{{< CFEngine_library_include(inventory/lsb) >}}
diff --git a/content/reference/masterfiles-policy-framework/inventory-macos.markdown b/content/reference/masterfiles-policy-framework/inventory-macos.markdown
new file mode 100644
index 000000000..c6a7f16fd
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/inventory-macos.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: inventory/macos.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory-macos.html"
+---
+
+This policy is inventory related to macos hosts.
+
+{{< CFEngine_library_include(inventory/macos) >}}
diff --git a/content/reference/masterfiles-policy-framework/inventory-os.markdown b/content/reference/masterfiles-policy-framework/inventory-os.markdown
new file mode 100644
index 000000000..1c5f5454a
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/inventory-os.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: inventory/os.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory-os.html"
+---
+
+This policy is inventory related to os hosts.
+
+{{< CFEngine_library_include(inventory/os) >}}
diff --git a/content/reference/masterfiles-policy-framework/inventory-redhat.markdown b/content/reference/masterfiles-policy-framework/inventory-redhat.markdown
new file mode 100644
index 000000000..2baae1ae0
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/inventory-redhat.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: inventory/redhat.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory-redhat.html"
+---
+
+This policy is inventory related to redhat hosts.
+
+{{< CFEngine_library_include(inventory/redhat) >}}
diff --git a/content/reference/masterfiles-policy-framework/inventory-suse.markdown b/content/reference/masterfiles-policy-framework/inventory-suse.markdown
new file mode 100644
index 000000000..ed9ce55e4
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/inventory-suse.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: inventory/suse.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory-suse.html"
+---
+
+This policy is inventory related to suse hosts.
+
+{{< CFEngine_library_include(inventory/suse) >}}
diff --git a/content/reference/masterfiles-policy-framework/inventory-windows.markdown b/content/reference/masterfiles-policy-framework/inventory-windows.markdown
new file mode 100644
index 000000000..13b682265
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/inventory-windows.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: inventory/windows.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory-windows.html"
+---
+
+This policy is inventory related to windows hosts.
+
+{{< CFEngine_library_include(inventory/windows) >}}
diff --git a/content/reference/masterfiles-policy-framework/inventory.markdown b/content/reference/masterfiles-policy-framework/inventory.markdown
new file mode 100644
index 000000000..6e911a3ad
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/inventory.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: inventory/
+aliases:
+ - "/reference-masterfiles-policy-framework-inventory.html"
+---
+
+{{< CFEngine_include_markdown(../../masterfiles/inventory/README.md) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-autorun.markdown b/content/reference/masterfiles-policy-framework/lib-autorun.markdown
new file mode 100644
index 000000000..14abd08e1
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-autorun.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/autorun.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-autorun.html"
+---
+
+{{< CFEngine_library_include(lib/autorun) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-bundles.markdown b/content/reference/masterfiles-policy-framework/lib-bundles.markdown
new file mode 100644
index 000000000..952b02dc3
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-bundles.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/bundles.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-bundles.html"
+---
+
+{{< CFEngine_library_include(lib/bundles) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-cfe_internal.markdown b/content/reference/masterfiles-policy-framework/lib-cfe_internal.markdown
new file mode 100644
index 000000000..19b822050
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-cfe_internal.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/cfe_internal.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-cfe_internal.html"
+---
+
+{{< CFEngine_library_include(lib/cfe_internal) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-cfe_internal_hub.markdown b/content/reference/masterfiles-policy-framework/lib-cfe_internal_hub.markdown
new file mode 100644
index 000000000..f82d377ee
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-cfe_internal_hub.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/cfe_internal_hub.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-cfe_internal_hub.html"
+---
+
+{{< CFEngine_library_include(lib/cfe_internal_hub) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-cfengine_enterprise_hub_ha.markdown b/content/reference/masterfiles-policy-framework/lib-cfengine_enterprise_hub_ha.markdown
new file mode 100644
index 000000000..7ca8c7813
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-cfengine_enterprise_hub_ha.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/cfengine_enterprise_hub_ha.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-cfengine_enterprise_hub_ha.html"
+---
+
+{{< CFEngine_library_include(lib/cfengine_enterprise_hub_ha) >}}
diff --git a/reference/masterfiles-policy-framework/lib-commands.markdown b/content/reference/masterfiles-policy-framework/lib-commands.markdown
similarity index 59%
rename from reference/masterfiles-policy-framework/lib-commands.markdown
rename to content/reference/masterfiles-policy-framework/lib-commands.markdown
index c5521565c..ef27a7509 100644
--- a/reference/masterfiles-policy-framework/lib-commands.markdown
+++ b/content/reference/masterfiles-policy-framework/lib-commands.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: lib/commands.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-commands.html"
---
See the [`commands` promises][commands] documentation for a
comprehensive reference on the body types and attributes used here.
-[%CFEngine_library_include(lib/commands)%]
+{{< CFEngine_library_include(lib/commands) >}}
diff --git a/reference/masterfiles-policy-framework/lib-common.markdown b/content/reference/masterfiles-policy-framework/lib-common.markdown
similarity index 64%
rename from reference/masterfiles-policy-framework/lib-common.markdown
rename to content/reference/masterfiles-policy-framework/lib-common.markdown
index 9c981d99f..1348a15d7 100644
--- a/reference/masterfiles-policy-framework/lib-common.markdown
+++ b/content/reference/masterfiles-policy-framework/lib-common.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: lib/common.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-common.html"
---
See
@@ -9,4 +10,4 @@ the [common promise attributes][Promise types#Common promise attributes]
documentation for a comprehensive reference on the body types and attributes
used here.
-[%CFEngine_library_include(lib/common)%]
+{{< CFEngine_library_include(lib/common) >}}
diff --git a/reference/masterfiles-policy-framework/lib-databases.markdown b/content/reference/masterfiles-policy-framework/lib-databases.markdown
similarity index 59%
rename from reference/masterfiles-policy-framework/lib-databases.markdown
rename to content/reference/masterfiles-policy-framework/lib-databases.markdown
index c5d60907a..497bcdf41 100644
--- a/reference/masterfiles-policy-framework/lib-databases.markdown
+++ b/content/reference/masterfiles-policy-framework/lib-databases.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: lib/databases.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-databases.html"
---
See the [`databases` promises][databases] documentation for a
comprehensive reference on the body types and attributes used here.
-[%CFEngine_library_include(lib/databases)%]
+{{< CFEngine_library_include(lib/databases) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-edit_xml.markdown b/content/reference/masterfiles-policy-framework/lib-edit_xml.markdown
new file mode 100644
index 000000000..bdd6bca6c
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-edit_xml.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/edit_xml.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-edit_xml.html"
+---
+
+{{< CFEngine_library_include(lib/edit_xml) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-event.markdown b/content/reference/masterfiles-policy-framework/lib-event.markdown
new file mode 100644
index 000000000..8f393407d
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-event.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/event.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-event.html"
+---
+
+{{< CFEngine_library_include(lib/event) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-examples.markdown b/content/reference/masterfiles-policy-framework/lib-examples.markdown
new file mode 100644
index 000000000..069f68472
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-examples.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/examples.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-examples.html"
+---
+
+{{< CFEngine_library_include(lib/examples) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-feature.markdown b/content/reference/masterfiles-policy-framework/lib-feature.markdown
new file mode 100644
index 000000000..01109300b
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-feature.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/feature.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-feature.html"
+---
+
+{{< CFEngine_library_include(lib/feature) >}}
diff --git a/reference/masterfiles-policy-framework/lib-files.markdown b/content/reference/masterfiles-policy-framework/lib-files.markdown
similarity index 65%
rename from reference/masterfiles-policy-framework/lib-files.markdown
rename to content/reference/masterfiles-policy-framework/lib-files.markdown
index e0ae675e5..8f63551e1 100644
--- a/reference/masterfiles-policy-framework/lib-files.markdown
+++ b/content/reference/masterfiles-policy-framework/lib-files.markdown
@@ -1,11 +1,12 @@
---
layout: default
title: lib/files.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-files.html"
---
See the [`files` promises][files] and [`edit_line` bundles][edit_line]
documentation for a comprehensive reference on
the bundles, body types, and attributes used here.
-[%CFEngine_library_include(lib/files)%]
+{{< CFEngine_library_include(lib/files) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-guest_environments.markdown b/content/reference/masterfiles-policy-framework/lib-guest_environments.markdown
new file mode 100644
index 000000000..1ad9ed82a
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-guest_environments.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/guest_environments.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-guest_environments.html"
+---
+
+{{< CFEngine_library_include(lib/guest_environments) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-monitor.markdown b/content/reference/masterfiles-policy-framework/lib-monitor.markdown
new file mode 100644
index 000000000..2317222b9
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-monitor.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/monitor.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-monitor.html"
+---
+
+{{< CFEngine_library_include(lib/monitor) >}}
diff --git a/reference/masterfiles-policy-framework/lib-packages.markdown b/content/reference/masterfiles-policy-framework/lib-packages.markdown
similarity index 59%
rename from reference/masterfiles-policy-framework/lib-packages.markdown
rename to content/reference/masterfiles-policy-framework/lib-packages.markdown
index 7a7f0fbda..3e086142d 100644
--- a/reference/masterfiles-policy-framework/lib-packages.markdown
+++ b/content/reference/masterfiles-policy-framework/lib-packages.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: lib/packages.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-packages.html"
---
See the [`packages` promises][packages] documentation for a
comprehensive reference on the body types and attributes used here.
-[%CFEngine_library_include(lib/packages)%]
+{{< CFEngine_library_include(lib/packages) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-paths.markdown b/content/reference/masterfiles-policy-framework/lib-paths.markdown
new file mode 100644
index 000000000..58b54ecc3
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-paths.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/paths.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-paths.html"
+---
+
+{{< CFEngine_library_include(lib/paths) >}}
diff --git a/reference/masterfiles-policy-framework/lib-processes.markdown b/content/reference/masterfiles-policy-framework/lib-processes.markdown
similarity index 59%
rename from reference/masterfiles-policy-framework/lib-processes.markdown
rename to content/reference/masterfiles-policy-framework/lib-processes.markdown
index cf237bc4e..d5c92e37e 100644
--- a/reference/masterfiles-policy-framework/lib-processes.markdown
+++ b/content/reference/masterfiles-policy-framework/lib-processes.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: lib/processes.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-processes.html"
---
See the [`processes` promises][processes] documentation for a
comprehensive reference on the body types and attributes used here.
-[%CFEngine_library_include(lib/processes)%]
+{{< CFEngine_library_include(lib/processes) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-reports.markdown b/content/reference/masterfiles-policy-framework/lib-reports.markdown
new file mode 100644
index 000000000..2a1db81c7
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-reports.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/reports.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-reports.html"
+---
+
+{{< CFEngine_library_include(lib/reports) >}}
diff --git a/reference/masterfiles-policy-framework/lib-services.markdown b/content/reference/masterfiles-policy-framework/lib-services.markdown
similarity index 59%
rename from reference/masterfiles-policy-framework/lib-services.markdown
rename to content/reference/masterfiles-policy-framework/lib-services.markdown
index b00f1f361..859c75bcb 100644
--- a/reference/masterfiles-policy-framework/lib-services.markdown
+++ b/content/reference/masterfiles-policy-framework/lib-services.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: lib/services.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-services.html"
---
See the [`services` promises][services] documentation for a
comprehensive reference on the body types and attributes used here.
-[%CFEngine_library_include(lib/services)%]
+{{< CFEngine_library_include(lib/services) >}}
diff --git a/content/reference/masterfiles-policy-framework/lib-stdlib.markdown b/content/reference/masterfiles-policy-framework/lib-stdlib.markdown
new file mode 100644
index 000000000..6c430f48e
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/lib-stdlib.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: lib/stdlib.cf
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-stdlib.html"
+---
+
+{{< CFEngine_library_include(lib/stdlib) >}}
diff --git a/reference/masterfiles-policy-framework/lib-storage.markdown b/content/reference/masterfiles-policy-framework/lib-storage.markdown
similarity index 59%
rename from reference/masterfiles-policy-framework/lib-storage.markdown
rename to content/reference/masterfiles-policy-framework/lib-storage.markdown
index 3bf6bedb0..4271a0203 100644
--- a/reference/masterfiles-policy-framework/lib-storage.markdown
+++ b/content/reference/masterfiles-policy-framework/lib-storage.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: lib/storage.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-storage.html"
---
See the [`storage` promises][storage] documentation for a
comprehensive reference on the body types and attributes used here.
-[%CFEngine_library_include(lib/storage)%]
+{{< CFEngine_library_include(lib/storage) >}}
diff --git a/reference/masterfiles-policy-framework/lib-testing.markdown b/content/reference/masterfiles-policy-framework/lib-testing.markdown
similarity index 62%
rename from reference/masterfiles-policy-framework/lib-testing.markdown
rename to content/reference/masterfiles-policy-framework/lib-testing.markdown
index 68b7c5a5c..083479e29 100644
--- a/reference/masterfiles-policy-framework/lib-testing.markdown
+++ b/content/reference/masterfiles-policy-framework/lib-testing.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: lib/testing.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-testing.html"
---
The `testing.cf` library provides bundles for working testing frameworks like
@@ -9,4 +10,4 @@ TAP and jUnit.
These bodies are included in the stdlib by default.
-[%CFEngine_library_include(lib/testing)%]
+{{< CFEngine_library_include(lib/testing) >}}
diff --git a/reference/masterfiles-policy-framework/lib-users.markdown b/content/reference/masterfiles-policy-framework/lib-users.markdown
similarity index 59%
rename from reference/masterfiles-policy-framework/lib-users.markdown
rename to content/reference/masterfiles-policy-framework/lib-users.markdown
index a2dad9617..d7c644ec5 100644
--- a/reference/masterfiles-policy-framework/lib-users.markdown
+++ b/content/reference/masterfiles-policy-framework/lib-users.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: lib/users.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-users.html"
---
See the [`users` promises][users] documentation for a
comprehensive reference on the body types and attributes used here.
-[%CFEngine_library_include(lib/users)%]
+{{< CFEngine_library_include(lib/users) >}}
diff --git a/reference/masterfiles-policy-framework/lib-vcs.markdown b/content/reference/masterfiles-policy-framework/lib-vcs.markdown
similarity index 52%
rename from reference/masterfiles-policy-framework/lib-vcs.markdown
rename to content/reference/masterfiles-policy-framework/lib-vcs.markdown
index 7bb9874da..06d60f57f 100644
--- a/reference/masterfiles-policy-framework/lib-vcs.markdown
+++ b/content/reference/masterfiles-policy-framework/lib-vcs.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: lib/vcs.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib-vcs.html"
---
The `vcs.cf` library provides bundles for working with version control tools.
-[%CFEngine_library_include(lib/vcs)%]
+{{< CFEngine_library_include(lib/vcs) >}}
diff --git a/reference/masterfiles-policy-framework/lib.markdown b/content/reference/masterfiles-policy-framework/lib.markdown
similarity index 74%
rename from reference/masterfiles-policy-framework/lib.markdown
rename to content/reference/masterfiles-policy-framework/lib.markdown
index 075dcab40..9eaaed239 100644
--- a/reference/masterfiles-policy-framework/lib.markdown
+++ b/content/reference/masterfiles-policy-framework/lib.markdown
@@ -1,10 +1,11 @@
---
layout: default
title: lib/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-lib.html"
---
-This directory contains the standard library akak COPBL or the Community Open
+This directory contains the standard library aka COPBL or the Community Open
Promise Body Library. The bodies and bundles found here are contributed and
maintained by the CFEngine community. They codify many common and useful
patterns.
diff --git a/content/reference/masterfiles-policy-framework/modules-mustache.markdown b/content/reference/masterfiles-policy-framework/modules-mustache.markdown
new file mode 100644
index 000000000..92d1fd655
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/modules-mustache.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: modules/mustache/
+aliases:
+ - "/reference-masterfiles-policy-framework-modules-mustache.html"
+---
+
+{{< CFEngine_include_markdown(../../masterfiles/modules/mustache/README.md) >}}
diff --git a/reference/masterfiles-policy-framework/modules-packages-vendored.markdown b/content/reference/masterfiles-policy-framework/modules-packages-vendored.markdown
similarity index 75%
rename from reference/masterfiles-policy-framework/modules-packages-vendored.markdown
rename to content/reference/masterfiles-policy-framework/modules-packages-vendored.markdown
index ae39f8663..b7545c889 100644
--- a/reference/masterfiles-policy-framework/modules-packages-vendored.markdown
+++ b/content/reference/masterfiles-policy-framework/modules-packages-vendored.markdown
@@ -1,6 +1,7 @@
---
layout: default
title: modules/packages/vendored/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-modules-packages-vendored.html"
---
This directory tree is used for distributing package modules that are rendered into place with mustache. The modules found here are rendered into place if no plain copy is found in the parent directory.
diff --git a/reference/masterfiles-policy-framework/modules-packages.markdown b/content/reference/masterfiles-policy-framework/modules-packages.markdown
similarity index 83%
rename from reference/masterfiles-policy-framework/modules-packages.markdown
rename to content/reference/masterfiles-policy-framework/modules-packages.markdown
index cef683896..31bbb0957 100644
--- a/reference/masterfiles-policy-framework/modules-packages.markdown
+++ b/content/reference/masterfiles-policy-framework/modules-packages.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: modules/packages/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-modules-packages.html"
---
This directory tree is used for distributing package modules.
diff --git a/content/reference/masterfiles-policy-framework/modules-promises-cfengine.py.markdown b/content/reference/masterfiles-policy-framework/modules-promises-cfengine.py.markdown
new file mode 100644
index 000000000..63893f11f
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/modules-promises-cfengine.py.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: modules/promises/cfengine.py
+aliases:
+ - "/reference-masterfiles-policy-framework-modules-promises-cfengine.py.html"
+---
+
+```
+{{< CFEngine_include_markdown(../../masterfiles/modules/promises/cfengine.py) >}}
+```
diff --git a/content/reference/masterfiles-policy-framework/modules-promises-cfengine.sh.markdown b/content/reference/masterfiles-policy-framework/modules-promises-cfengine.sh.markdown
new file mode 100644
index 000000000..c573e8b4b
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/modules-promises-cfengine.sh.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: modules/promises/cfengine.sh
+aliases:
+ - "/reference-masterfiles-policy-framework-modules-promises-cfengine.sh.html"
+---
+
+```
+{{< CFEngine_include_markdown(../../masterfiles/modules/promises/cfengine.sh) >}}
+```
diff --git a/reference/masterfiles-policy-framework/modules-promises.markdown b/content/reference/masterfiles-policy-framework/modules-promises.markdown
similarity index 84%
rename from reference/masterfiles-policy-framework/modules-promises.markdown
rename to content/reference/masterfiles-policy-framework/modules-promises.markdown
index 66e7f2467..772efab1d 100644
--- a/reference/masterfiles-policy-framework/modules-promises.markdown
+++ b/content/reference/masterfiles-policy-framework/modules-promises.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: modules/promises/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-modules-promises.html"
---
This directory tree is used for distributing promise modules and supporting libraries.
diff --git a/reference/masterfiles-policy-framework/modules.markdown b/content/reference/masterfiles-policy-framework/modules.markdown
similarity index 87%
rename from reference/masterfiles-policy-framework/modules.markdown
rename to content/reference/masterfiles-policy-framework/modules.markdown
index df704fb7e..88b5fd6b9 100644
--- a/reference/masterfiles-policy-framework/modules.markdown
+++ b/content/reference/masterfiles-policy-framework/modules.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: modules/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-modules.html"
---
This directory tree is used for distributing Modules. The [packages subtree][modules/packages/] is used for vendoring packages modules and the [promises sub-directory][modules/promises/] is used for promise modules, including the libraries used by promise modules.
diff --git a/content/reference/masterfiles-policy-framework/no-distrib.markdown b/content/reference/masterfiles-policy-framework/no-distrib.markdown
new file mode 100644
index 000000000..ea0a8447d
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/no-distrib.markdown
@@ -0,0 +1,9 @@
+---
+layout: default
+title: .no-distrib/
+sorting: 20
+aliases:
+ - "/reference-masterfiles-policy-framework-no-distrib.html"
+---
+
+{{< CFEngine_include_markdown(../../masterfiles/.no-distrib/README.md) >}}
diff --git a/reference/masterfiles-policy-framework/promises.markdown b/content/reference/masterfiles-policy-framework/promises.markdown
similarity index 71%
rename from reference/masterfiles-policy-framework/promises.markdown
rename to content/reference/masterfiles-policy-framework/promises.markdown
index 6b4a4c716..3f36f00fc 100644
--- a/reference/masterfiles-policy-framework/promises.markdown
+++ b/content/reference/masterfiles-policy-framework/promises.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: promises.cf
-published: true
sorting: 10
+aliases:
+ - "/reference-masterfiles-policy-framework-promises.html"
---
`$(sys.inputdir)/promises.cf` is the default policy run by the agent. It is
@@ -11,4 +12,4 @@ part of the policy and the order in which to run bundles.
## Policy
-[%CFEngine_library_include(promises)%]
+{{< CFEngine_library_include(promises) >}}
diff --git a/content/reference/masterfiles-policy-framework/services-autorun.markdown b/content/reference/masterfiles-policy-framework/services-autorun.markdown
new file mode 100644
index 000000000..7350b0276
--- /dev/null
+++ b/content/reference/masterfiles-policy-framework/services-autorun.markdown
@@ -0,0 +1,8 @@
+---
+layout: default
+title: services/autorun/
+aliases:
+ - "/reference-masterfiles-policy-framework-services-autorun.html"
+---
+
+{{< CFEngine_include_markdown(../../masterfiles/services/autorun/README.md) >}}
diff --git a/reference/masterfiles-policy-framework/services-main.markdown b/content/reference/masterfiles-policy-framework/services-main.markdown
similarity index 61%
rename from reference/masterfiles-policy-framework/services-main.markdown
rename to content/reference/masterfiles-policy-framework/services-main.markdown
index 6db4bdbbe..34511fbd9 100644
--- a/reference/masterfiles-policy-framework/services-main.markdown
+++ b/content/reference/masterfiles-policy-framework/services-main.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: services/main.cf
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-services-main.html"
---
This directory is the suggested place to add your custom policies.
diff --git a/reference/masterfiles-policy-framework/services.markdown b/content/reference/masterfiles-policy-framework/services.markdown
similarity index 61%
rename from reference/masterfiles-policy-framework/services.markdown
rename to content/reference/masterfiles-policy-framework/services.markdown
index c52e5dc05..011eca612 100644
--- a/reference/masterfiles-policy-framework/services.markdown
+++ b/content/reference/masterfiles-policy-framework/services.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: services/
-published: true
+aliases:
+ - "/reference-masterfiles-policy-framework-services.html"
---
This directory is the suggested place to add your custom policies.
diff --git a/reference/masterfiles-policy-framework/standalone_self_upgrade.markdown b/content/reference/masterfiles-policy-framework/standalone_self_upgrade.markdown
similarity index 78%
rename from reference/masterfiles-policy-framework/standalone_self_upgrade.markdown
rename to content/reference/masterfiles-policy-framework/standalone_self_upgrade.markdown
index ccb085a12..a65e48885 100644
--- a/reference/masterfiles-policy-framework/standalone_self_upgrade.markdown
+++ b/content/reference/masterfiles-policy-framework/standalone_self_upgrade.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: standalone_self_upgrade.cf
-published: true
sorting: 30
+aliases:
+ - "/reference-masterfiles-policy-framework-standalone_self_upgrade.html"
---
`$(sys.inputdir)/standalone_self_upgrade.cf` is an independent policy set entry
@@ -14,4 +15,4 @@ for use with community packages.
***
-[%CFEngine_library_include(standalone_self_upgrade)%]
+{{< CFEngine_library_include(standalone_self_upgrade) >}}
diff --git a/reference/masterfiles-policy-framework/update.markdown b/content/reference/masterfiles-policy-framework/update.markdown
similarity index 64%
rename from reference/masterfiles-policy-framework/update.markdown
rename to content/reference/masterfiles-policy-framework/update.markdown
index 8a011331c..3b222d208 100644
--- a/reference/masterfiles-policy-framework/update.markdown
+++ b/content/reference/masterfiles-policy-framework/update.markdown
@@ -1,12 +1,13 @@
---
layout: default
title: update.cf
-published: true
sorting: 20
+aliases:
+ - "/reference-masterfiles-policy-framework-update.html"
---
`$(sys.inputdir)/update.cf` is responsible for updating
policy from the hub as well as ensuring various core
cfenigne components are running.
-[%CFEngine_library_include(update)%]
+{{< CFEngine_library_include(update) >}}
diff --git a/reference/promise-types.markdown b/content/reference/promise-types/_index.markdown
similarity index 98%
rename from reference/promise-types.markdown
rename to content/reference/promise-types/_index.markdown
index 7389f0227..943dd1fa7 100644
--- a/reference/promise-types.markdown
+++ b/content/reference/promise-types/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Promise types
-published: true
sorting: 20
+aliases:
+ - "/reference-promise-types.html"
---
Within a bundle, the promise types are executed in a round-robin fashion in the
@@ -64,11 +65,11 @@ kept.
Policy:
-[%CFEngine_include_example(action_policy.cf, #\+begin_src\s+cfengine3, .*end_src)%]
+{{< CFEngine_include_example(action_policy.cf, #\+begin_src\s+cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(action_policy.cf, #\+begin_src\s+mock_example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(action_policy.cf, #\+begin_src\s+mock_example_output\s*, .*end_src) >}}
#### ifelapsed
@@ -969,7 +970,7 @@ Handles in other namespaces may be referred to by namespace:handle.
**Example:**
-[%CFEngine_include_example(depends_on.cf)%]
+{{< CFEngine_include_example(depends_on.cf) >}}
### handle
@@ -1241,11 +1242,11 @@ you'd use `with => canonify("the value")` so you don't have to create a
**Example:**
-[%CFEngine_include_snippet(with.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(with.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(with.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(with.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:** Was introduced in 3.11.0
@@ -1265,9 +1266,9 @@ type as a function call. For a detailed description, see
**Examples:**
-[%CFEngine_include_example(inherit_from.cf)%]
+{{< CFEngine_include_example(inherit_from.cf) >}}
-[%CFEngine_include_example(inherit_from_classes.cf)%]
+{{< CFEngine_include_example(inherit_from_classes.cf) >}}
**History:** Was introduced in 3.8.0.
diff --git a/reference/promise-types/access.markdown b/content/reference/promise-types/access.markdown
similarity index 94%
rename from reference/promise-types/access.markdown
rename to content/reference/promise-types/access.markdown
index ccb1df1e0..3f5776d6c 100644
--- a/reference/promise-types/access.markdown
+++ b/content/reference/promise-types/access.markdown
@@ -1,18 +1,19 @@
---
layout: default
title: access
-published: true
+aliases:
+ - "/reference-promise-types-access.html"
---
Access promises are conditional promises made by resources living on the server.
The promiser is the name of the resource affected and is interpreted to be a path, unless a
-different `resource_type` is specified. Access is then granted to hosts listed in `admit_ips`,
+different `resource_type` is specified. Access must then be granted to hosts listed in `admit_ips`,
`admit_keys` and `admit_hostnames`, or denied using the counterparts `deny_ips`, `deny_keys`
and `deny_hostnames`.
-You layer the access policy by denying all access and then allowing it
-only to selected clients, then denying to an even more restricted set.
+By default access is denied.
+As a policy writer you must specifically grant access.
```cf3
bundle server my_access_rules()
@@ -103,7 +104,7 @@ reporting and orchestration.
Using the built-in `report_data_select` body `default_data_select_host`:
-[%CFEngine_include_snippet(controls/reports.cf, .+default_data_select_host, \})%]
+{{< CFEngine_include_snippet(controls/reports.cf, .+default_data_select_host, \}) >}}
The access promise allows overlapping promises to be made, and these are kept on a
@@ -115,12 +116,13 @@ promises will override less specific ones.
## Attributes
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### admit_hostnames
**Description:** A list of hostnames or domains that should have access to the object.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Note:** The host trying to access the object is identified using a
reverse DNS lookup on the connecting IP. This introduces latency for
@@ -163,7 +165,7 @@ access:
admit_ips => {"192.168.0.1", "192.168.0.0/24", "0.0.0.0/0"};
```
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**See also:** `deny_ips`, `admit_hostnames`, `admit_keys`
@@ -192,7 +194,7 @@ access:
admit_keys => {"MD5=abcdef"};
```
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**See also:** `deny_keys`, `admit_hostnames`, `admit_ips`, `copyfrom_restrict_keys`
@@ -220,7 +222,7 @@ access:
deny_hostnames => { ".cfengine.com", "www.cfengine3.com" };
```
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Notes:** Failure to resolve a hostname or it's reverse results in a denial.
Since this control is sensitive to temporary DNS failures, and cases, where
@@ -250,7 +252,7 @@ access:
};
```
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**See also:** `admit_ips`, `deny_hostnames`, `deny_keys`
@@ -262,7 +264,7 @@ access:
This overrides the grants in `admit_hostnames`, `admit_ips` and `admit_keys`.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
For example, here we'll deny the fictitious SHA key `abcdef`:
@@ -356,7 +358,7 @@ files owned by non-privileged users. If `maproot` is true then remote
A typical case where mapping is important is in making backups of many
user files.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -386,7 +388,7 @@ encryption is always enabled.
If this flag is true a client cannot access the file object unless its
connection is encrypted.
-[%CFEngine_promise_attribute(false)%]
+{{< CFEngine_promise_attribute(false) >}}
**Example:**
@@ -423,7 +425,7 @@ If more than one `report_data_select` body applies to the same host, all of them
Usage of this body is only allowed in conjunction with using
[`resource_type => "query"`][access#resource_type], as this is the resource type that is being affected.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -441,9 +443,9 @@ body report_data_select report_data
Here are the built-in `report_data_select` bodies `default_data_select_host()` and
`default_data_select_policy_hub()`:
-[%CFEngine_include_snippet(controls/reports.cf, .+default_data_select_host, \})%]
+{{< CFEngine_include_snippet(controls/reports.cf, .+default_data_select_host, \}) >}}
-[%CFEngine_include_snippet(controls/reports.cf, .+default_data_select_policy_hub, \})%]
+{{< CFEngine_include_snippet(controls/reports.cf, .+default_data_select_policy_hub, \}) >}}
**See also:** [Common body attributes][Promise types#Common body attributes]
@@ -470,7 +472,7 @@ reported to the CFEngine Enterprise server.
When combined with `metatags_include`, this list is applied to the selected
subset.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**See also:** `metatags_include`, `promise_handle_exclude`, `monitoring_exclude`
@@ -487,7 +489,7 @@ reported to the CFENgine Enterprise server.
When combined with `metatags_exclude`, the exclude list is applied to the subset
from this list.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**See also:** `metatags_exclude`, `promise_handle_include`, `monitoring_include`
@@ -504,7 +506,7 @@ not be reported to the CFEngine Enterprise server.
When combined with `promise_handle_include`, this list is applied to the
selected subset.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**See also:** `promise_handle_include`, `metatags_exclude`, `monitoring_exclude`
@@ -521,7 +523,7 @@ be reported to the CFEngine Enterprise server.
When combined with `promise_handle_exclude`, the exclude list is applied to the
subset from this list.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**See also:** `promise_handle_exclude`, `metatags_include`, `monitoring_include`
@@ -538,7 +540,7 @@ to the CFEngine Enterprise server.
When combined with `monitoring_exclude`, the exclude list is applied to the
subset from this list.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**See also:** `monitoring_exclude`, `promise_handle_include`, `metatags_include`
@@ -555,7 +557,7 @@ reported to the CFEngine Enterprise server.
When combined with `monitoring_include`, this list is applied to the selected
subset.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**See also:** `monitoring_include`, `promise_handle_exclude`, `metatags_exclude`
@@ -574,7 +576,7 @@ hashed passwords). In the case of literal data, the promise handle
serves as the reference identifier for queries. Queries are instigated
by function calls by any agent.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
If the resource type is `literal`, CFEngine will grant access to a
literal data string. This string is defined either by the promiser
@@ -661,7 +663,7 @@ bundle server my_access_rules()
**Description:** For file promisers, the server will give access to the file under
its shortcut name.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
diff --git a/reference/promise-types/classes.markdown b/content/reference/promise-types/classes.markdown
similarity index 86%
rename from reference/promise-types/classes.markdown
rename to content/reference/promise-types/classes.markdown
index 57b1233d9..1d9ae0d89 100644
--- a/reference/promise-types/classes.markdown
+++ b/content/reference/promise-types/classes.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: classes
-published: true
+aliases:
+ - "/reference-promise-types-classes.html"
---
[Classes][classes] promises may be made in any bundle. Classes defined by
@@ -25,9 +26,9 @@ classes:
- The promiser is automatically canonified when classes are defined.
- Classes are not automatically canonified when checked.
-{% raw %}
-[%CFEngine_include_example(class-automatic-canonificiation.cf)%]
-{% endraw %}
+
+{{< CFEngine_include_example(class-automatic-canonificiation.cf) >}}
+
- The term ```class``` and ```context``` are sometimes used interchangeably.
- The following attributes to make a complete promise.
@@ -75,6 +76,8 @@ bundle agent example
## Attributes
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
+
### and
**Description:** Combine class sources with AND
@@ -309,6 +312,52 @@ classes:
**See also:** [`persistance` classes attribute][classes#persistence], [`persist_time` in classes body][Promise types#persist_time]
+### timer_policy
+
+**Description:** Determines whether a persistent class restarts its counter
+when rediscovered.
+
+When a [`persistence`][classes#persistence] timer is set, `timer_policy`
+controls what happens on later runs while the class is still defined (loaded
+from the persistent store):
+
+- `reset` re-evaluates the promise and restarts the timer, so the class keeps
+ persisting for as long as the policy keeps running and the expression stays
+ true.
+- `absolute` preserves the original expiry. While the class is already defined
+ the promise is skipped, so the class disappears once the original timer
+ elapses, regardless of how often the policy runs.
+
+This is the counterpart of `timer_policy` in the classes body, which has always
+defaulted to `reset`.
+
+**Type:** (menu option)
+
+**Allowed input range:** `absolute|reset`
+
+**Default value:** absolute
+
+**Example:**
+
+```cf3
+bundle common setclasses
+{
+ classes:
+ "cached_class"
+ expression => "any",
+ persistence => "120",
+ timer_policy => "reset";
+}
+```
+
+**History:**
+
+- Introduced in CFEngine 3.24.5.
+- The default is `absolute`, preserving the historical persistent-class
+ behavior. The default changed to `reset` in 3.28.0.
+
+**See also:** [`persistence` classes attribute][classes#persistence], [`timer_policy` in classes body][Promise types#timer_policy], [`persist_time` in classes body][Promise types#persist_time]
+
### not
**Description:** Evaluate the negation of string expression in normal form
diff --git a/reference/promise-types/commands.markdown b/content/reference/promise-types/commands.markdown
similarity index 98%
rename from reference/promise-types/commands.markdown
rename to content/reference/promise-types/commands.markdown
index 27f5b2db5..4c5080128 100644
--- a/reference/promise-types/commands.markdown
+++ b/content/reference/promise-types/commands.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: commands
-published: true
+aliases:
+ - "/reference-promise-types-commands.html"
---
Commands and [processes][processes] are separated cleanly. Restarting of
@@ -43,7 +44,7 @@ commands:
```
When referring to executables the full path to the executable must be used.
-When reffereing to executables whose paths contain spaces, you should quote
+When referring to executables whose paths contain spaces, you should quote
the entire program string separately so that CFEngine knows the name of the
executable file. For example:
@@ -91,7 +92,7 @@ continue.
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### args
@@ -436,7 +437,7 @@ be useful in all cases.
**Example:**
-[%CFEngine_include_example(inform.cf)%]
+{{< CFEngine_include_example(inform.cf) >}}
**History:**
diff --git a/reference/promise-types/custom.markdown b/content/reference/promise-types/custom.markdown
similarity index 99%
rename from reference/promise-types/custom.markdown
rename to content/reference/promise-types/custom.markdown
index 8d5fc8afa..3d5929237 100644
--- a/reference/promise-types/custom.markdown
+++ b/content/reference/promise-types/custom.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: custom
-published: true
+aliases:
+ - "/reference-promise-types-custom.html"
---
Custom promise types can be added as _Promise modules_.
diff --git a/reference/promise-types/databases.markdown b/content/reference/promise-types/databases.markdown
similarity index 98%
rename from reference/promise-types/databases.markdown
rename to content/reference/promise-types/databases.markdown
index 105429b28..a00369aa3 100644
--- a/reference/promise-types/databases.markdown
+++ b/content/reference/promise-types/databases.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: databases
-published: true
sorting: 9999
+aliases:
+ - "/reference-promise-types-databases.html"
---
CFEngine can interact with commonly used database servers to keep
@@ -150,7 +151,7 @@ a hierarchy of depth 1.
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### database_server
diff --git a/reference/promise-types/defaults.markdown b/content/reference/promise-types/defaults.markdown
similarity index 92%
rename from reference/promise-types/defaults.markdown
rename to content/reference/promise-types/defaults.markdown
index 17a2916de..3dbac9408 100644
--- a/reference/promise-types/defaults.markdown
+++ b/content/reference/promise-types/defaults.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: defaults
-published: true
+aliases:
+ - "/reference-promise-types-defaults.html"
---
Defaults promises are related to [variables][variables]. If a variable or
@@ -89,6 +90,8 @@ reports:
## Attributes
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
+
### if_match_regex
**Description:** If this [anchored][anchored] regular expression matches the
@@ -104,4 +107,4 @@ with the default value.
**Example:**
-[%CFEngine_include_example(defaults.cf)%]
+{{< CFEngine_include_example(defaults.cf) >}}
diff --git a/reference/promise-types/filelogic.png b/content/reference/promise-types/filelogic.png
similarity index 100%
rename from reference/promise-types/filelogic.png
rename to content/reference/promise-types/filelogic.png
diff --git a/reference/promise-types/files.markdown b/content/reference/promise-types/files/_index.markdown
similarity index 96%
rename from reference/promise-types/files.markdown
rename to content/reference/promise-types/files/_index.markdown
index 8574c68d6..e94ea9231 100644
--- a/reference/promise-types/files.markdown
+++ b/content/reference/promise-types/files/_index.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: files
-published: true
+aliases:
+ - "/reference-promise-types-files.html"
---
Files promises manage all aspects of files. Presence, absence, file content, permissions, and ownership. File content can be fully or partially managed.
@@ -163,12 +164,13 @@ When doing a recursive search, the files '.' and '..' are never
included in the matched files, even if the regular expression in the
`leaf_name` specifically allows them.
-The filename `/dir/ect/ory/.` is a special case used with the `create`
-attribute to indicate the directory named `/dir/ect/ory` and not any of
-the files under it. If you really want to specify a regular expression
-that matches any single-character filename, use `/dir/ect/ory/[\w\W]` as
-your promise regular expression (you can't use `/dir/ect/ory/[^/]`, see
-below for an explanation.
+The filename `/dir/ect/ory/.` is a special case to avoid ambiguity between files
+and directories, especially in the case of creation (both with and without the
+explicit `create` attribute). Using /. ensures that a regular file is not
+created when a directory is actually desired. If you really want to specify a
+regular expression that matches any single-character filename, use
+`/dir/ect/ory/[\w\W]` as your promise regular expression (you can't use
+`/dir/ect/ory/[^/]`, see below for an explanation.
Depth search refers to a search for file objects that starts from the
one or more matched base-paths as shown in the example above.
@@ -316,7 +318,7 @@ alter such a socket. This is a known issue, documented in
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### acl
@@ -540,7 +542,7 @@ acl_directory_inherit.
**Description:** Defines whether the object inherits its ACL from its parent.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Notes:** This attribute has an effect only on Windows.
@@ -1121,11 +1123,11 @@ When set to `true` if the promise is a remote copy and there is a failure to
connect the promise will not be considered kept. If the agent is able to request
the file and the file is missing the promise will be kept.
-[%CFEngine_promise_attribute(false)%]
+{{< CFEngine_promise_attribute(false) >}}
**Example:**
-[%CFEngine_include_example(missing_ok.cf)%]
+{{< CFEngine_include_example(missing_ok.cf) >}}
**Notes:**
@@ -1236,7 +1238,7 @@ preserve => "true";
**Description:** Defines the protocol to use for the outgoing connection in this
copy operation.
-[%CFEngine_promise_attribute(classic)%]
+{{< CFEngine_promise_attribute(classic) >}}
**Note:** The value here will override the setting from [`body common control`][body common].
@@ -1403,9 +1405,9 @@ verify => "true";
**Example:**
-{%raw%}
-[%CFEngine_include_example(files_content.cf)%]
-{%endraw%}
+
+{{< CFEngine_include_example(files_content.cf) >}}
+
**History:** Was introduced in 3.16.0
@@ -1597,7 +1599,7 @@ promise the same attributes as the files inside it. `rmdirs` in `delete` bodies
**Example:**
-[%CFEngine_include_example(files_depth_search_include_basedir.cf)%]
+{{< CFEngine_include_example(files_depth_search_include_basedir.cf) >}}
**See also:** `rm_rf`, `rm_rf_depth` from the standard library.
@@ -2032,10 +2034,10 @@ bundle agent example
**Example:**
-{% comment %} This example contains mustache, so it needs to be wrapped in raw or else it won't render as desired.{% endcomment %}
-{% raw %}
-[%CFEngine_include_example(template_method-inline_mustache.cf)%]
-{% endraw %}
+
+
+{{< CFEngine_include_example(template_method-inline_mustache.cf) >}}
+
**History:** Was introduced in 3.12.0
@@ -2467,7 +2469,7 @@ regular
fifo
```
-[%CFEngine_promise_attribute(cfengine)%]
+{{< CFEngine_promise_attribute(cfengine) >}}
### link_from
@@ -2513,11 +2515,11 @@ them to the source.
**Example implementation:**
-[%CFEngine_include_snippet(masterfiles/lib/files.cf, ^body\slink_from\slinkchildren.*, ^##)%]
+{{< CFEngine_include_snippet(masterfiles/lib/files.cf, ^body\slink_from\slinkchildren.*, ^##) >}}
**Example usage:**
-[%CFEngine_include_example(symlink_children.cf)%]
+{{< CFEngine_include_example(symlink_children.cf) >}}
#### link_type
@@ -2550,7 +2552,7 @@ absolute
**Example impelementation:**
-[%CFEngine_include_snippet(masterfiles/lib/files.cf, ^body\slink_from\sln_s.*, ^##)%]
+{{< CFEngine_include_snippet(masterfiles/lib/files.cf, ^body\slink_from\sln_s.*, ^##) >}}
```cf3
body link_from example
{
@@ -2561,7 +2563,7 @@ source => "/tmp/source";
**Example usage:**
-[%CFEngine_include_example(symlink.cf)%]
+{{< CFEngine_include_example(symlink.cf) >}}
**Notes:**
@@ -2872,7 +2874,7 @@ specified in `mode`.
**Example:**
-[%CFEngine_include_example(rxdirs.cf)%]
+{{< CFEngine_include_example(rxdirs.cf) >}}
**See also:** `mode`
@@ -3037,7 +3039,7 @@ files:
**Description:** The data container to be passed to the template (Mustache or inline_mustache). It can come from a function call like `mergedata()` or from a data container reference like `@(mycontainer)`.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -3079,7 +3081,7 @@ state in Mustache.
By default `cfengine` requests the native CFEngine template
implementation, but you can use `mustache` or `inline_mustache` as well.
-[%CFEngine_promise_attribute(cfengine)%]
+{{< CFEngine_promise_attribute(cfengine) >}}
#### template_method cfengine
@@ -3178,10 +3180,10 @@ for `inline_mustache` and `mustache`. For mustache explanation see
**Example:**
-{% comment %} This example contains mustache, so it needs to be wrapped in raw or else it won't render as desired.{% endcomment %}
-{% raw %}
-[%CFEngine_include_example(template_method-inline_mustache.cf)%]
-{% endraw %}
+
+
+{{< CFEngine_include_example(template_method-inline_mustache.cf) >}}
+
**History:** Was introduced in 3.12.0
@@ -3212,28 +3214,28 @@ currently supported.
##### template_method mustache Variables
-The most basic tag type is the variable. A {%raw%}```{{name}}```{%endraw%} tag in a basic
+The most basic tag type is the variable. A ```{{name}}``` tag in a basic
template will try to find the name key in the current context. If there is no
name key, the parent contexts will be checked recursively. If the top context is
reached and the name key is still not found, nothing will be rendered.
**All variables are HTML escaped by default**. If you want to return unescaped
-HTML, use the triple mustache: {%raw%}```{{{name}}}```{%endraw%} or an ampersand
-({%raw%}```{{& name}}```{%endraw%}).
+HTML, use the triple mustache: ```{{{name}}}``` or an ampersand
+(```{{& name}}```).
A variable "miss" returns an empty string.
-{%raw%}
-[%CFEngine_include_example(mustache_variables.cf)%]
-{%endraw%}
+
+{{< CFEngine_include_example(mustache_variables.cf) >}}
+
##### template_method mustache Sections
Sections render blocks of text one or more times, depending on the value of the
key in the current context.
-A section begins with a pound and ends with a slash. That is, {%raw%}```{{#key}}```{%endraw%}
-begins a "person" section while {%raw%}```{{/key}}```{%endraw%} ends it.
+A section begins with a pound and ends with a slash. That is, ```{{#key}}```
+begins a "person" section while ```{{/key}}``` ends it.
The behavior of the section is determined by the value of the key.
@@ -3242,89 +3244,89 @@ The behavior of the section is determined by the value of the key.
If the key exists and has a value of false or an empty list, the HTML between
the pound and slash will not be displayed.
-{%raw%}
-[%CFEngine_include_example(mustache_sections_empty_list.cf)%]
-{%endraw%}
+
+{{< CFEngine_include_example(mustache_sections_empty_list.cf) >}}
+
**Non-Empty Lists:**
-{%raw%}
-[%CFEngine_include_example(mustache_sections_non_empty_list.cf)%]
-{%endraw%}
+
+{{< CFEngine_include_example(mustache_sections_non_empty_list.cf) >}}
+
**Non-False Values:**
When the value is non-false but not a list, it will be used as the context for a
single rendering of the block.
-{%raw%}
-[%CFEngine_include_example(mustache_sections_non_false_value.cf)%]
-{%endraw%}
+
+{{< CFEngine_include_example(mustache_sections_non_false_value.cf) >}}
+
##### template_method mustache Inverted Sections
An inverted section begins with a caret (hat) and ends with a slash. That is
-{%raw%}```{{^key}}```{%endraw%} begins a "key" inverted section while
-{%raw%}```{{/key}}```{%endraw%} ends it.
+```{{^key}}``` begins a "key" inverted section while
+```{{/key}}``` ends it.
While sections can be used to render text one or more times based on the value
of the key, inverted sections may render text once based on the inverse value of
the key. That is, they will be rendered if the key doesn't exist, is false, or
is an empty list.
-{%raw%}
-[%CFEngine_include_example(mustache_sections_inverted.cf)%]
-{%endraw%}
+
+{{< CFEngine_include_example(mustache_sections_inverted.cf) >}}
+
##### template_method mustache Comments
Comments begin with a bang and are ignored. Comments may contain newlines.
-{%raw%}
-[%CFEngine_include_example(mustache_comments.cf)%]
-{%endraw%}
+
+{{< CFEngine_include_example(mustache_comments.cf) >}}
+
##### template_method mustache Set Delimiter
Set Delimiter tags start with an equal sign and change the tag delimiters from
-{%raw%}```{{```{%endraw%} and {%raw%}```}}```{%endraw%} to custom strings.
+```{{``` and ```}}``` to custom strings.
+
+
+{{< CFEngine_include_example(mustache_set_delimiters.cf) >}}
-{%raw%}
-[%CFEngine_include_example(mustache_set_delimiters.cf)%]
-{%endraw%}
##### template_method mustache extensions
The following are **CFEngine-specific extensions**.
`-top-` special key representing the complete data given. Useful for iterating
-over the top level of a container {%raw%}`{{#-top-}} ... {{/-top-}}`{%endraw%}
+over the top level of a container `{{#-top-}} ... {{/-top-}}`
and rendering json representation of data given with `$` and `%`.
-{%raw%}
-[%CFEngine_include_example(mustache_extension_top.cf)%]
-{%endraw%}
+
+{{< CFEngine_include_example(mustache_extension_top.cf) >}}
+
`%` variable prefix causing data to be rendered as multi-line json
representation. Like output from `storejson()`.
-{%raw%}
-[%CFEngine_include_example(mustache_extension_multiline_json.cf)%]
-{%endraw%}
+
+{{< CFEngine_include_example(mustache_extension_multiline_json.cf) >}}
+
`$` variable prefix causing data to be rendered as compact json representation.
Like output from `format()` with the ```%S``` format string.
-{%raw%}
-[%CFEngine_include_example(mustache_extension_compact_json.cf)%]
-{%endraw%}
+
+{{< CFEngine_include_example(mustache_extension_compact_json.cf) >}}
+
`@` expands the current key being iterated to complement the value as accessed
with `.`.
-{%raw%}
-[%CFEngine_include_example(mustache_extension_expand_key.cf)%]
-{%endraw%}
+
+{{< CFEngine_include_example(mustache_extension_expand_key.cf) >}}
+
**See also:** `edit_template`, `template_data`, `datastate()`
@@ -3384,7 +3386,7 @@ something else.
**Example:**
-[%CFEngine_include_example(files_transformer.cf)%]
+{{< CFEngine_include_example(files_transformer.cf) >}}
In the example, the promise is made on the file that we wish to transform. If
the promised file exists, the transformer will change the file to a compressed
diff --git a/reference/promise-types/files/edit_line.markdown b/content/reference/promise-types/files/edit_line/_index.markdown
similarity index 97%
rename from reference/promise-types/files/edit_line.markdown
rename to content/reference/promise-types/files/edit_line/_index.markdown
index 28a01010e..95aa6798d 100644
--- a/reference/promise-types/files/edit_line.markdown
+++ b/content/reference/promise-types/files/edit_line/_index.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: edit_line
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_line.html"
---
Line based editing is a simple model for editing files. Before XML, and
@@ -179,15 +180,15 @@ selected for editing.
Prepare:
-[%CFEngine_include_snippet(select_region.cf, #\+begin_src\s+prep, .*end_src)%]
+{{< CFEngine_include_snippet(select_region.cf, #\+begin_src\s+prep, .*end_src) >}}
Run:
-[%CFEngine_include_snippet(select_region.cf, #\+begin_src\s+cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(select_region.cf, #\+begin_src\s+cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(select_region.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(select_region.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**See also:** [Common body attributes][Promise types#Common body attributes]
diff --git a/reference/promise-types/files/edit_line/delete_lines.markdown b/content/reference/promise-types/files/edit_line/delete_lines.markdown
similarity index 98%
rename from reference/promise-types/files/edit_line/delete_lines.markdown
rename to content/reference/promise-types/files/edit_line/delete_lines.markdown
index 3dce273f0..16345b917 100644
--- a/reference/promise-types/files/edit_line/delete_lines.markdown
+++ b/content/reference/promise-types/files/edit_line/delete_lines.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: delete_lines
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_line-delete_lines.html"
---
This promise assures that certain lines exactly matching regular
diff --git a/reference/promise-types/files/edit_line/field_edits.markdown b/content/reference/promise-types/files/edit_line/field_edits.markdown
similarity index 97%
rename from reference/promise-types/files/edit_line/field_edits.markdown
rename to content/reference/promise-types/files/edit_line/field_edits.markdown
index 294c5d59f..aa0e4dc54 100644
--- a/reference/promise-types/files/edit_line/field_edits.markdown
+++ b/content/reference/promise-types/files/edit_line/field_edits.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: field_edits
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_line-field_edits.html"
---
Certain types of text files are tabular in nature, with field separators (e.g.
@@ -13,8 +14,8 @@ string:
VARIABLE="one two three"
```
-View this line as a tabular line separated by " and with sub-separator
-given by the space.
+View this line as a tabular line separated by `"` and with sub-separator (`value_separator`)
+being a space.
Field editing allows us to edit tabular files in a unique way, adding and
removing data from addressable fields.
diff --git a/reference/promise-types/files/edit_line/insert_lines.markdown b/content/reference/promise-types/files/edit_line/insert_lines.markdown
similarity index 99%
rename from reference/promise-types/files/edit_line/insert_lines.markdown
rename to content/reference/promise-types/files/edit_line/insert_lines.markdown
index 586fe0f31..db52a0ed2 100644
--- a/reference/promise-types/files/edit_line/insert_lines.markdown
+++ b/content/reference/promise-types/files/edit_line/insert_lines.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: insert_lines
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_line-insert_lines.html"
---
This promise type is part of the line-editing model. It inserts lines into
diff --git a/reference/promise-types/files/edit_line/replace_patterns.markdown b/content/reference/promise-types/files/edit_line/replace_patterns.markdown
similarity index 96%
rename from reference/promise-types/files/edit_line/replace_patterns.markdown
rename to content/reference/promise-types/files/edit_line/replace_patterns.markdown
index 4072f2b3a..f0872f126 100644
--- a/reference/promise-types/files/edit_line/replace_patterns.markdown
+++ b/content/reference/promise-types/files/edit_line/replace_patterns.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: replace_patterns
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_line-replace_patterns.html"
---
This promise refers to arbitrary text patterns in a file. The pattern is
diff --git a/reference/promise-types/files/edit_xml.markdown b/content/reference/promise-types/files/edit_xml/_index.markdown
similarity index 92%
rename from reference/promise-types/files/edit_xml.markdown
rename to content/reference/promise-types/files/edit_xml/_index.markdown
index 4a726286b..20816dc8f 100644
--- a/reference/promise-types/files/edit_xml.markdown
+++ b/content/reference/promise-types/files/edit_xml/_index.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: edit_xml
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_xml.html"
---
The use of XML documents in systems configuration is widespread. XML
@@ -39,7 +40,7 @@ will be verified and built BEFORE other `edit_xml` promises within same
promise body. Therefore, the file will not be empty during the execution
of such promises.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
### select_xpath
@@ -48,4 +49,4 @@ of such promises.
Edits to the XML document take place within the selected node. This
attribute is not used when inserting XML content into an empty file.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
diff --git a/reference/promise-types/files/edit_xml/build_xpath.markdown b/content/reference/promise-types/files/edit_xml/build_xpath.markdown
similarity index 95%
rename from reference/promise-types/files/edit_xml/build_xpath.markdown
rename to content/reference/promise-types/files/edit_xml/build_xpath.markdown
index b681b3988..8504c8746 100644
--- a/reference/promise-types/files/edit_xml/build_xpath.markdown
+++ b/content/reference/promise-types/files/edit_xml/build_xpath.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: build_xpath
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_xml-build_xpath.html"
---
This promise type assures that a balanced XML tree, described by the given
diff --git a/reference/promise-types/files/edit_xml/delete_attribute.markdown b/content/reference/promise-types/files/edit_xml/delete_attribute.markdown
similarity index 91%
rename from reference/promise-types/files/edit_xml/delete_attribute.markdown
rename to content/reference/promise-types/files/edit_xml/delete_attribute.markdown
index 61ba3870d..35bd0eee4 100644
--- a/reference/promise-types/files/edit_xml/delete_attribute.markdown
+++ b/content/reference/promise-types/files/edit_xml/delete_attribute.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: delete_attribute
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_xml-delete_attribute.html"
---
This promise type assures that an attribute, with the given name, will not be
diff --git a/reference/promise-types/files/edit_xml/delete_text.markdown b/content/reference/promise-types/files/edit_xml/delete_text.markdown
similarity index 91%
rename from reference/promise-types/files/edit_xml/delete_text.markdown
rename to content/reference/promise-types/files/edit_xml/delete_text.markdown
index ea9412f02..499e37c0c 100644
--- a/reference/promise-types/files/edit_xml/delete_text.markdown
+++ b/content/reference/promise-types/files/edit_xml/delete_text.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: delete_text
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_xml-delete_text.html"
---
This promise type assures that a value string, containing the matching
diff --git a/reference/promise-types/files/edit_xml/delete_tree.markdown b/content/reference/promise-types/files/edit_xml/delete_tree.markdown
similarity index 91%
rename from reference/promise-types/files/edit_xml/delete_tree.markdown
rename to content/reference/promise-types/files/edit_xml/delete_tree.markdown
index e953a42dd..183b66413 100644
--- a/reference/promise-types/files/edit_xml/delete_tree.markdown
+++ b/content/reference/promise-types/files/edit_xml/delete_tree.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: delete_tree
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_xml-delete_tree.html"
---
This promise type assures that a balanced XML tree, containing the matching
diff --git a/reference/promise-types/files/edit_xml/insert_text.markdown b/content/reference/promise-types/files/edit_xml/insert_text.markdown
similarity index 92%
rename from reference/promise-types/files/edit_xml/insert_text.markdown
rename to content/reference/promise-types/files/edit_xml/insert_text.markdown
index 7d5694ceb..6530c50ea 100644
--- a/reference/promise-types/files/edit_xml/insert_text.markdown
+++ b/content/reference/promise-types/files/edit_xml/insert_text.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: insert_text
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_xml-insert_text.html"
---
This proimse type assures that a value string, containing the matching
diff --git a/reference/promise-types/files/edit_xml/insert_tree.markdown b/content/reference/promise-types/files/edit_xml/insert_tree.markdown
similarity index 91%
rename from reference/promise-types/files/edit_xml/insert_tree.markdown
rename to content/reference/promise-types/files/edit_xml/insert_tree.markdown
index 2c9d2f707..ff6f1bbc5 100644
--- a/reference/promise-types/files/edit_xml/insert_tree.markdown
+++ b/content/reference/promise-types/files/edit_xml/insert_tree.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: insert_tree
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_xml-insert_tree.html"
---
This promise type assures that a
diff --git a/reference/promise-types/files/edit_xml/set_attribute.markdown b/content/reference/promise-types/files/edit_xml/set_attribute.markdown
similarity index 93%
rename from reference/promise-types/files/edit_xml/set_attribute.markdown
rename to content/reference/promise-types/files/edit_xml/set_attribute.markdown
index dade549e4..5035da13a 100644
--- a/reference/promise-types/files/edit_xml/set_attribute.markdown
+++ b/content/reference/promise-types/files/edit_xml/set_attribute.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: set_attribute
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_xml-set_attribute.html"
---
This promise type assures that an attribute, with the given name and value, will
diff --git a/reference/promise-types/files/edit_xml/set_text.markdown b/content/reference/promise-types/files/edit_xml/set_text.markdown
similarity index 91%
rename from reference/promise-types/files/edit_xml/set_text.markdown
rename to content/reference/promise-types/files/edit_xml/set_text.markdown
index 97dd1b331..841f210fb 100644
--- a/reference/promise-types/files/edit_xml/set_text.markdown
+++ b/content/reference/promise-types/files/edit_xml/set_text.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: set_text
-published: true
+aliases:
+ - "/reference-promise-types-files-edit_xml-set_text.html"
---
This promise type assures that a matching value string will be present in the
diff --git a/reference/promise-types/guest_environments.markdown b/content/reference/promise-types/guest_environments.markdown
similarity index 98%
rename from reference/promise-types/guest_environments.markdown
rename to content/reference/promise-types/guest_environments.markdown
index aa943348f..cb0e809cf 100644
--- a/reference/promise-types/guest_environments.markdown
+++ b/content/reference/promise-types/guest_environments.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: guest_environments
-published: true
sorting: 9999
+aliases:
+ - "/reference-promise-types-guest_environments.html"
---
**WARNING**: Due to lack of use this promise type has been removed from the
@@ -53,7 +54,7 @@ CFEngine currently provides a convergent interface to *libvirt*.
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### environment_host
diff --git a/reference/promise-types/measurements.markdown b/content/reference/promise-types/measurements.markdown
similarity index 99%
rename from reference/promise-types/measurements.markdown
rename to content/reference/promise-types/measurements.markdown
index 8a6d2cbb6..337bcaedf 100644
--- a/reference/promise-types/measurements.markdown
+++ b/content/reference/promise-types/measurements.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: measurements
-published: true
+aliases:
+ - "/reference-promise-types-measurements.html"
---
By default, CFEngine's monitoring component `cf-monitord` records performance
@@ -153,6 +154,8 @@ may be used in other promises in the form `$(mon.handle)`.
## Attributes
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
+
### stream_type
**Description:** The datatype being collected.
diff --git a/content/reference/promise-types/meta.markdown b/content/reference/promise-types/meta.markdown
new file mode 100644
index 000000000..29875aae5
--- /dev/null
+++ b/content/reference/promise-types/meta.markdown
@@ -0,0 +1,117 @@
+---
+layout: default
+title: meta
+aliases:
+ - "/reference-promise-types-meta.html"
+---
+
+Meta-data promises have no internal function. They are intended to be used to
+represent arbitrary information about promise bundles. Formally, meta promises
+are implemented as variables, and the values map to a variable context called
+`bundlename_meta`. The values can be used as variables and will appear in
+CFEngine Enterprise variable reports.
+
+```cf3
+bundle agent example
+{
+meta:
+
+ "bundle_version" string => "1.2.3";
+ "works_with_cfengine" slist => { "3.4.0", "3.5.0" };
+
+reports:
+
+ "Not a local variable: $(bundle_version)";
+ "Meta data (variable): $(example_meta.bundle_version)";
+
+}
+```
+
+The value of meta data can be of the types `string` or `slist` or `data`.
+
+## Attributes
+
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
+
+### data
+
+**Description:** A data container structure
+
+**Type:** `data`
+
+**Allowed input range:** (arbitrary string)
+
+**Example:**
+
+```cf3
+vars:
+
+ "loaded1" data => readjson("/tmp/myfile.json", 40000);
+ "loaded2" data => parsejson('{"key":"value"}');
+ "loaded3" data => readyaml("/tmp/myfile.yaml", 40000);
+ "loaded4" data => parseyaml('- key2: value2');
+ "merged1" data => mergedata(loaded1, loaded2, loaded3, loaded4);
+
+ # JSON or YAML can be inlined since CFEngine 3.7
+ "inline1" data => '{"key":"value"}'; # JSON
+ "inline2" data => '---$(const.n)- key2: value2'; # YAML requires "---$(const.n)" header
+```
+
+### slist
+
+**Description:** A list of scalar strings
+
+**Type:** `slist`
+
+**Allowed input range:** (arbitrary string)
+
+**Example:**
+
+```cf3
+vars:
+
+ "xxx" slist => { "literal1", "literal2" };
+ "xxx1" slist => { "1", @(xxx) }; # interpolated in order
+ "yyy" slist => {
+ readstringlist(
+ "/home/mark/tmp/testlist",
+ "#[a-zA-Z0-9 ]*",
+ "[^a-zA-Z0-9]",
+ 15,
+ 4000
+ )
+ };
+
+ "zzz" slist => { readstringlist(
+ "/home/mark/tmp/testlist2",
+ "#[^\n]*",
+ ",",
+ 5,
+ 4000)
+ };
+```
+
+**Notes:**
+
+Some [functions][Functions] return `slist`s, and an `slist`
+may contain the values copied from another `slist`, `rlist`, or `ilist`. See
+[`policy`](#policy).
+
+
+### string
+
+**Description:** A scalar string
+
+**Type:** `string`
+
+**Allowed input range:** (arbitrary string)
+
+**Example:**
+
+```cf3
+vars:
+
+ "xxx" string => "Some literal string...";
+ "yyy" string => readfile( "/home/mark/tmp/testfile" , "33" );
+```
+
diff --git a/reference/promise-types/methods.markdown b/content/reference/promise-types/methods.markdown
similarity index 92%
rename from reference/promise-types/methods.markdown
rename to content/reference/promise-types/methods.markdown
index 1db1a1c05..174b5d3e6 100644
--- a/reference/promise-types/methods.markdown
+++ b/content/reference/promise-types/methods.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: methods
-published: true
+aliases:
+ - "/reference-promise-types-methods.html"
---
Methods are compound promises that refer to whole bundles of promises.
@@ -101,7 +102,7 @@ Here's a full example of how you might encode bundle names and
parameters in a slist, if you need to pack and unpack method calls in
a portable (e.g. written in a file) format.
-[%CFEngine_include_snippet(unpack_method_calls.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(unpack_method_calls.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
@@ -115,7 +116,7 @@ Output:
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### inherit
@@ -135,16 +136,18 @@ example: `$(bundle.variable)`.
```cf3
bundle agent name
{
-methods:
+classes:
+ "name_class";
+methods:
"group name" usebundle => my_method,
inherit => "true";
}
-
-body edit_defaults example
+bundle agent my_method
{
-inherit => "true";
+reports:
+ "$(this.bundle) inherited class 'name_class'" if => "name_class";
}
```
@@ -163,7 +166,7 @@ Return values are limited to scalars.
**Type:** `string`
-**Allowed input range:** `[a-zA-Z0-9_$(){}\[\].:]+
+**Allowed input range:** `[a-zA-Z0-9_$(){}\[\].:]+`
**Example:**
diff --git a/reference/promise-types/packages-deprecated.markdown b/content/reference/promise-types/packages-deprecated.markdown
similarity index 99%
rename from reference/promise-types/packages-deprecated.markdown
rename to content/reference/promise-types/packages-deprecated.markdown
index ebf423999..60c59a484 100644
--- a/reference/promise-types/packages-deprecated.markdown
+++ b/content/reference/promise-types/packages-deprecated.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: packages (deprecated)
-published: true
+aliases:
+ - "/reference-promise-types-packages-deprecated.html"
---
**NOTE:** This package promise is deprecated and has been superseded by
@@ -233,7 +234,7 @@ does not come with package bodies for that platform.
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### package_architectures
diff --git a/reference/promise-types/packages.markdown b/content/reference/promise-types/packages.markdown
similarity index 80%
rename from reference/promise-types/packages.markdown
rename to content/reference/promise-types/packages.markdown
index 1514d7fc3..9abb9c0e1 100644
--- a/reference/promise-types/packages.markdown
+++ b/content/reference/promise-types/packages.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: packages
-published: true
+aliases:
+ - "/reference-promise-types-packages.html"
---
CFEngine 3.7 and later supports package management through a simple promise
@@ -92,7 +93,7 @@ string needs to be a bare package name, you cannot use a file name for this.
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### architecture
@@ -374,7 +375,7 @@ packages:
Enable a specific repository for a specific promise.
-```cf3
+```cf3 {skip TODO}
bundle agent example
{
packages:
@@ -394,7 +395,7 @@ bundle agent example
"httpd"
policy => "present",
version => "latest",
- options => { "disablerepo=* enablerepo=UPDATES" };
+ options => { "disablerepo=*", "enablerepo=UPDATES" };
}
```
@@ -446,6 +447,151 @@ bundle agent example
* Added in CFEngine 3.7.0
* `enablerepo` and `disablerepo` option support added in 3.7.8, 3.10.4, 3.12.0
+### dnf
+
+Manage packages using `dnf`. This is the [default package module][lib/packages.cf#package_module_knowledge] for modern Red Hat, CentOS, Fedora, and Amazon Linux systems.
+
+**Examples:**
+
+File based package source.
+
+```cf3 {skip TODO}
+packages:
+ redhat|centos|amazon_linux::
+ "/mnt/nfs/packages/httpd-2.4.37-65.module+el8.10.0+40053+5a18018e.7.x86_64.rpm"
+ policy => "present";
+```
+
+Repository based package source with a specific version of the package.
+
+```cf3 {skip TODO}
+packages:
+ (redhat|centos|amazon_linux).workstation::
+ "emacs"
+ policy => "present",
+ version => "26.1-13";
+```
+
+Enable a specific repository for a specific promise.
+
+```cf3
+bundle agent example
+{
+ packages:
+
+ rocky_8::
+ # Enable the EPEL repo when making sure etc-keeper is installed
+ # and up to date.
+
+ "etckeeper-dnf"
+ policy => "present",
+ version => "latest",
+ options => { "enablerepo=powertools" };
+
+ # Only consider updates from the main repositories for
+ # httpd and disable all other repositories
+
+ "httpd"
+ policy => "present",
+ version => "latest",
+ options => { "disablerepo=*", "enablerepo=UPDATES" };
+}
+```
+
+**Notes:**
+
+- Supports file path and repository sourced packages.
+
+- Requires Python 3 to be installed on the host (leverages cfengine-selected-python).
+
+- Package downgrades default to the system configuration (typically disabled). To explicitly allow the module to downgrade a package for a specific promise, set `options => { "allow_downgrade=true" }`.
+
+ ```cf3 {skip TODO}
+ packages:
+ "httpd"
+ policy => "present",
+ version => "2.4.37-64", # Older version
+ options => { "allow_downgrade=true" };
+ ```
+
+**History:**
+
+- Added in CFEngine 3.28.0, 3.27.1, 3.24.4
+
+### dnf_group
+
+Manage DNF/YUM package groups using `dnf group`. Package groups are collections
+of related packages (e.g., "Development Tools", "System Tools") commonly used on
+RHEL, Rocky Linux, AlmaLinux, and Fedora systems.
+
+**Examples:**
+
+Install a package group:
+
+```cf3 {skip TODO}
+packages:
+ redhat::
+ "system-tools"
+ policy => "present",
+ package_module => dnf_group;
+```
+
+Install a package group with optional packages included:
+
+```cf3 {skip TODO}
+packages:
+ redhat::
+ "development"
+ policy => "present",
+ package_module => dnf_group,
+ options => { "group_package_types=optional" };
+```
+
+Upgrade all packages in an installed group:
+
+```cf3 {skip TODO}
+packages:
+ redhat::
+ "development"
+ policy => "present",
+ package_module => dnf_group,
+ version => "latest";
+```
+
+Remove a package group:
+
+```cf3 {skip TODO}
+packages:
+ redhat::
+ "system-tools"
+ policy => "absent",
+ package_module => dnf_group;
+```
+
+**Options:**
+
+The `options` attribute supports DNF setopt-style configuration:
+
+- `group_package_types=TYPE` - Specify which package types to install from the group:
+ - `mandatory` - Only mandatory packages (default)
+ - `default` - Mandatory and default packages
+ - `optional` - Mandatory, default, and optional packages
+
+- Repository configuration: `.enabled=1|0` or `enablerepo=`, `disablerepo=`
+- Any DNF configuration option: `install_weak_deps=false`, `allow_downgrade=true`, etc.
+
+**Notes:**
+
+- Requires Python 3 and python3-dnf to be installed on the host
+- The promiser must be the group ID (e.g., "development-tools"), not the display name ("Development Tools")
+- To find group IDs, use: `dnf group list --ids`
+- Use `version => "latest"` to upgrade all packages within the group
+- Package downgrades follow system configuration (typically disabled)
+
+**History:**
+
+- Added in CFEngine 3.28.0, 3.27.1, 3.24.4
+
### apt_get
Manage packages using ```apt-get```.
diff --git a/reference/promise-types/processes.markdown b/content/reference/promise-types/processes.markdown
similarity index 97%
rename from reference/promise-types/processes.markdown
rename to content/reference/promise-types/processes.markdown
index 1eea1d413..99a8d86cb 100644
--- a/reference/promise-types/processes.markdown
+++ b/content/reference/promise-types/processes.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: processes
-published: true
+aliases:
+ - "/reference-promise-types-processes.html"
---
Process promises refer to items in the system process table, i.e., a command in
@@ -54,7 +55,7 @@ bundle agent example
This example shows using `process_select` and `process_count` to define a class
when a process has been running for longer than a day.
-[%CFEngine_include_example(processes_define_class_based_on_process_runtime.cf)%]
+{{< CFEngine_include_example(processes_define_class_based_on_process_runtime.cf) >}}
Take care to not oversimplify your patterns as it may match
unexpected processes. For example, on many systems, the process pattern `"^cp"`
@@ -92,7 +93,7 @@ commands:
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### process_count
@@ -293,7 +294,7 @@ regex is [anchored][anchored], meaning it must match the entire name.
**Example:**
-[%CFEngine_include_example(kill_process_running_wrong_user.cf)%]
+{{< CFEngine_include_example(kill_process_running_wrong_user.cf) >}}
#### process_result
diff --git a/reference/promise-types/promise-types-services-winservice-properties_name.png b/content/reference/promise-types/promise-types-services-winservice-properties_name.png
similarity index 100%
rename from reference/promise-types/promise-types-services-winservice-properties_name.png
rename to content/reference/promise-types/promise-types-services-winservice-properties_name.png
diff --git a/reference/promise-types/reports.markdown b/content/reference/promise-types/reports.markdown
similarity index 90%
rename from reference/promise-types/reports.markdown
rename to content/reference/promise-types/reports.markdown
index 89721174e..79952be95 100644
--- a/reference/promise-types/reports.markdown
+++ b/content/reference/promise-types/reports.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: reports
-published: true
+aliases:
+ - "/reference-promise-types-reports.html"
---
Reports promises simply print messages. Outputting a message without
@@ -9,11 +10,11 @@ qualification can be a dangerous operation. In a large installation it
could unleash an avalanche of messaging, so it is recommended that
reports are guarded appropriately.
-[%CFEngine_include_example(reports.cf)%]
+{{< CFEngine_include_example(reports.cf) >}}
-{% comment %} TODO: Should link to a page that describes all CFEngine output
+
Messages output by report promises are prefixed with the letter R to
distinguish them from other output.
@@ -72,7 +73,7 @@ R: found class: report_not_repaired
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### friend_pattern
@@ -118,13 +119,13 @@ argument `number_of_lines`
**Example:**
-[%CFEngine_include_snippet(printfile.cf, #\+begin_src prep, .*end_src)%]
+{{< CFEngine_include_snippet(printfile.cf, #\+begin_src prep, .*end_src) >}}
-[%CFEngine_include_snippet(printfile.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(printfile.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(printfile.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(printfile.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
**History:**
diff --git a/reference/promise-types/roles.markdown b/content/reference/promise-types/roles.markdown
similarity index 89%
rename from reference/promise-types/roles.markdown
rename to content/reference/promise-types/roles.markdown
index cb15b489d..4610e0dc4 100644
--- a/reference/promise-types/roles.markdown
+++ b/content/reference/promise-types/roles.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: roles
-published: true
+aliases:
+ - "/reference-promise-types-roles.html"
---
Roles promises are server-side decisions about which users are allowed
@@ -31,13 +32,15 @@ bundle server my_access_rules()
```
In this example user `mark` is granted permission to remotely activate
-classes matching the regular expression `Myclass_.*` hen using the
+classes matching the regular expression `Myclass_.*` when using the
`cf-runagent` to activate CFEngine.
****
## Attributes
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
+
### authorize
**Description:** List of public-key user names that are allowed to activate
diff --git a/reference/promise-types/services.markdown b/content/reference/promise-types/services.markdown
similarity index 98%
rename from reference/promise-types/services.markdown
rename to content/reference/promise-types/services.markdown
index 44510e7a1..0b72dbd15 100644
--- a/reference/promise-types/services.markdown
+++ b/content/reference/promise-types/services.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: services
-published: true
+aliases:
+ - "/reference-promise-types-services.html"
---
`services` type promises in their simplest *generic* form are an abstraction on
@@ -105,7 +106,7 @@ services:
service_method => service_test;
"$(mail)" service_policy => "stop",
- service_method => service_test;
+ service_method => service_test;
}
body service_method service_test
@@ -135,7 +136,7 @@ for services promises.
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### service_policy
@@ -370,7 +371,7 @@ the ```service_bundle``` **must** be in the same namespace.
**Example:**
-[%CFEngine_include_example(services_default_service_bundle.cf)%]
+{{< CFEngine_include_example(services_default_service_bundle.cf) >}}
#### service_dependence_chain
diff --git a/reference/promise-types/storage.markdown b/content/reference/promise-types/storage.markdown
similarity index 94%
rename from reference/promise-types/storage.markdown
rename to content/reference/promise-types/storage.markdown
index 2a6fce414..f90323f8c 100644
--- a/reference/promise-types/storage.markdown
+++ b/content/reference/promise-types/storage.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: storage
-published: true
+aliases:
+ - "/reference-promise-types-storage.html"
---
Storage promises refer to disks and filesystem properties.
@@ -49,7 +50,7 @@ body mount nfs(server,source)
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### mount
@@ -84,7 +85,7 @@ body mount example
**Type:** (menu option)
**Allowed input range:**
-{% comment %}cf-promises --syntax-description=json | jq '.bodyTypes.mount.attributes.mount_type.range|split(",")'{% endcomment %}
+
* `nfs`
* `nfs2`
@@ -95,7 +96,7 @@ body mount example
**Example:**
-[%CFEngine_include_example(storage-cifs.cf)%]
+{{< CFEngine_include_example(storage-cifs.cf) >}}
**History:**
diff --git a/reference/promise-types/users.markdown b/content/reference/promise-types/users.markdown
similarity index 91%
rename from reference/promise-types/users.markdown
rename to content/reference/promise-types/users.markdown
index c8f93465c..0976752a7 100644
--- a/reference/promise-types/users.markdown
+++ b/content/reference/promise-types/users.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: users
-published: true
+aliases:
+ - "/reference-promise-types-users.html"
---
User promises are promises made about **local users** on a host. They
@@ -45,7 +46,7 @@ users:
## Attributes
-[%CFEngine_include_markdown(common-attributes-include.markdown)%]
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
### description
@@ -56,7 +57,7 @@ The exact use of this string depends on the operating system,
but most systems treat it as the full name of the user and therefore
display it on graphical login terminals.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -74,7 +75,7 @@ users:
**Note:** On Windows, no difference exists between primary and
secondary groups so specifying either one works.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -93,7 +94,7 @@ secondary group membership(s), in addition to his/her primary group.
**Note:** On Windows, no difference exists between primary and
secondary groups so specifying either one works.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -118,13 +119,13 @@ pass it in.
Note that this attribute does not set the home directory in the user
database. For that, you must use the `home_dir` attribute.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
-[%CFEngine_include_snippet(users_type.cf, ### Users main BEGIN ###, ### Users main END ###)%]
+{{< CFEngine_include_snippet(users_type.cf, ### Users main BEGIN ###, ### Users main END ###) >}}
-[%CFEngine_include_snippet(users_type.cf, ### Home Bundle BEGIN ###, ### Home Bundle END ###)%]
+{{< CFEngine_include_snippet(users_type.cf, ### Home Bundle BEGIN ###, ### Home Bundle END ###) >}}
This example uses implicit looping to create the two users, "jack"
and "john." Each has his respective home directory that is created by
@@ -136,7 +137,7 @@ the `files` promise.
in the current bundle are inherited by the bundle specified in the
`home_bundle` attribute.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -176,7 +177,7 @@ Note that this attribute does not create the directory. For that you
must use the `home_bundle` attribute. This just sets the home
directory in the user database.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -225,7 +226,7 @@ the password in plain text.
due to a lack of support from the operating system for setting
hashed passwords.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -243,7 +244,7 @@ body password user_password
The format of the password data depends on the `format` attribute.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -282,7 +283,7 @@ on Solaris it is not possible to set the account expiration date in this
way, hence SSH logins may still work there after an account is locked
and additional steps may be required.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -297,7 +298,7 @@ users:
**Description:** The `shell` attribute specifies the user's login
shell.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
@@ -315,7 +316,7 @@ Note that if the UID of an existing user is changed, the files owned
by that user do not automatically change ownership. You must create a
separate `files` promise for this.
-[%CFEngine_promise_attribute()%]
+{{< CFEngine_promise_attribute() >}}
**Example:**
diff --git a/reference/promise-types/vars.markdown b/content/reference/promise-types/vars.markdown
similarity index 96%
rename from reference/promise-types/vars.markdown
rename to content/reference/promise-types/vars.markdown
index 312813ee8..1aed22cb3 100644
--- a/reference/promise-types/vars.markdown
+++ b/content/reference/promise-types/vars.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: vars
-published: true
+aliases:
+ - "/reference-promise-types-vars.html"
---
[Variables][variables] in CFEngine are defined
@@ -229,11 +230,11 @@ variable references in your inline JSON or YAML data.
For example:
#### Inline Yaml example
-[%CFEngine_include_example(inline-yaml.cf)%]
+{{< CFEngine_include_example(inline-yaml.cf) >}}
#### Inline Json example
-[%CFEngine_include_example(inline-json.cf)%]
+{{< CFEngine_include_example(inline-json.cf) >}}
### Passing data containers to bundles
@@ -257,11 +258,11 @@ maps, as per the JSON standard, is not guaranteed. Similarly, calling
0, 1, 2, ... but will not give the keys of a map in any particular
order. Here's an example of iterating in list order:
-[%CFEngine_include_snippet(container_iteration.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(container_iteration.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(container_iteration.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(container_iteration.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
Often you need to iterate through the keys of a container, and the
value is a key-value property map for that key. The example here shows
@@ -269,11 +270,11 @@ how you can pass the "animals" container and an "animal" key inside it
to a bundle, which can then report and use the data from the key-value
property map.
-[%CFEngine_include_snippet(container_key_iteration.cf, #\+begin_src cfengine3, .*end_src)%]
+{{< CFEngine_include_snippet(container_key_iteration.cf, #\+begin_src cfengine3, .*end_src) >}}
Output:
-[%CFEngine_include_snippet(container_key_iteration.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(container_key_iteration.cf, #\+begin_src\s+example_output\s*, .*end_src) >}}
### data
@@ -303,6 +304,8 @@ vars:
## Attributes
+{{< CFEngine_include_markdown(common-attributes.include.markdown) >}}
+
### policy
**Description:** The policy for (dis)allowing (re)definition of variables
diff --git a/reference/special-variables.markdown b/content/reference/special-variables/_index.markdown
similarity index 96%
rename from reference/special-variables.markdown
rename to content/reference/special-variables/_index.markdown
index 29bb1808b..7349a261a 100644
--- a/reference/special-variables.markdown
+++ b/content/reference/special-variables/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Special variables
-published: true
sorting: 50
+aliases:
+ - "/reference-special-variables.html"
---
Variables are promises that can be defined in any promise bundle. Users can create their
diff --git a/reference/special-variables/connection.markdown b/content/reference/special-variables/connection.markdown
similarity index 96%
rename from reference/special-variables/connection.markdown
rename to content/reference/special-variables/connection.markdown
index 253b45da8..adf244a45 100644
--- a/reference/special-variables/connection.markdown
+++ b/content/reference/special-variables/connection.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: connection
-published: true
+aliases:
+ - "/reference-special-variables-connection.html"
---
The context `connection` is used by the `shortcut` attribute in `access`
diff --git a/reference/special-variables/const.markdown b/content/reference/special-variables/const.markdown
similarity index 94%
rename from reference/special-variables/const.markdown
rename to content/reference/special-variables/const.markdown
index a523ffd75..8eb47b7d4 100644
--- a/reference/special-variables/const.markdown
+++ b/content/reference/special-variables/const.markdown
@@ -1,13 +1,14 @@
---
layout: default
title: const
-published: true
+aliases:
+ - "/reference-special-variables-const.html"
---
CFEngine defines a number of variables for embedding unprintable values
or values with special meanings in strings.
-[%CFEngine_include_example(const.cf)%]
+{{< CFEngine_include_example(const.cf) >}}
### const.at
diff --git a/reference/special-variables/def.markdown b/content/reference/special-variables/def.markdown
similarity index 95%
rename from reference/special-variables/def.markdown
rename to content/reference/special-variables/def.markdown
index a8aa32652..292eb8ea2 100644
--- a/reference/special-variables/def.markdown
+++ b/content/reference/special-variables/def.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: def
-published: true
+aliases:
+ - "/reference-special-variables-def.html"
---
The context `def` is populated by the
diff --git a/reference/special-variables/edit.markdown b/content/reference/special-variables/edit.markdown
similarity index 83%
rename from reference/special-variables/edit.markdown
rename to content/reference/special-variables/edit.markdown
index 4b0dffaee..35f83a0c2 100644
--- a/reference/special-variables/edit.markdown
+++ b/content/reference/special-variables/edit.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: edit
-published: true
+aliases:
+ - "/reference-special-variables-edit.html"
---
This context is used to access information about editing promises during
@@ -14,7 +15,7 @@ This variable points to the filename of the file currently making an
edit promise. If the file has been arrived at through a search, this
could be different from the files promiser.
-[%CFEngine_include_example(edit.filename.cf)%]
+{{< CFEngine_include_example(edit.filename.cf) >}}
### edit.empty_before_use
@@ -22,7 +23,7 @@ This variable holds the value of `empty_file_before_editing` from
`edit_defaults` bodies. It's useful for altering behavior within an `edit_line`
bundle depending if the files prior content will or won't have any effect.
-[%CFEngine_include_example(edit.empty_before_use.cf)%]
+{{< CFEngine_include_example(edit.empty_before_use.cf) >}}
**See also:**
diff --git a/reference/special-variables/match.markdown b/content/reference/special-variables/match.markdown
similarity index 93%
rename from reference/special-variables/match.markdown
rename to content/reference/special-variables/match.markdown
index 23b9d2d31..e23451144 100644
--- a/reference/special-variables/match.markdown
+++ b/content/reference/special-variables/match.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: match
-published: true
+aliases:
+ - "/reference-special-variables-match.html"
---
Each time CFEngine matches a string, these values are assigned to a special
diff --git a/reference/special-variables/mon.markdown b/content/reference/special-variables/mon.markdown
similarity index 99%
rename from reference/special-variables/mon.markdown
rename to content/reference/special-variables/mon.markdown
index 126ff27c2..652f2045e 100644
--- a/reference/special-variables/mon.markdown
+++ b/content/reference/special-variables/mon.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: mon
-published: true
+aliases:
+ - "/reference-special-variables-mon.html"
---
The variables discovered by `cf-monitord` are placed in this monitoring
diff --git a/reference/special-variables/sys.markdown b/content/reference/special-variables/sys.markdown
similarity index 99%
rename from reference/special-variables/sys.markdown
rename to content/reference/special-variables/sys.markdown
index 87f5a3370..08851129d 100644
--- a/reference/special-variables/sys.markdown
+++ b/content/reference/special-variables/sys.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: sys
-published: true
+aliases:
+ - "/reference-special-variables-sys.html"
---
System variables are derived from CFEngine's automated discovery of system
@@ -816,11 +817,11 @@ variables report to the CFEngine Enterprise Database.
**Example:**
-[%CFEngine_include_snippet(sys_interfaces_ip_addresses_ipv4.cf, #\+begin_src\s+cfengine3\s*, .*end_src)%]
+{{< CFEngine_include_snippet(sys_interfaces_ip_addresses_ipv4.cf, #\+begin_src\s+cfengine3\s*, .*end_src) >}}
**Example Output:**
-[%CFEngine_include_snippet(sys_interfaces_ip_addresses_ipv4.cf, #\+begin_src\s+static_example_output\s*, .*end_src)%]
+{{< CFEngine_include_snippet(sys_interfaces_ip_addresses_ipv4.cf, #\+begin_src\s+static_example_output\s*, .*end_src) >}}
**History:** Was introduced in 3.3.0, Enterprise 2.2.0 (2011)
diff --git a/reference/special-variables/this.markdown b/content/reference/special-variables/this.markdown
similarity index 98%
rename from reference/special-variables/this.markdown
rename to content/reference/special-variables/this.markdown
index f355954c7..0c766155c 100644
--- a/reference/special-variables/this.markdown
+++ b/content/reference/special-variables/this.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: this
-published: true
+aliases:
+ - "/reference-special-variables-this.html"
---
The context `this` is used to access information about promises during
diff --git a/release-notes.markdown b/content/release-notes/_index.markdown
similarity index 67%
rename from release-notes.markdown
rename to content/release-notes/_index.markdown
index 3bb6bcb44..8459bd36b 100644
--- a/release-notes.markdown
+++ b/content/release-notes/_index.markdown
@@ -1,12 +1,13 @@
---
layout: default
title: Release notes
-published: true
sorting: 30
+aliases:
+ - "/release-notes.html"
---
-* [New in CFEngine][New in CFEngine]
- Learn about the newest features in CFEngine {{site.CFE_manuals_version}}
+- [New in CFEngine][New in CFEngine]
+ Learn about the newest features in CFEngine {{< params "CFE_manuals_version" >}}
* [Supported platforms and versions][Supported platforms and versions]
These are the supported platforms for the current release.
diff --git a/content/release-notes/known-issues.markdown b/content/release-notes/known-issues.markdown
new file mode 100644
index 000000000..8785a833b
--- /dev/null
+++ b/content/release-notes/known-issues.markdown
@@ -0,0 +1,36 @@
+---
+layout: default
+title: Known issues
+sorting: 50
+aliases:
+ - "/release-notes-known-issues.html"
+---
+
+CFEngine defects are managed in our [bug tracker][bug tracker]. Please report
+bugs or unexpected behavior there, following the documented guideline for new
+bug reports.
+
+- Issues [affecting {{< params "CFE_manuals_version" >}}](https://northerntech.atlassian.net/issues/?jql=project+in+%28ENT%2C+CFE%29+AND+affectedVersion+%7E+%22{{< params "CFE_manuals_version" >}}.%2A%22+AND+status+not+in+%28+%22Rejected%22%29)
+- Issues [fixed in {{< params "CFE_manuals_version" >}}](https://northerntech.atlassian.net/issues/?jql=project+in+%28ENT%2C+CFE%29+AND+fixVersion+%7E+%22{{< params "CFE_manuals_version" >}}.%2A%22)
+
+On this page (below) we will only mention a subset of known issues, which are very severe or noticeable, which we'd like to communicate with users.
+
+## 3.26.0 Hub package installation hangs with cf-remote on Ubuntu
+
+**Ticket:** [CFE-4528](https://northerntech.atlassian.net/browse/CFE-4528)
+
+The `dpkg -i` command seems to cause cf-remote to hang forever in this particular case.
+Issue is specific to 3.26.0, hub, and Ubuntu.
+Client packages work, other OSes work, and previous versions also work.
+We will fix this issue before 3.27.0 LTS.
+
+**Workarounds:**
+
+- If you've already ran the command and see it hanging:
+ - Open another terminal and connect with SSH.
+ - Look at the installation log (`sudo less /var/log/CFEngineInstall.log`).
+ - You should see that installation completed successfully and there is a setup code.
+ - Interrupt (Ctrl-c) the hanging `cf-remote` command.
+ - Run bootstrap manually.
+ - Use the setup code from the install log to set up Mission Portal for the first time.
+- Otherwise, just download and install CFEngine manually, without cf-remote, or use a different platform, like RHEL, for your hub.
diff --git a/release-notes/legal-and-licenses.markdown b/content/release-notes/legal-and-licenses.markdown
similarity index 99%
rename from release-notes/legal-and-licenses.markdown
rename to content/release-notes/legal-and-licenses.markdown
index 6039938ed..349a302f9 100644
--- a/release-notes/legal-and-licenses.markdown
+++ b/content/release-notes/legal-and-licenses.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: Legal and licenses
-published: true
sorting: 999
alias: legal.html
+aliases:
+ - "/release-notes-legal-and-licenses.html"
---
## General legal disclaimer
diff --git a/release-notes/supported-platforms.markdown b/content/release-notes/supported-platforms.markdown
similarity index 53%
rename from release-notes/supported-platforms.markdown
rename to content/release-notes/supported-platforms.markdown
index 0746f465a..6bd63a55d 100644
--- a/release-notes/supported-platforms.markdown
+++ b/content/release-notes/supported-platforms.markdown
@@ -2,7 +2,8 @@
layout: default
title: Supported platforms and versions
sorting: 20
-published: true
+aliases:
+ - "/release-notes-supported-platforms.html"
---
CFEngine works on a wide range of platforms, and the CFEngine team strives to
@@ -12,31 +13,32 @@ for all supported platforms and [binary packages for popular Linux distributions
## Hub
-| Platform | Versions | Architecture |
-|:-----------:|:--------------------------:|:------------:|
-| CentOS/RHEL | 7, 8.1+, 9 | x86-64 |
-| Debian | 9, 10, 11, 12 | x86-64 |
-| Debian | 11, 12 | arm64 |
-| Ubuntu | 18.04, 20.04, 22.04, 24.04 | x86-64 |
-| Ubuntu | 22.04, 24.04 | arm64 |
+| Platform | Versions | Architecture |
+| :---------: | :-----------------: | :----------: |
+| CentOS/RHEL | 7, 8.1+, 9, 10 | x86-64 |
+| CentOS/RHEL | 10 | arm64 |
+| Debian | 11, 12, 13 | x86-64 |
+| Debian | 11, 12, 13 | arm64 |
+| Ubuntu | 20.04, 22.04, 24.04 | x86-64 |
+| Ubuntu | 22.04, 24.04 | arm64 |
Any supported host can be a policy server in Community installations of CFEngine.
## Clients
-| Platform | Versions | Architectures |
-|:-----------:|:--------------------------------:|:-------------:|
-| AIX | 7.1, 7.2 | PowerPC |
-| CentOS/RHEL | 6, 7, 8.1+, 9 | x86-64 |
-| Debian | 9, 10, 11, 12 | x86-64 |
-| Debian | 11, 12 | arm64 |
-| HP-UX | 11.31+ | Itanium |
-| SLES | 12, 15 | x86-64 |
-| Solaris | 11 | UltraSparc |
-| Ubuntu | 16.04 18.04, 20.04, 22.04, 24.04 | x86-64 |
-| Ubuntu | 22.04, 24.04 | arm64 |
-| Windows | 2012, 2016, 2019 | x86-64, x86 |
-
+| Platform | Versions | Architectures |
+| :---------: | :-----------------: | :-----------: |
+| AIX | 7.1, 7.2 | PowerPC |
+| CentOS/RHEL | 6, 7, 8.1+, 9, 10 | x86-64 |
+| CentOS/RHEL | 10 | arm64 |
+| Debian | 11, 12, 13 | x86-64 |
+| Debian | 11, 12, 13 | arm64 |
+| HP-UX | 11.31+ | Itanium |
+| SLES | 12, 15 | x86-64 |
+| Solaris | 11 | UltraSparc |
+| Ubuntu | 20.04, 22.04, 24.04 | x86-64 |
+| Ubuntu | 22.04, 24.04 | arm64 |
+| Windows | 2012, 2016, 2019 | x86-64 |
[Known issues][] also includes platform-specific notes.
diff --git a/release-notes/whatsnew.markdown b/content/release-notes/whatsnew/_index.markdown
similarity index 83%
rename from release-notes/whatsnew.markdown
rename to content/release-notes/whatsnew/_index.markdown
index 94580d30e..8ba756dce 100644
--- a/release-notes/whatsnew.markdown
+++ b/content/release-notes/whatsnew/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: New in CFEngine
-published: true
sorting: 10
+aliases:
+ - "/release-notes-whatsnew.html"
---
See what's new in this release.
diff --git a/release-notes/whatsnew/changelog-core.markdown b/content/release-notes/whatsnew/changelog-core.markdown
similarity index 59%
rename from release-notes/whatsnew/changelog-core.markdown
rename to content/release-notes/whatsnew/changelog-core.markdown
index 48b1b911d..b0bd2312a 100644
--- a/release-notes/whatsnew/changelog-core.markdown
+++ b/content/release-notes/whatsnew/changelog-core.markdown
@@ -1,14 +1,11 @@
---
layout: default
title: Changelog
-published: true
sorting: 10
+aliases:
+ - "/release-notes-whatsnew-changelog-core.html"
---
**See also:** [Enterprise changelog][Enterprise changelog], [Masterfiles changelog][Masterfiles changelog]
-
-{% raw %}
-[%CFEngine_include_markdown(core/ChangeLog)%]
-{% endraw %}
-
+{{< CFEngine_include_markdown(core/CHANGELOG.md) >}}
diff --git a/release-notes/whatsnew/changelog-enterprise.markdown b/content/release-notes/whatsnew/changelog-enterprise.markdown
similarity index 55%
rename from release-notes/whatsnew/changelog-enterprise.markdown
rename to content/release-notes/whatsnew/changelog-enterprise.markdown
index 7e16a9ff0..4ab90a68c 100644
--- a/release-notes/whatsnew/changelog-enterprise.markdown
+++ b/content/release-notes/whatsnew/changelog-enterprise.markdown
@@ -1,14 +1,11 @@
---
layout: default
title: Enterprise changelog
-published: true
sorting: 30
+aliases:
+ - "/release-notes-whatsnew-changelog-enterprise.html"
---
**See also:** [Core changelog][Changelog], [Masterfiles changelog][Masterfiles changelog]
-
-{% raw %}
-[%CFEngine_include_markdown(enterprise/ChangeLog.Enterprise)%]
-{% endraw %}
-
+{{< CFEngine_include_markdown(enterprise/CHANGELOG.md) >}}
diff --git a/release-notes/whatsnew/changelog-masterfiles-policy-framework.markdown b/content/release-notes/whatsnew/changelog-masterfiles-policy-framework.markdown
similarity index 52%
rename from release-notes/whatsnew/changelog-masterfiles-policy-framework.markdown
rename to content/release-notes/whatsnew/changelog-masterfiles-policy-framework.markdown
index 66fa88380..0116776e7 100644
--- a/release-notes/whatsnew/changelog-masterfiles-policy-framework.markdown
+++ b/content/release-notes/whatsnew/changelog-masterfiles-policy-framework.markdown
@@ -1,14 +1,11 @@
---
layout: default
title: Masterfiles changelog
-published: true
sorting: 20
+aliases:
+ - "/release-notes-whatsnew-changelog-masterfiles-policy-framework.html"
---
**See also:** [Core changelog][Changelog], [Enterprise changelog][Enterprise changelog]
-
-{% raw %}
-[%CFEngine_include_markdown(masterfiles/CHANGELOG.md)%]
-{% endraw %}
-
+{{< CFEngine_include_markdown(masterfiles/CHANGELOG.md) >}}
diff --git a/resources.markdown b/content/resources/_index.markdown
similarity index 63%
rename from resources.markdown
rename to content/resources/_index.markdown
index cefdc3d1f..1729763b9 100644
--- a/resources.markdown
+++ b/content/resources/_index.markdown
@@ -1,6 +1,7 @@
---
layout: default
title: Resources
-published: true
sorting: 80
+aliases:
+ - "/resources.html"
---
diff --git a/resources/additional-topics/BDMA-model.png b/content/resources/additional-topics/BDMA-model.png
similarity index 100%
rename from resources/additional-topics/BDMA-model.png
rename to content/resources/additional-topics/BDMA-model.png
diff --git a/resources/additional-topics/STIGs.cf b/content/resources/additional-topics/STIGs.cf
similarity index 100%
rename from resources/additional-topics/STIGs.cf
rename to content/resources/additional-topics/STIGs.cf
diff --git a/resources/additional-topics/STIGs_readme.txt b/content/resources/additional-topics/STIGs_readme.txt
similarity index 100%
rename from resources/additional-topics/STIGs_readme.txt
rename to content/resources/additional-topics/STIGs_readme.txt
diff --git a/resources/additional-topics.markdown b/content/resources/additional-topics/_index.markdown
similarity index 55%
rename from resources/additional-topics.markdown
rename to content/resources/additional-topics/_index.markdown
index c4f60b940..6d720adc7 100644
--- a/resources/additional-topics.markdown
+++ b/content/resources/additional-topics/_index.markdown
@@ -1,6 +1,7 @@
---
layout: default
title: Additional topics
-published: true
sorting: 20
+aliases:
+ - "/resources-additional-topics.html"
---
diff --git a/resources/additional-topics/adopting-cfengine-mission-plan.png b/content/resources/additional-topics/adopting-cfengine-mission-plan.png
similarity index 100%
rename from resources/additional-topics/adopting-cfengine-mission-plan.png
rename to content/resources/additional-topics/adopting-cfengine-mission-plan.png
diff --git a/resources/additional-topics/agility.markdown b/content/resources/additional-topics/agility.markdown
similarity index 99%
rename from resources/additional-topics/agility.markdown
rename to content/resources/additional-topics/agility.markdown
index 138afeec4..333acf127 100644
--- a/resources/additional-topics/agility.markdown
+++ b/content/resources/additional-topics/agility.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Agility
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-agility.html"
---
## Understanding agility
diff --git a/resources/additional-topics/agility.png b/content/resources/additional-topics/agility.png
similarity index 100%
rename from resources/additional-topics/agility.png
rename to content/resources/additional-topics/agility.png
diff --git a/resources/additional-topics/application-management.markdown b/content/resources/additional-topics/application-management.markdown
similarity index 99%
rename from resources/additional-topics/application-management.markdown
rename to content/resources/additional-topics/application-management.markdown
index 17fc5d439..ef3646dc3 100644
--- a/resources/additional-topics/application-management.markdown
+++ b/content/resources/additional-topics/application-management.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Application management
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-application-management.html"
---
## What is application management?
@@ -235,7 +236,7 @@ Refer to the msi_version body in the standard library.
CFEngine implements Windows packaging using the MSI subsystem, internally
querying the Windows Management Interface for information. However, not all
-Windows systems have the reqired information.
+Windows systems have the required information.
CFEngine relies on the name (lower-cased with spaces replaced by hyphen) and
version fields found inside the msi packages to look for upgrades in the package
diff --git a/resources/additional-topics/authority-paradox.png b/content/resources/additional-topics/authority-paradox.png
similarity index 100%
rename from resources/additional-topics/authority-paradox.png
rename to content/resources/additional-topics/authority-paradox.png
diff --git a/resources/additional-topics/bow-tie-delegation.png b/content/resources/additional-topics/bow-tie-delegation.png
similarity index 100%
rename from resources/additional-topics/bow-tie-delegation.png
rename to content/resources/additional-topics/bow-tie-delegation.png
diff --git a/resources/additional-topics/build-deploy-manage-audit.markdown b/content/resources/additional-topics/build-deploy-manage-audit.markdown
similarity index 99%
rename from resources/additional-topics/build-deploy-manage-audit.markdown
rename to content/resources/additional-topics/build-deploy-manage-audit.markdown
index 930a76b86..da3a6b389 100644
--- a/resources/additional-topics/build-deploy-manage-audit.markdown
+++ b/content/resources/additional-topics/build-deploy-manage-audit.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Build Deploy Manage Audit
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-build-deploy-manage-audit.html"
---
## What is BDMA?
diff --git a/resources/additional-topics/cfengine-relationship-to-infrastructure.png b/content/resources/additional-topics/cfengine-relationship-to-infrastructure.png
similarity index 100%
rename from resources/additional-topics/cfengine-relationship-to-infrastructure.png
rename to content/resources/additional-topics/cfengine-relationship-to-infrastructure.png
diff --git a/resources/additional-topics/change-management.markdown b/content/resources/additional-topics/change-management.markdown
similarity index 99%
rename from resources/additional-topics/change-management.markdown
rename to content/resources/additional-topics/change-management.markdown
index abfddef63..30ee3da35 100644
--- a/resources/additional-topics/change-management.markdown
+++ b/content/resources/additional-topics/change-management.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Change management
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-change-management.html"
---
## What is change management?
diff --git a/resources/additional-topics/cloud-computing.markdown b/content/resources/additional-topics/cloud-computing.markdown
similarity index 99%
rename from resources/additional-topics/cloud-computing.markdown
rename to content/resources/additional-topics/cloud-computing.markdown
index 4090fae70..3dabbbc3a 100644
--- a/resources/additional-topics/cloud-computing.markdown
+++ b/content/resources/additional-topics/cloud-computing.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Cloud computing
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-cloud-computing.html"
---
## What is cloud computing?
diff --git a/resources/additional-topics/content-driven-policy.markdown b/content/resources/additional-topics/content-driven-policy.markdown
similarity index 98%
rename from resources/additional-topics/content-driven-policy.markdown
rename to content/resources/additional-topics/content-driven-policy.markdown
index 653b798f7..e8d8d3a23 100644
--- a/resources/additional-topics/content-driven-policy.markdown
+++ b/content/resources/additional-topics/content-driven-policy.markdown
@@ -1,9 +1,10 @@
---
layout: default
title: Content driven policy
-published: true
sorting: 80
reviewed: 2019-05-06
+aliases:
+ - "/resources-additional-topics-content-driven-policy.html"
---
## What is a content-driven policy?
diff --git a/resources/additional-topics/convergence.png b/content/resources/additional-topics/convergence.png
similarity index 100%
rename from resources/additional-topics/convergence.png
rename to content/resources/additional-topics/convergence.png
diff --git a/resources/additional-topics/coordination.png b/content/resources/additional-topics/coordination.png
similarity index 100%
rename from resources/additional-topics/coordination.png
rename to content/resources/additional-topics/coordination.png
diff --git a/resources/additional-topics/demolish.png b/content/resources/additional-topics/demolish.png
similarity index 100%
rename from resources/additional-topics/demolish.png
rename to content/resources/additional-topics/demolish.png
diff --git a/resources/additional-topics/devops.markdown b/content/resources/additional-topics/devops.markdown
similarity index 99%
rename from resources/additional-topics/devops.markdown
rename to content/resources/additional-topics/devops.markdown
index 3578e1842..5fdd1de6e 100644
--- a/resources/additional-topics/devops.markdown
+++ b/content/resources/additional-topics/devops.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: DevOps
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-devops.html"
---
## What is DevOps?
diff --git a/resources/additional-topics/distributed-scheduling.markdown b/content/resources/additional-topics/distributed-scheduling.markdown
similarity index 99%
rename from resources/additional-topics/distributed-scheduling.markdown
rename to content/resources/additional-topics/distributed-scheduling.markdown
index e860ce549..48409bb54 100644
--- a/resources/additional-topics/distributed-scheduling.markdown
+++ b/content/resources/additional-topics/distributed-scheduling.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Distributed scheduling
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-distributed-scheduling.html"
---
## What is distributed scheduling?
diff --git a/resources/additional-topics/fed2.png b/content/resources/additional-topics/fed2.png
similarity index 100%
rename from resources/additional-topics/fed2.png
rename to content/resources/additional-topics/fed2.png
diff --git a/resources/additional-topics/fed3.png b/content/resources/additional-topics/fed3.png
similarity index 100%
rename from resources/additional-topics/fed3.png
rename to content/resources/additional-topics/fed3.png
diff --git a/resources/additional-topics/file-content.markdown b/content/resources/additional-topics/file-content.markdown
similarity index 99%
rename from resources/additional-topics/file-content.markdown
rename to content/resources/additional-topics/file-content.markdown
index fce9e0b37..96084eb20 100644
--- a/resources/additional-topics/file-content.markdown
+++ b/content/resources/additional-topics/file-content.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: File content
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-file-content.html"
---
## From boiler-plates to convergent file editing
diff --git a/resources/additional-topics/file-integrity-monitoring.markdown.breaks_build b/content/resources/additional-topics/file-integrity-monitoring.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/file-integrity-monitoring.markdown.breaks_build
rename to content/resources/additional-topics/file-integrity-monitoring.markdown.breaks_build
diff --git a/resources/additional-topics/hierarchies.markdown b/content/resources/additional-topics/hierarchies.markdown
similarity index 99%
rename from resources/additional-topics/hierarchies.markdown
rename to content/resources/additional-topics/hierarchies.markdown
index d82350888..9d00162c8 100644
--- a/resources/additional-topics/hierarchies.markdown
+++ b/content/resources/additional-topics/hierarchies.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Hierarchies
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-hierarchies.html"
---
Authority, Structure and Inheritance
diff --git a/resources/additional-topics/hierarchy-vs-team.png b/content/resources/additional-topics/hierarchy-vs-team.png
similarity index 100%
rename from resources/additional-topics/hierarchy-vs-team.png
rename to content/resources/additional-topics/hierarchy-vs-team.png
diff --git a/resources/additional-topics/inherit.png b/content/resources/additional-topics/inherit.png
similarity index 100%
rename from resources/additional-topics/inherit.png
rename to content/resources/additional-topics/inherit.png
diff --git a/resources/additional-topics/iteration.markdown b/content/resources/additional-topics/iteration.markdown
similarity index 99%
rename from resources/additional-topics/iteration.markdown
rename to content/resources/additional-topics/iteration.markdown
index 6f75739a6..91a0f5b69 100644
--- a/resources/additional-topics/iteration.markdown
+++ b/content/resources/additional-topics/iteration.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Iteration (Loops)
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-iteration.html"
---
## What is iteration?
diff --git a/resources/additional-topics/itil-cfengine.png b/content/resources/additional-topics/itil-cfengine.png
similarity index 100%
rename from resources/additional-topics/itil-cfengine.png
rename to content/resources/additional-topics/itil-cfengine.png
diff --git a/resources/additional-topics/itil.markdown b/content/resources/additional-topics/itil.markdown
similarity index 99%
rename from resources/additional-topics/itil.markdown
rename to content/resources/additional-topics/itil.markdown
index cd427a84a..848f45d1b 100644
--- a/resources/additional-topics/itil.markdown
+++ b/content/resources/additional-topics/itil.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: ITIL
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-itil.html"
---
## What it ITIL?
@@ -412,14 +413,14 @@ know how much equipment is in use and how much can be brought in at a moment's
notice to solve a business problem. These are a few of the reasons why we need
to keep track of assets.
-{% comment %}
+
### Change management in the enterprise
diff --git a/resources/additional-topics/km1.png b/content/resources/additional-topics/km1.png
similarity index 100%
rename from resources/additional-topics/km1.png
rename to content/resources/additional-topics/km1.png
diff --git a/resources/additional-topics/km2.png b/content/resources/additional-topics/km2.png
similarity index 100%
rename from resources/additional-topics/km2.png
rename to content/resources/additional-topics/km2.png
diff --git a/resources/additional-topics/km3.png b/content/resources/additional-topics/km3.png
similarity index 100%
rename from resources/additional-topics/km3.png
rename to content/resources/additional-topics/km3.png
diff --git a/resources/additional-topics/km4.png b/content/resources/additional-topics/km4.png
similarity index 100%
rename from resources/additional-topics/km4.png
rename to content/resources/additional-topics/km4.png
diff --git a/resources/additional-topics/km5.png b/content/resources/additional-topics/km5.png
similarity index 100%
rename from resources/additional-topics/km5.png
rename to content/resources/additional-topics/km5.png
diff --git a/resources/additional-topics/km6.png b/content/resources/additional-topics/km6.png
similarity index 100%
rename from resources/additional-topics/km6.png
rename to content/resources/additional-topics/km6.png
diff --git a/resources/additional-topics/km7.png b/content/resources/additional-topics/km7.png
similarity index 100%
rename from resources/additional-topics/km7.png
rename to content/resources/additional-topics/km7.png
diff --git a/resources/additional-topics/km8.png b/content/resources/additional-topics/km8.png
similarity index 100%
rename from resources/additional-topics/km8.png
rename to content/resources/additional-topics/km8.png
diff --git a/resources/additional-topics/km9.png b/content/resources/additional-topics/km9.png
similarity index 100%
rename from resources/additional-topics/km9.png
rename to content/resources/additional-topics/km9.png
diff --git a/resources/additional-topics/knowledge-management.markdown.breaks_build b/content/resources/additional-topics/knowledge-management.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/knowledge-management.markdown.breaks_build
rename to content/resources/additional-topics/knowledge-management.markdown.breaks_build
diff --git a/resources/additional-topics/menu-driven-configuration.markdown.breaks_build b/content/resources/additional-topics/menu-driven-configuration.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/menu-driven-configuration.markdown.breaks_build
rename to content/resources/additional-topics/menu-driven-configuration.markdown.breaks_build
diff --git a/resources/additional-topics/mission-critical-operations.markdown.breaks_build b/content/resources/additional-topics/mission-critical-operations.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/mission-critical-operations.markdown.breaks_build
rename to content/resources/additional-topics/mission-critical-operations.markdown.breaks_build
diff --git a/resources/additional-topics/modularity.markdown b/content/resources/additional-topics/modularity.markdown
similarity index 99%
rename from resources/additional-topics/modularity.markdown
rename to content/resources/additional-topics/modularity.markdown
index 70ec67fab..6dd9708c0 100644
--- a/resources/additional-topics/modularity.markdown
+++ b/content/resources/additional-topics/modularity.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Modularity and orchestrating system policy
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-modularity.html"
---
## What is modularity?
diff --git a/resources/additional-topics/monitoring.markdown.breaks_build b/content/resources/additional-topics/monitoring.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/monitoring.markdown.breaks_build
rename to content/resources/additional-topics/monitoring.markdown.breaks_build
diff --git a/resources/additional-topics/network-organizational-structures.png b/content/resources/additional-topics/network-organizational-structures.png
similarity index 100%
rename from resources/additional-topics/network-organizational-structures.png
rename to content/resources/additional-topics/network-organizational-structures.png
diff --git a/resources/additional-topics/open-nebula-architecture.png b/content/resources/additional-topics/open-nebula-architecture.png
similarity index 100%
rename from resources/additional-topics/open-nebula-architecture.png
rename to content/resources/additional-topics/open-nebula-architecture.png
diff --git a/resources/additional-topics/open-nebula.markdown b/content/resources/additional-topics/open-nebula.markdown
similarity index 99%
rename from resources/additional-topics/open-nebula.markdown
rename to content/resources/additional-topics/open-nebula.markdown
index 72154e506..13bd6df30 100644
--- a/resources/additional-topics/open-nebula.markdown
+++ b/content/resources/additional-topics/open-nebula.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Using CFEngine with Open Nebula
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-open-nebula.html"
---
## What is Open Nebula?
diff --git a/resources/additional-topics/orchestration.markdown b/content/resources/additional-topics/orchestration.markdown
similarity index 99%
rename from resources/additional-topics/orchestration.markdown
rename to content/resources/additional-topics/orchestration.markdown
index eab20b871..9bd8a9b38 100644
--- a/resources/additional-topics/orchestration.markdown
+++ b/content/resources/additional-topics/orchestration.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Orchestration
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-orchestration.html"
---
## What is organizational complexity?
diff --git a/content/resources/additional-topics/overlapping-sets.png b/content/resources/additional-topics/overlapping-sets.png
new file mode 100644
index 000000000..cd1f0731f
Binary files /dev/null and b/content/resources/additional-topics/overlapping-sets.png differ
diff --git a/resources/additional-topics/package-flow.png b/content/resources/additional-topics/package-flow.png
similarity index 100%
rename from resources/additional-topics/package-flow.png
rename to content/resources/additional-topics/package-flow.png
diff --git a/resources/additional-topics/package-management.markdown.breaks_build b/content/resources/additional-topics/package-management.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/package-management.markdown.breaks_build
rename to content/resources/additional-topics/package-management.markdown.breaks_build
diff --git a/resources/additional-topics/policy-distribution-fanout.png b/content/resources/additional-topics/policy-distribution-fanout.png
similarity index 100%
rename from resources/additional-topics/policy-distribution-fanout.png
rename to content/resources/additional-topics/policy-distribution-fanout.png
diff --git a/resources/additional-topics/reporting.markdown.breaks_build b/content/resources/additional-topics/reporting.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/reporting.markdown.breaks_build
rename to content/resources/additional-topics/reporting.markdown.breaks_build
diff --git a/resources/additional-topics/role-based-access-control.markdown.breaks_build b/content/resources/additional-topics/role-based-access-control.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/role-based-access-control.markdown.breaks_build
rename to content/resources/additional-topics/role-based-access-control.markdown.breaks_build
diff --git a/resources/additional-topics/rollback.markdown.breaks_build b/content/resources/additional-topics/rollback.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/rollback.markdown.breaks_build
rename to content/resources/additional-topics/rollback.markdown.breaks_build
diff --git a/resources/additional-topics/scale-and-scalability.markdown.breaks_build b/content/resources/additional-topics/scale-and-scalability.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/scale-and-scalability.markdown.breaks_build
rename to content/resources/additional-topics/scale-and-scalability.markdown.breaks_build
diff --git a/resources/additional-topics/scheduleing-jobs.markdown.breaks_build b/content/resources/additional-topics/scheduleing-jobs.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/scheduleing-jobs.markdown.breaks_build
rename to content/resources/additional-topics/scheduleing-jobs.markdown.breaks_build
diff --git a/resources/additional-topics/scheduleing-patterns.png b/content/resources/additional-topics/scheduleing-patterns.png
similarity index 100%
rename from resources/additional-topics/scheduleing-patterns.png
rename to content/resources/additional-topics/scheduleing-patterns.png
diff --git a/resources/additional-topics/security.markdown b/content/resources/additional-topics/security.markdown
similarity index 99%
rename from resources/additional-topics/security.markdown
rename to content/resources/additional-topics/security.markdown
index 2ea2b867d..04f9e51e8 100644
--- a/resources/additional-topics/security.markdown
+++ b/content/resources/additional-topics/security.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Security
-published: True
sorting: 80
+aliases:
+ - "/resources-additional-topics-security.html"
---
Diego Zamboni, discusses why CFEngine is a critical component of maintaining IT system security. Many vulnerabilities are directly caused by faulty configurations, so security is closely linked to how well configuration management works.
diff --git a/resources/additional-topics/single-points-of-failure.png b/content/resources/additional-topics/single-points-of-failure.png
similarity index 100%
rename from resources/additional-topics/single-points-of-failure.png
rename to content/resources/additional-topics/single-points-of-failure.png
diff --git a/resources/additional-topics/stigs.markdown b/content/resources/additional-topics/stigs.markdown
similarity index 98%
rename from resources/additional-topics/stigs.markdown
rename to content/resources/additional-topics/stigs.markdown
index b78c1517c..51c732326 100644
--- a/resources/additional-topics/stigs.markdown
+++ b/content/resources/additional-topics/stigs.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: STIGs
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-stigs.html"
---
## CFEngine STIGs compliance example
diff --git a/resources/additional-topics/teamwork.markdown b/content/resources/additional-topics/teamwork.markdown
similarity index 99%
rename from resources/additional-topics/teamwork.markdown
rename to content/resources/additional-topics/teamwork.markdown
index 5721ebff4..1af892715 100644
--- a/resources/additional-topics/teamwork.markdown
+++ b/content/resources/additional-topics/teamwork.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Teamwork
-published: true
sorting: 80
+aliases:
+ - "/resources-additional-topics-teamwork.html"
---
## What is team-work?
diff --git a/resources/additional-topics/understanding.png b/content/resources/additional-topics/understanding.png
similarity index 100%
rename from resources/additional-topics/understanding.png
rename to content/resources/additional-topics/understanding.png
diff --git a/resources/additional-topics/virtualization.markdown.breaks_build b/content/resources/additional-topics/virtualization.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/virtualization.markdown.breaks_build
rename to content/resources/additional-topics/virtualization.markdown.breaks_build
diff --git a/resources/additional-topics/windows-management.markdown.breaks_build b/content/resources/additional-topics/windows-management.markdown.breaks_build
similarity index 100%
rename from resources/additional-topics/windows-management.markdown.breaks_build
rename to content/resources/additional-topics/windows-management.markdown.breaks_build
diff --git a/resources/best-practices.markdown b/content/resources/best-practices.markdown
similarity index 98%
rename from resources/best-practices.markdown
rename to content/resources/best-practices.markdown
index eea976d52..c737db2e4 100644
--- a/resources/best-practices.markdown
+++ b/content/resources/best-practices.markdown
@@ -2,7 +2,8 @@
layout: default
title: Best practices
sorting: 100
-published: true
+aliases:
+ - "/resources-best-practices.html"
---
## Policy style guide
diff --git a/resources/external-resources.markdown b/content/resources/external-resources.markdown
similarity index 96%
rename from resources/external-resources.markdown
rename to content/resources/external-resources.markdown
index e6fa65d68..3a665ded9 100644
--- a/resources/external-resources.markdown
+++ b/content/resources/external-resources.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: External resources
-published: true
sorting: 30
+aliases:
+ - "/resources-external-resources.html"
---
Use the following links to learn more about CFEngine:
@@ -76,7 +77,7 @@ target="_blank">LinkedIn
* Facebook
-* The #cfengine IRC channel on the [libera.chat](https://web.libera.chat/?channel=#cfengine) network.
+* The #CFEngine Matrix channel (#CFEngine:matrix.org).
If you want to learn more about how CFEngine can help you and your
organization, [contact us][contact us].
diff --git a/resources/faq.markdown b/content/resources/faq/_index.markdown
similarity index 88%
rename from resources/faq.markdown
rename to content/resources/faq/_index.markdown
index 026b0366e..30785e290 100644
--- a/resources/faq.markdown
+++ b/content/resources/faq/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: FAQ
-published: true
sorting: 10
+aliases:
+ - "/resources-faq.html"
---
This is a collection of frequently asked questions. Contributions in the form of
diff --git a/resources/faq/agents-not-running.png b/content/resources/faq/agents-not-running.png
similarity index 100%
rename from resources/faq/agents-not-running.png
rename to content/resources/faq/agents-not-running.png
diff --git a/resources/faq/bootstrap-failed.markdown b/content/resources/faq/bootstrap-failed.markdown
similarity index 99%
rename from resources/faq/bootstrap-failed.markdown
rename to content/resources/faq/bootstrap-failed.markdown
index df8a1b90f..f9442babb 100644
--- a/resources/faq/bootstrap-failed.markdown
+++ b/content/resources/faq/bootstrap-failed.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Bootstrapping
-published: true
+aliases:
+ - "/resources-faq-bootstrap-failed.html"
---
Frequently asked questions around bootstrapping, the process of starting CFEngine for the first time, and connecting the agents to the correct policy server.
diff --git a/resources/faq/debugging-slow-queries.markdown b/content/resources/faq/debugging-slow-queries.markdown
similarity index 93%
rename from resources/faq/debugging-slow-queries.markdown
rename to content/resources/faq/debugging-slow-queries.markdown
index 603dc5da4..d31cc0ab1 100644
--- a/resources/faq/debugging-slow-queries.markdown
+++ b/content/resources/faq/debugging-slow-queries.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Debugging slow queries
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-debugging-slow-queries.html"
---
If Mission Portal seems to take too much time to generate pages or reports or if API calls seem
diff --git a/resources/faq/enterprise-changes-ui.png b/content/resources/faq/enterprise-changes-ui.png
similarity index 100%
rename from resources/faq/enterprise-changes-ui.png
rename to content/resources/faq/enterprise-changes-ui.png
diff --git a/resources/faq/enterprise-license.markdown b/content/resources/faq/enterprise-license.markdown
similarity index 95%
rename from resources/faq/enterprise-license.markdown
rename to content/resources/faq/enterprise-license.markdown
index 8c4e9fb0c..bd4ad7b27 100644
--- a/resources/faq/enterprise-license.markdown
+++ b/content/resources/faq/enterprise-license.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Requesting a CFEngine Enterprise License
-published: true
sorting: 40
+aliases:
+ - "/resources-faq-enterprise-license.html"
---
To get a license please open a [support request](https://support.northern.tech)
diff --git a/resources/faq/enterprise-report-collection.markdown b/content/resources/faq/enterprise-report-collection.markdown
similarity index 98%
rename from resources/faq/enterprise-report-collection.markdown
rename to content/resources/faq/enterprise-report-collection.markdown
index b728b1795..34710f953 100644
--- a/resources/faq/enterprise-report-collection.markdown
+++ b/content/resources/faq/enterprise-report-collection.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Enterprise report collection
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-enterprise-report-collection.html"
---
Frequently asked questions on Enterprise report collection.
@@ -26,7 +27,7 @@ in [`body hub control`][cf-hub#control-promises].
## How often does cf-hub re-check the LICENSE
-{% comment %}cf-hub/license-checking.c:#define SECONDS_BETWEEN_CHECKS (5 * SECONDS_PER_MINUTE){% endcomment %}
+
`cf-hub` re-checks the license when it is started and once every 5 minutes after
that.
diff --git a/resources/faq/enterprise-report-filtering.markdown b/content/resources/faq/enterprise-report-filtering.markdown
similarity index 94%
rename from resources/faq/enterprise-report-filtering.markdown
rename to content/resources/faq/enterprise-report-filtering.markdown
index 9f382dedf..21f884566 100644
--- a/resources/faq/enterprise-report-filtering.markdown
+++ b/content/resources/faq/enterprise-report-filtering.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Enterprise Report Filtering
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-enterprise-report-filtering.html"
---
## Filtering inventoried lists
diff --git a/resources/faq/enterprise.markdown b/content/resources/faq/enterprise.markdown
similarity index 97%
rename from resources/faq/enterprise.markdown
rename to content/resources/faq/enterprise.markdown
index 5b3c43667..63a43a993 100644
--- a/resources/faq/enterprise.markdown
+++ b/content/resources/faq/enterprise.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Enterprise reporting database
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-enterprise.html"
---
Frequently asked questions on the Enterprise reporting database.
diff --git a/resources/faq/fhs.markdown b/content/resources/faq/fhs.markdown
similarity index 97%
rename from resources/faq/fhs.markdown
rename to content/resources/faq/fhs.markdown
index ebaf2a288..321e091ba 100644
--- a/resources/faq/fhs.markdown
+++ b/content/resources/faq/fhs.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Why does CFEngine install into /var/cfengine instead of following the FHS?
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-fhs.html"
---
The Unix Filesystem Hierarchy Standard is a specification for standardizing
diff --git a/resources/faq/filter-inventoried-list-items.png b/content/resources/faq/filter-inventoried-list-items.png
similarity index 100%
rename from resources/faq/filter-inventoried-list-items.png
rename to content/resources/faq/filter-inventoried-list-items.png
diff --git a/resources/faq/find-public-key-for-host-sha.markdown b/content/resources/faq/find-public-key-for-host-sha.markdown
similarity index 88%
rename from resources/faq/find-public-key-for-host-sha.markdown
rename to content/resources/faq/find-public-key-for-host-sha.markdown
index 5ce7bb6fd..caf96e39d 100644
--- a/resources/faq/find-public-key-for-host-sha.markdown
+++ b/content/resources/faq/find-public-key-for-host-sha.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: How do I find the public key for a given host
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-find-public-key-for-host-sha.html"
---
Trying to locate the public key for a host on your hub in order to validate
diff --git a/resources/faq/fix-trust-after-ip-change.markdown b/content/resources/faq/fix-trust-after-ip-change.markdown
similarity index 96%
rename from resources/faq/fix-trust-after-ip-change.markdown
rename to content/resources/faq/fix-trust-after-ip-change.markdown
index 3a2eeba14..c84547441 100644
--- a/resources/faq/fix-trust-after-ip-change.markdown
+++ b/content/resources/faq/fix-trust-after-ip-change.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: How do I fix trust after an IP change?
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-fix-trust-after-ip-change.html"
---
Symptom:
diff --git a/resources/faq/fix-undefined-body-error.markdown b/content/resources/faq/fix-undefined-body-error.markdown
similarity index 97%
rename from resources/faq/fix-undefined-body-error.markdown
rename to content/resources/faq/fix-undefined-body-error.markdown
index 3ead18a53..30182a606 100644
--- a/resources/faq/fix-undefined-body-error.markdown
+++ b/content/resources/faq/fix-undefined-body-error.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: How do I fix undefined body errors?
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-fix-undefined-body-error.html"
---
When running policy you see `error: Undefined body`. For example:
diff --git a/resources/faq/hosts-not-reporting.png b/content/resources/faq/hosts-not-reporting.png
similarity index 100%
rename from resources/faq/hosts-not-reporting.png
rename to content/resources/faq/hosts-not-reporting.png
diff --git a/content/resources/faq/how-does-cfengine-work-agent-workflow.png b/content/resources/faq/how-does-cfengine-work-agent-workflow.png
new file mode 100644
index 000000000..e44ccfe64
Binary files /dev/null and b/content/resources/faq/how-does-cfengine-work-agent-workflow.png differ
diff --git a/content/resources/faq/how-does-cfengine-work-process.png b/content/resources/faq/how-does-cfengine-work-process.png
new file mode 100644
index 000000000..83023fafa
Binary files /dev/null and b/content/resources/faq/how-does-cfengine-work-process.png differ
diff --git a/resources/faq/integrate-custom-policy.markdown b/content/resources/faq/integrate-custom-policy.markdown
similarity index 98%
rename from resources/faq/integrate-custom-policy.markdown
rename to content/resources/faq/integrate-custom-policy.markdown
index 94d2fed32..c6fe24b75 100644
--- a/resources/faq/integrate-custom-policy.markdown
+++ b/content/resources/faq/integrate-custom-policy.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: How do I integrate custom policy?
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-integrate-custom-policy.html"
---
There are many different ways that custom polices can be organized. CFEngine
diff --git a/resources/faq/inventoried-list-items.png b/content/resources/faq/inventoried-list-items.png
similarity index 100%
rename from resources/faq/inventoried-list-items.png
rename to content/resources/faq/inventoried-list-items.png
diff --git a/resources/faq/manual-execution.markdown b/content/resources/faq/manual-execution.markdown
similarity index 95%
rename from resources/faq/manual-execution.markdown
rename to content/resources/faq/manual-execution.markdown
index 72776e0f8..d822c7ff2 100644
--- a/resources/faq/manual-execution.markdown
+++ b/content/resources/faq/manual-execution.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Manual execution
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-manual-execution.html"
---
Frequently asked questions on manual execution.
@@ -61,7 +62,7 @@ between).
Sometimes it's convenient to run `cf-execd` with `--once`. It will execute
`exec_command` as defined in `body executor control`. In the
[Masterfiles Policy Framework][Masterfiles Policy Framework] this
-[defaults](https://github.com/cfengine/masterfiles/blob/{{site.cfengine.branch}}/controls/cf_execd.cf)
+[defaults](https://github.com/cfengine/masterfiles/blob/{{< params "cfengine.branch" >}}/controls/cf_execd.cf)
to update policy ( `update.cf` ) followed by the default policy ( `promises.cf`
). Output from cf-execd executions is logged to
```$(sys.workdir)/outputs```.
diff --git a/resources/faq/mustache-templating.markdown b/content/resources/faq/mustache-templating.markdown
similarity index 93%
rename from resources/faq/mustache-templating.markdown
rename to content/resources/faq/mustache-templating.markdown
index f57209ac0..35f7bcf29 100644
--- a/resources/faq/mustache-templating.markdown
+++ b/content/resources/faq/mustache-templating.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Mustache templating
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-mustache-templating.html"
---
## CFEngine specific extensions
@@ -36,11 +37,11 @@ This template should not be passed a data container; it uses the `datastate()`
of the CFEngine system. That's where `classes.enterprise` and
`vars.sys.cf_version` came from.
-{% raw %}
+
```
Version: CFEngine {{#classes.enterprise}}Enterprise{{/classes.enterprise}} {{vars.sys.cf_version}}
```
-{% endraw %}
+
## How do I render a section only if a given class is not defined?
@@ -54,11 +55,11 @@ This template should not be passed a data container; it uses the `datastate()`
of the CFEngine system. That's where `classes.cfengine_enterprise` and
`vars.sys.cf_version` came from.
-{% raw %}
+
```
Version: CFEngine {{#classes.cfengine_enterprise}}Enterprise{{/classes.cfengine_enterprise}}{{^classes.cfengine_enterprise}}Community{{/classes.cfengine_enterprise}} {{vars.sys.cf_version}}
```
-{% endraw %}
+
## How do I use class expressions?
@@ -67,30 +68,30 @@ possible to use full class expressions in mustache templates. Instead, use class
expressions inside CFEngine policy to define a singular class which can be used
to conditionally render a block.
-{% raw %}
-[%CFEngine_include_example(mustache_classes.cf)%]
-{% endraw %}
+
+{{< CFEngine_include_example(mustache_classes.cf) >}}
+
## How do I iterate over a list?
This template should not be passed a data container; it uses the `datastate()`
of the CFEngine system. That's where `vars.mon.listening_tcp4_ports` came from.
-{% raw %}
+
```
{{#vars.mon.listening_tcp4_ports}}
* {{.}}
{{/vars.mon.listening_tcp4_ports}}
```
-{% endraw %}
+
## How can I access keys when iterating over a dict?
In CFEngine, the `@` symbol expands to the current key when iterating over a dict.
-{% raw %}
-[%CFEngine_include_example(mustache_extension_expand_key.cf)%]
-{% endraw %}
+
+{{< CFEngine_include_example(mustache_extension_expand_key.cf) >}}
+
## Can you use nested classes?
@@ -99,7 +100,7 @@ In this example for ssh daemon the authorized key configuration will only be add
class `SSH_LDAP_PUBKEY_BUNDLE` is true and for the class debian/centos diffenrent
keywords are added.
-{% raw %}
+
```
{{#classes.SSH_LDAP_PUBKEY_BUNDLE}}
{{#classes.debian}}
@@ -112,4 +113,3 @@ AuthorizedKeysCommandRunAs {{vars.sara_data.ssh.authorized_keys_commanduser}}
{{/classes.centos}}
{{/classes.SSH_LDAP_PUBKEY_BUNDLE}}
```
-{% endraw %}
diff --git a/resources/faq/output-email.markdown b/content/resources/faq/output-email.markdown
similarity index 64%
rename from resources/faq/output-email.markdown
rename to content/resources/faq/output-email.markdown
index cd73db656..8227a8ce6 100644
--- a/resources/faq/output-email.markdown
+++ b/content/resources/faq/output-email.markdown
@@ -1,16 +1,15 @@
---
layout: default
title: Agent output email
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-output-email.html"
---
## How do I set the email where agent reports are sent?
-The agent report email functionality is configured in `body executor control`
-https://github.com/cfengine/masterfiles/blob/{{site.cfengine.branch}}/controls/cf_execd.cf.
-It defaults to `root@$(def.domain)` which is configured in `bundle common def`
-https://github.com/cfengine/masterfiles/blob/{{site.cfengine.branch}}/def.cf.
+The agent report email functionality is configured in `body executor control` ([find in GitHub](https://github.com/search?q=repo%3Acfengine%2Fmasterfiles+mail+path%3A**%2Fcf_execd.cf&type=code)).
+It defaults to `root@$(def.domain)` which is configured in `bundle common def` ([find in GitHub](https://github.com/search?q=repo%3Acfengine%2Fmasterfiles+%22mailto%22+path%3A**%2Fdef.cf&type=code)).
**See also:** [`def.mailto`][Masterfiles Policy Framework#mailto].
diff --git a/resources/faq/show-classes-and-vars.markdown b/content/resources/faq/show-classes-and-vars.markdown
similarity index 84%
rename from resources/faq/show-classes-and-vars.markdown
rename to content/resources/faq/show-classes-and-vars.markdown
index c1a623d9d..adac70ed2 100644
--- a/resources/faq/show-classes-and-vars.markdown
+++ b/content/resources/faq/show-classes-and-vars.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: How can I tell what classes and variables are defined?
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-show-classes-and-vars.html"
---
You can see a high level overview of the first order classes and variables using
@@ -26,7 +27,7 @@ is evaluated.
cf-promises --show-classes
```
-[%CFEngine_include_snippet(cf-promises_--show-classes.txt, [\w], ^$)%]
+{{< CFEngine_include_snippet(cf-promises_--show-classes.txt, [\w], ^$) >}}
## Show first order variables with cf-promises
@@ -34,4 +35,4 @@ cf-promises --show-classes
cf-promises --show-vars
```
-[%CFEngine_include_snippet(cf-promises_--show-classes.txt, [\w], ^$)%]
+{{< CFEngine_include_snippet(cf-promises_--show-classes.txt, [\w], ^$) >}}
diff --git a/resources/faq/tuning-postgresql.markdown b/content/resources/faq/tuning-postgresql.markdown
similarity index 95%
rename from resources/faq/tuning-postgresql.markdown
rename to content/resources/faq/tuning-postgresql.markdown
index bc971f54b..0684dfad3 100644
--- a/resources/faq/tuning-postgresql.markdown
+++ b/content/resources/faq/tuning-postgresql.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Tuning PostgreSQL
-published: true
+aliases:
+ - "/resources-faq-tuning-postgresql.html"
---
During install the CFEngine Enterprise Hub Package pre-configures PostgreSQL with a configuration for low (<3GB), medium (>3GB <64GB) or high (>64GB) memory which adjusts the values of `effective_cache_size`, `shared_buffers`, and `maintenance_work_mem`.
diff --git a/resources/faq/unable-to-log-in-mission-portal.markdown b/content/resources/faq/unable-to-log-in-mission-portal.markdown
similarity index 96%
rename from resources/faq/unable-to-log-in-mission-portal.markdown
rename to content/resources/faq/unable-to-log-in-mission-portal.markdown
index 1f92fe489..5186a77f2 100644
--- a/resources/faq/unable-to-log-in-mission-portal.markdown
+++ b/content/resources/faq/unable-to-log-in-mission-portal.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Unable to log into Mission Portal
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-unable-to-log-in-mission-portal.html"
---
## Mismatched names in SSL certificate
diff --git a/resources/faq/uninstall-reinstall.markdown b/content/resources/faq/uninstall-reinstall.markdown
similarity index 93%
rename from resources/faq/uninstall-reinstall.markdown
rename to content/resources/faq/uninstall-reinstall.markdown
index b572a034d..458a0d319 100644
--- a/resources/faq/uninstall-reinstall.markdown
+++ b/content/resources/faq/uninstall-reinstall.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Uninstalling / reinstalling
-published: true
sorting: 40
+aliases:
+ - "/resources-faq-uninstall-reinstall.html"
---
## What is left behind after uninstalling?
diff --git a/resources/faq/users.markdown b/content/resources/faq/users.markdown
similarity index 66%
rename from resources/faq/users.markdown
rename to content/resources/faq/users.markdown
index cdc6feff7..881f862f4 100644
--- a/resources/faq/users.markdown
+++ b/content/resources/faq/users.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Users
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-users.html"
---
Frequently asked questions about managing users from policy.
@@ -12,4 +13,4 @@ Frequently asked questions about managing users from policy.
To ensure that a local user exists but is locked (for example a service
account) simply specify `policy => "locked"`.
-[%CFEngine_include_snippet(users_type.cf, ### Locked User BEGIN ###, ### Locked User END ###)%]
+{{< CFEngine_include_snippet(users_type.cf, ### Locked User BEGIN ###, ### Locked User END ###) >}}
diff --git a/resources/faq/variables.markdown b/content/resources/faq/variables.markdown
similarity index 95%
rename from resources/faq/variables.markdown
rename to content/resources/faq/variables.markdown
index 00f7853ed..1d0989398 100644
--- a/resources/faq/variables.markdown
+++ b/content/resources/faq/variables.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: How do I pass a data type variable?
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-variables.html"
---
Data type variables also known as "data containers" are passed using the same
diff --git a/resources/faq/what-did-cfengine-change.markdown b/content/resources/faq/what-did-cfengine-change.markdown
similarity index 99%
rename from resources/faq/what-did-cfengine-change.markdown
rename to content/resources/faq/what-did-cfengine-change.markdown
index 0dd0d81e4..4569e983c 100644
--- a/resources/faq/what-did-cfengine-change.markdown
+++ b/content/resources/faq/what-did-cfengine-change.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: What did CFEngine do?
-published: true
+aliases:
+ - "/resources-faq-what-did-cfengine-change.html"
---
This page presents a few ways of understanding what CFEngine has done to your machine.
diff --git a/resources/faq/what-is-promise-locking.markdown b/content/resources/faq/what-is-promise-locking.markdown
similarity index 93%
rename from resources/faq/what-is-promise-locking.markdown
rename to content/resources/faq/what-is-promise-locking.markdown
index 5dd2fe289..5d01212df 100644
--- a/resources/faq/what-is-promise-locking.markdown
+++ b/content/resources/faq/what-is-promise-locking.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: What is promise locking?
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-what-is-promise-locking.html"
---
By default when the agent runs each promise that has an outcome
diff --git a/resources/faq/why-are-files-not-being-distributed.markdown b/content/resources/faq/why-are-files-not-being-distributed.markdown
similarity index 88%
rename from resources/faq/why-are-files-not-being-distributed.markdown
rename to content/resources/faq/why-are-files-not-being-distributed.markdown
index 9b084f103..6aca0d9f6 100644
--- a/resources/faq/why-are-files-not-being-distributed.markdown
+++ b/content/resources/faq/why-are-files-not-being-distributed.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Why are some files inside masterfiles not being updated/distributed?
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-why-are-files-not-being-distributed.html"
---
During agent bootstrap all files found in `masterfiles` are copied to
diff --git a/resources/faq/why-are-remote-agents-not-updating.markdown b/content/resources/faq/why-are-remote-agents-not-updating.markdown
similarity index 95%
rename from resources/faq/why-are-remote-agents-not-updating.markdown
rename to content/resources/faq/why-are-remote-agents-not-updating.markdown
index 74cb7b7b5..975101e80 100644
--- a/resources/faq/why-are-remote-agents-not-updating.markdown
+++ b/content/resources/faq/why-are-remote-agents-not-updating.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Why are remote agents not updating?
-published: true
sorting: 90
+aliases:
+ - "/resources-faq-why-are-remote-agents-not-updating.html"
---
The [masterfiles policy framework][Masterfiles Policy Framework] defaults to using
diff --git a/resources/faq/why-knowledge-management.markdown b/content/resources/faq/why-knowledge-management.markdown
similarity index 90%
rename from resources/faq/why-knowledge-management.markdown
rename to content/resources/faq/why-knowledge-management.markdown
index e8e527c7e..995a50783 100644
--- a/resources/faq/why-knowledge-management.markdown
+++ b/content/resources/faq/why-knowledge-management.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Why knowledge management?
-published: true
sorting: 3
+aliases:
+ - "/resources-faq-why-knowledge-management.html"
---
diff --git a/content/search.markdown b/content/search.markdown
new file mode 100644
index 000000000..9ab1a422d
--- /dev/null
+++ b/content/search.markdown
@@ -0,0 +1,8 @@
+---
+layout: search
+title: Search
+hidden: true
+alias: search
+aliases:
+ - "/search.html"
+---
diff --git a/content/versions.markdown b/content/versions.markdown
new file mode 100644
index 000000000..777495ed6
--- /dev/null
+++ b/content/versions.markdown
@@ -0,0 +1,10 @@
+---
+title: Versions
+hidden: true
+sorting: 1
+aliases:
+ - "/versions.html"
+---
+
+Following versions are available in CFEngine docs.
+{{< includehtml file="static/versions_list.html" >}}
diff --git a/web-ui/Alerts.bottom.condition.type.png b/content/web-ui/Alerts.bottom.condition.type.png
similarity index 100%
rename from web-ui/Alerts.bottom.condition.type.png
rename to content/web-ui/Alerts.bottom.condition.type.png
diff --git a/web-ui/Alerts.bottom.hosts.png b/content/web-ui/Alerts.bottom.hosts.png
similarity index 100%
rename from web-ui/Alerts.bottom.hosts.png
rename to content/web-ui/Alerts.bottom.hosts.png
diff --git a/web-ui/Alerts.bottom.notifications.png b/content/web-ui/Alerts.bottom.notifications.png
similarity index 100%
rename from web-ui/Alerts.bottom.notifications.png
rename to content/web-ui/Alerts.bottom.notifications.png
diff --git a/web-ui/Alerts.new.png b/content/web-ui/Alerts.new.png
similarity index 100%
rename from web-ui/Alerts.new.png
rename to content/web-ui/Alerts.new.png
diff --git a/web-ui/Alerts.top.condition.png b/content/web-ui/Alerts.top.condition.png
similarity index 100%
rename from web-ui/Alerts.top.condition.png
rename to content/web-ui/Alerts.top.condition.png
diff --git a/web-ui/Alerts.top.name.png b/content/web-ui/Alerts.top.name.png
similarity index 100%
rename from web-ui/Alerts.top.name.png
rename to content/web-ui/Alerts.top.name.png
diff --git a/web-ui/Alerts.top.severity.png b/content/web-ui/Alerts.top.severity.png
similarity index 100%
rename from web-ui/Alerts.top.severity.png
rename to content/web-ui/Alerts.top.severity.png
diff --git a/web-ui/Authentication-settings.png b/content/web-ui/Authentication-settings.png
similarity index 100%
rename from web-ui/Authentication-settings.png
rename to content/web-ui/Authentication-settings.png
diff --git a/web-ui/Host-info-page.png b/content/web-ui/Host-info-page.png
similarity index 100%
rename from web-ui/Host-info-page.png
rename to content/web-ui/Host-info-page.png
diff --git a/web-ui/Hosts-app-custom-tree-geographic-region.png b/content/web-ui/Hosts-app-custom-tree-geographic-region.png
similarity index 100%
rename from web-ui/Hosts-app-custom-tree-geographic-region.png
rename to content/web-ui/Hosts-app-custom-tree-geographic-region.png
diff --git a/web-ui/Hosts-app-overview.png b/content/web-ui/Hosts-app-overview.png
similarity index 100%
rename from web-ui/Hosts-app-overview.png
rename to content/web-ui/Hosts-app-overview.png
diff --git a/web-ui/Mission-Portal-Monitoring-1.png b/content/web-ui/Mission-Portal-Monitoring-1.png
similarity index 100%
rename from web-ui/Mission-Portal-Monitoring-1.png
rename to content/web-ui/Mission-Portal-Monitoring-1.png
diff --git a/web-ui/Mission-portal-health-dignostics-header.png b/content/web-ui/Mission-portal-health-dignostics-header.png
similarity index 100%
rename from web-ui/Mission-portal-health-dignostics-header.png
rename to content/web-ui/Mission-portal-health-dignostics-header.png
diff --git a/web-ui/Settings-1.png b/content/web-ui/Settings-1.png
similarity index 100%
rename from web-ui/Settings-1.png
rename to content/web-ui/Settings-1.png
diff --git a/web-ui/Settings-2.png b/content/web-ui/Settings-2.png
similarity index 100%
rename from web-ui/Settings-2.png
rename to content/web-ui/Settings-2.png
diff --git a/web-ui/Settings-3.png b/content/web-ui/Settings-3.png
similarity index 100%
rename from web-ui/Settings-3.png
rename to content/web-ui/Settings-3.png
diff --git a/web-ui/Settings-4.png b/content/web-ui/Settings-4.png
similarity index 100%
rename from web-ui/Settings-4.png
rename to content/web-ui/Settings-4.png
diff --git a/web-ui/Settings-6.png b/content/web-ui/Settings-6.png
similarity index 100%
rename from web-ui/Settings-6.png
rename to content/web-ui/Settings-6.png
diff --git a/web-ui/Settings-7.png b/content/web-ui/Settings-7.png
similarity index 100%
rename from web-ui/Settings-7.png
rename to content/web-ui/Settings-7.png
diff --git a/web-ui/Settings-role.png b/content/web-ui/Settings-role.png
similarity index 100%
rename from web-ui/Settings-role.png
rename to content/web-ui/Settings-role.png
diff --git a/web-ui/Time-zone-modal.png b/content/web-ui/Time-zone-modal.png
similarity index 100%
rename from web-ui/Time-zone-modal.png
rename to content/web-ui/Time-zone-modal.png
diff --git a/web-ui/User-profile.png b/content/web-ui/User-profile.png
similarity index 100%
rename from web-ui/User-profile.png
rename to content/web-ui/User-profile.png
diff --git a/web-ui.markdown b/content/web-ui/_index.markdown
similarity index 97%
rename from web-ui.markdown
rename to content/web-ui/_index.markdown
index c873d20a7..232f38115 100644
--- a/web-ui.markdown
+++ b/content/web-ui/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Web UI
-published: true
sorting: 40
+aliases:
+ - "/web-ui.html"
---
The challenge in engineering IT infrastructure, especially as it scales
@@ -72,7 +73,7 @@ Examples of significant events include:
- Deleting a host
- Alert status change
-Events are accessible {% comment %}via the Events API {% endcomment %}from every Mission Portal
+Events are accessible from every Mission Portal
dashboard. The event log on the dashboard is filtered to show only information
relevant based on the widgets present. It shows when alerts are triggered and
cleared and when hosts are bootstrapped or decommissioned.
@@ -117,8 +118,6 @@ attributes are also extensible, by tagging any CFEngine variable or class, such
as the role of the host, inside your CFEngine policy. These custom attributes
will be automatically added to the Mission Portal.
-
-
You can reduce the amount of data or find specific information by filtering on
attributes and host groups. Filtering is independent from the data presented in
the results table: you can filter on attributes without them being presented in
diff --git a/web-ui/add-new-user.png b/content/web-ui/add-new-user.png
similarity index 100%
rename from web-ui/add-new-user.png
rename to content/web-ui/add-new-user.png
diff --git a/web-ui/add_columns.png b/content/web-ui/add_columns.png
similarity index 100%
rename from web-ui/add_columns.png
rename to content/web-ui/add_columns.png
diff --git a/web-ui/alerts-and-notifications.markdown b/content/web-ui/alerts-and-notifications.markdown
similarity index 98%
rename from web-ui/alerts-and-notifications.markdown
rename to content/web-ui/alerts-and-notifications.markdown
index 0e7f94a23..bb9576d6f 100644
--- a/web-ui/alerts-and-notifications.markdown
+++ b/content/web-ui/alerts-and-notifications.markdown
@@ -2,7 +2,8 @@
layout: default
title: Alerts and notifications
sorting: 40
-published: true
+aliases:
+ - "/web-ui-alerts-and-notifications.html"
---
## Create a new alert
diff --git a/web-ui/clone-dashboard.png b/content/web-ui/clone-dashboard.png
similarity index 100%
rename from web-ui/clone-dashboard.png
rename to content/web-ui/clone-dashboard.png
diff --git a/web-ui/create-alert-custom-action-syslog.png b/content/web-ui/create-alert-custom-action-syslog.png
similarity index 100%
rename from web-ui/create-alert-custom-action-syslog.png
rename to content/web-ui/create-alert-custom-action-syslog.png
diff --git a/web-ui/custom-actions-for-alerts.markdown b/content/web-ui/custom-actions-for-alerts.markdown
similarity index 98%
rename from web-ui/custom-actions-for-alerts.markdown
rename to content/web-ui/custom-actions-for-alerts.markdown
index 86fe2679a..0457508ce 100644
--- a/web-ui/custom-actions-for-alerts.markdown
+++ b/content/web-ui/custom-actions-for-alerts.markdown
@@ -2,7 +2,8 @@
layout: default
title: Custom actions for alerts
sorting: 50
-published: true
+aliases:
+ - "/web-ui-custom-actions-for-alerts.html"
---
Once you have become familiar with the [Alerts widgets][Web UI#Alert widgets], you might see the need to integrate the alerts with an existing system like Nagios, instead of relying on emails for getting notified.
@@ -105,8 +106,7 @@ When you get this to work as expected on the commmand line, you are ready to upl
The following Custom action script will log the status and definition of a policy alert to syslog.
-```bash
-[file=cfengine_custom_notification_policy_syslog.sh]
+```bash {file="cfengine_custom_notification_policy_syslog.sh"}
#!/bin/bash
source $1
diff --git a/web-ui/dashboard-event-log.png b/content/web-ui/dashboard-event-log.png
similarity index 100%
rename from web-ui/dashboard-event-log.png
rename to content/web-ui/dashboard-event-log.png
diff --git a/web-ui/dashboard-widget-changes.png b/content/web-ui/dashboard-widget-changes.png
similarity index 100%
rename from web-ui/dashboard-widget-changes.png
rename to content/web-ui/dashboard-widget-changes.png
diff --git a/web-ui/dashboard-widget-newly-bootstrapped.png b/content/web-ui/dashboard-widget-newly-bootstrapped.png
similarity index 100%
rename from web-ui/dashboard-widget-newly-bootstrapped.png
rename to content/web-ui/dashboard-widget-newly-bootstrapped.png
diff --git a/web-ui/debugging-mission-portal.markdown b/content/web-ui/debugging-mission-portal.markdown
similarity index 94%
rename from web-ui/debugging-mission-portal.markdown
rename to content/web-ui/debugging-mission-portal.markdown
index 7145b71f8..ef8a4b5f0 100644
--- a/web-ui/debugging-mission-portal.markdown
+++ b/content/web-ui/debugging-mission-portal.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Debugging Mission Portal
-published: true
sorting: 90
+aliases:
+ - "/web-ui-debugging-mission-portal.html"
---
1. Set the API log level to DEBUG in Mission Portal settings.
diff --git a/web-ui/enterprise-reporting/Report-Builder-3.18.0.png b/content/web-ui/enterprise-reporting/Report-Builder-3.18.0.png
similarity index 100%
rename from web-ui/enterprise-reporting/Report-Builder-3.18.0.png
rename to content/web-ui/enterprise-reporting/Report-Builder-3.18.0.png
diff --git a/web-ui/enterprise-reporting/Reports-Inventory-1.png b/content/web-ui/enterprise-reporting/Reports-Inventory-1.png
similarity index 100%
rename from web-ui/enterprise-reporting/Reports-Inventory-1.png
rename to content/web-ui/enterprise-reporting/Reports-Inventory-1.png
diff --git a/web-ui/enterprise-reporting/Reports-Inventory-2.png b/content/web-ui/enterprise-reporting/Reports-Inventory-2.png
similarity index 100%
rename from web-ui/enterprise-reporting/Reports-Inventory-2.png
rename to content/web-ui/enterprise-reporting/Reports-Inventory-2.png
diff --git a/web-ui/enterprise-reporting/Reports-Inventory-3.png b/content/web-ui/enterprise-reporting/Reports-Inventory-3.png
similarity index 100%
rename from web-ui/enterprise-reporting/Reports-Inventory-3.png
rename to content/web-ui/enterprise-reporting/Reports-Inventory-3.png
diff --git a/web-ui/enterprise-reporting/Reports-Inventory-4.png b/content/web-ui/enterprise-reporting/Reports-Inventory-4.png
similarity index 100%
rename from web-ui/enterprise-reporting/Reports-Inventory-4.png
rename to content/web-ui/enterprise-reporting/Reports-Inventory-4.png
diff --git a/web-ui/enterprise-reporting/Reports-Inventory-5.png b/content/web-ui/enterprise-reporting/Reports-Inventory-5.png
similarity index 100%
rename from web-ui/enterprise-reporting/Reports-Inventory-5.png
rename to content/web-ui/enterprise-reporting/Reports-Inventory-5.png
diff --git a/web-ui/enterprise-reporting/Reports-Inventory-6.png b/content/web-ui/enterprise-reporting/Reports-Inventory-6.png
similarity index 100%
rename from web-ui/enterprise-reporting/Reports-Inventory-6.png
rename to content/web-ui/enterprise-reporting/Reports-Inventory-6.png
diff --git a/web-ui/enterprise-reporting.markdown b/content/web-ui/enterprise-reporting/_index.markdown
similarity index 98%
rename from web-ui/enterprise-reporting.markdown
rename to content/web-ui/enterprise-reporting/_index.markdown
index aa547b674..75977ec37 100644
--- a/web-ui/enterprise-reporting.markdown
+++ b/content/web-ui/enterprise-reporting/_index.markdown
@@ -2,7 +2,8 @@
layout: default
title: Enterprise reporting
sorting: 50
-published: true
+aliases:
+ - "/web-ui-enterprise-reporting.html"
---
CFEngine Enterprise can report on promise outcomes (changes made by `cf-agent`
diff --git a/web-ui/enterprise-reporting/client-initiated-reporting.markdown b/content/web-ui/enterprise-reporting/client-initiated-reporting.markdown
similarity index 97%
rename from web-ui/enterprise-reporting/client-initiated-reporting.markdown
rename to content/web-ui/enterprise-reporting/client-initiated-reporting.markdown
index a9659a67e..751e84b36 100644
--- a/web-ui/enterprise-reporting/client-initiated-reporting.markdown
+++ b/content/web-ui/enterprise-reporting/client-initiated-reporting.markdown
@@ -2,7 +2,8 @@
layout: default
title: Client initiated reporting / call collect
sorting: 60
-published: true
+aliases:
+ - "/web-ui-enterprise-reporting-client-initiated-reporting.html"
---
Pull collect is the default mode of reporting.
@@ -19,8 +20,7 @@ Call collect and Client Initiated Reporting are the same, they both refer to the
The easiest way to enable call collect is via augments files, modify `/var/cfengine/masterfiles/def.json` on the hub:
-```json
-[file=def.json]
+```json {file="def.json"}
{
"classes": {
"client_initiated_reporting_enabled": [ "any" ]
diff --git a/web-ui/enterprise-reporting/reporting-architecture.markdown b/content/web-ui/enterprise-reporting/reporting-architecture.markdown
similarity index 95%
rename from web-ui/enterprise-reporting/reporting-architecture.markdown
rename to content/web-ui/enterprise-reporting/reporting-architecture.markdown
index 5b7c2520e..7d1511d7d 100644
--- a/web-ui/enterprise-reporting/reporting-architecture.markdown
+++ b/content/web-ui/enterprise-reporting/reporting-architecture.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Reporting architecture
-published: true
sorting: 10
+aliases:
+ - "/web-ui-enterprise-reporting-reporting-architecture.html"
---
The reporting architecture of CFEngine Enterprise uses two software
diff --git a/web-ui/enterprise-reporting/reporting_ui.markdown b/content/web-ui/enterprise-reporting/reporting_ui.markdown
similarity index 98%
rename from web-ui/enterprise-reporting/reporting_ui.markdown
rename to content/web-ui/enterprise-reporting/reporting_ui.markdown
index bbcbab5b5..5602281d4 100644
--- a/web-ui/enterprise-reporting/reporting_ui.markdown
+++ b/content/web-ui/enterprise-reporting/reporting_ui.markdown
@@ -2,7 +2,8 @@
layout: default
title: Reporting UI
sorting: 50
-published: true
+aliases:
+ - "/web-ui-enterprise-reporting-reporting_ui.html"
---
CFEngine collects a large amount of data. To inspect it, you can run and schedule pre-defined reports or use the [query builder][Reporting UI#Query builder] for your own custom reports. You can save these queries for later use, and schedule reports for specified times.
@@ -59,8 +60,7 @@ the following defines the attribute `Role` which is set to
`database_server`. You need to add it to the top-level
`bundlesequence` in `promises.cf` or in a bundle that it calls.
-```cf3
-[file=promises.cf]
+```cf3 {file="promises.cf"}
bundle agent myreport
{
vars:
diff --git a/web-ui/enterprise-reporting/sql-queries-enterprise-api.markdown b/content/web-ui/enterprise-reporting/sql-queries-enterprise-api.markdown
similarity index 98%
rename from web-ui/enterprise-reporting/sql-queries-enterprise-api.markdown
rename to content/web-ui/enterprise-reporting/sql-queries-enterprise-api.markdown
index 578a5511c..6eed39772 100644
--- a/web-ui/enterprise-reporting/sql-queries-enterprise-api.markdown
+++ b/content/web-ui/enterprise-reporting/sql-queries-enterprise-api.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: SQL queries using the Enterprise API
-published: true
sorting: 20
+aliases:
+ - "/web-ui-enterprise-reporting-sql-queries-enterprise-api.html"
---
The CFEngine Enterprise Hub collects information about the
diff --git a/web-ui/federated-reporting.markdown b/content/web-ui/federated-reporting.markdown
similarity index 99%
rename from web-ui/federated-reporting.markdown
rename to content/web-ui/federated-reporting.markdown
index fb1c7dc2a..fd037d6b6 100644
--- a/web-ui/federated-reporting.markdown
+++ b/content/web-ui/federated-reporting.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Federated reporting
-published: true
sorting: 60
+aliases:
+ - "/web-ui-federated-reporting.html"
---
## Overview
diff --git a/web-ui/fr-connect-a-hub.png b/content/web-ui/fr-connect-a-hub.png
similarity index 100%
rename from web-ui/fr-connect-a-hub.png
rename to content/web-ui/fr-connect-a-hub.png
diff --git a/web-ui/fr-disabled-feeder.png b/content/web-ui/fr-disabled-feeder.png
similarity index 100%
rename from web-ui/fr-disabled-feeder.png
rename to content/web-ui/fr-disabled-feeder.png
diff --git a/content/web-ui/fr-edit-hub-disable.png b/content/web-ui/fr-edit-hub-disable.png
new file mode 100644
index 000000000..4e1bdbb62
Binary files /dev/null and b/content/web-ui/fr-edit-hub-disable.png differ
diff --git a/web-ui/fr-feeder-added.png b/content/web-ui/fr-feeder-added.png
similarity index 100%
rename from web-ui/fr-feeder-added.png
rename to content/web-ui/fr-feeder-added.png
diff --git a/web-ui/fr-hub-management-default.png b/content/web-ui/fr-hub-management-default.png
similarity index 100%
rename from web-ui/fr-hub-management-default.png
rename to content/web-ui/fr-hub-management-default.png
diff --git a/web-ui/fr-hub-management-enabled.png b/content/web-ui/fr-hub-management-enabled.png
similarity index 100%
rename from web-ui/fr-hub-management-enabled.png
rename to content/web-ui/fr-hub-management-enabled.png
diff --git a/web-ui/fr-superhub-enabled-no-feeders.png b/content/web-ui/fr-superhub-enabled-no-feeders.png
similarity index 100%
rename from web-ui/fr-superhub-enabled-no-feeders.png
rename to content/web-ui/fr-superhub-enabled-no-feeders.png
diff --git a/web-ui/health.markdown b/content/web-ui/health.markdown
similarity index 98%
rename from web-ui/health.markdown
rename to content/web-ui/health.markdown
index 334585db3..62d5704b3 100644
--- a/web-ui/health.markdown
+++ b/content/web-ui/health.markdown
@@ -2,7 +2,8 @@
layout: default
title: Health
sorting: 20
-published: true
+aliases:
+ - "/web-ui-health.html"
---
diff --git a/web-ui/host-action-buttons.png b/content/web-ui/host-action-buttons.png
similarity index 100%
rename from web-ui/host-action-buttons.png
rename to content/web-ui/host-action-buttons.png
diff --git a/web-ui/host-info-collect-reports.png b/content/web-ui/host-info-collect-reports.png
similarity index 100%
rename from web-ui/host-info-collect-reports.png
rename to content/web-ui/host-info-collect-reports.png
diff --git a/web-ui/host-info-delete-host.png b/content/web-ui/host-info-delete-host.png
similarity index 100%
rename from web-ui/host-info-delete-host.png
rename to content/web-ui/host-info-delete-host.png
diff --git a/web-ui/host-info-get-url.png b/content/web-ui/host-info-get-url.png
similarity index 100%
rename from web-ui/host-info-get-url.png
rename to content/web-ui/host-info-get-url.png
diff --git a/web-ui/host-info-run-agent.png b/content/web-ui/host-info-run-agent.png
similarity index 100%
rename from web-ui/host-info-run-agent.png
rename to content/web-ui/host-info-run-agent.png
diff --git a/web-ui/host-specific-data-classes.png b/content/web-ui/host-specific-data-classes.png
similarity index 100%
rename from web-ui/host-specific-data-classes.png
rename to content/web-ui/host-specific-data-classes.png
diff --git a/web-ui/host-specific-data-variables.png b/content/web-ui/host-specific-data-variables.png
similarity index 100%
rename from web-ui/host-specific-data-variables.png
rename to content/web-ui/host-specific-data-variables.png
diff --git a/web-ui/hosts.markdown b/content/web-ui/hosts.markdown
similarity index 98%
rename from web-ui/hosts.markdown
rename to content/web-ui/hosts.markdown
index 7a6fc48bd..b34de02aa 100644
--- a/web-ui/hosts.markdown
+++ b/content/web-ui/hosts.markdown
@@ -2,7 +2,8 @@
layout: default
title: Hosts
sorting: 30
-published: true
+aliases:
+ - "/web-ui-hosts.html"
---
The Hosts app provides a customizable global overview of _promise_ compliance. A summary of compliant vs non-compliant hosts is provided at each branch in the tree.
diff --git a/web-ui/hub_administration/Mission-portal-remove-host.png b/content/web-ui/hub_administration/Mission-portal-remove-host.png
similarity index 100%
rename from web-ui/hub_administration/Mission-portal-remove-host.png
rename to content/web-ui/hub_administration/Mission-portal-remove-host.png
diff --git a/web-ui/hub_administration.markdown b/content/web-ui/hub_administration/_index.markdown
similarity index 84%
rename from web-ui/hub_administration.markdown
rename to content/web-ui/hub_administration/_index.markdown
index cc6265e2e..dc46576e0 100644
--- a/web-ui/hub_administration.markdown
+++ b/content/web-ui/hub_administration/_index.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Hub administration
-published: true
sorting: 80
+aliases:
+ - "/web-ui-hub_administration.html"
---
Find out how to perform common hub administration tasks like
diff --git a/web-ui/hub_administration/adjusting-schedules.markdown b/content/web-ui/hub_administration/adjusting-schedules.markdown
similarity index 96%
rename from web-ui/hub_administration/adjusting-schedules.markdown
rename to content/web-ui/hub_administration/adjusting-schedules.markdown
index 0b74d9540..4664ac8a5 100644
--- a/web-ui/hub_administration/adjusting-schedules.markdown
+++ b/content/web-ui/hub_administration/adjusting-schedules.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Adjusting schedules
-published: true
+aliases:
+ - "/web-ui-hub_administration-adjusting-schedules.html"
---
## Set cf-execd agent execution schedule
diff --git a/web-ui/hub_administration/backup-and-restore.markdown b/content/web-ui/hub_administration/backup-and-restore.markdown
similarity index 81%
rename from web-ui/hub_administration/backup-and-restore.markdown
rename to content/web-ui/hub_administration/backup-and-restore.markdown
index 4b24d95c4..4488462ea 100644
--- a/web-ui/hub_administration/backup-and-restore.markdown
+++ b/content/web-ui/hub_administration/backup-and-restore.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Backup and restore
-published: true
+aliases:
+ - "/web-ui-hub_administration-backup-and-restore.html"
---
With policy stored in version control there are few things that should be
@@ -42,13 +43,13 @@ restore the history of policy outcomes you must backup and restore.
**Backup:**
```command
-pg_dump -Fc cfdb > cfdb.bak
+pg_dump --format=c cfdb > cfdb.bak
```
**Restore:**
```command
-pg_restore -Fc cfdb.bak
+pg_restore --format=c --dbname=cfdb cfdb.bak
```
### Mission Portal
@@ -59,13 +60,13 @@ pg_restore -Fc cfdb.bak
**Backup:**
```console
-# pg_dump -Fc cfmp > cfmp.bak
-# pg_dump -Fc cfsettings > cfsettings.bak
+# pg_dump --format=c cfmp > cfmp.bak
+# pg_dump --format=c cfsettings > cfsettings.bak
```
**Restore:**
```console
-# pg_restore -Fc cfmp.bak
-# pg_restore -Fc cfsettings.bak
+# pg_restore --format=c --dbname=cfmp cfmp.bak
+# pg_restore --format=c --dbname=cfsettings cfsettings.bak
```
diff --git a/web-ui/hub_administration/custom-https-certificate.markdown b/content/web-ui/hub_administration/custom-https-certificate.markdown
similarity index 93%
rename from web-ui/hub_administration/custom-https-certificate.markdown
rename to content/web-ui/hub_administration/custom-https-certificate.markdown
index 9deaf7ef2..e08726504 100644
--- a/web-ui/hub_administration/custom-https-certificate.markdown
+++ b/content/web-ui/hub_administration/custom-https-certificate.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Custom SSL certificate
-published: true
+aliases:
+ - "/web-ui-hub_administration-custom-https-certificate.html"
---
When first installed a self-signed ssl certificate is automatically generated
@@ -22,6 +23,7 @@ commands.
```command
cf-promises --show-vars=default:sys\.fqhost
```
+
```output
default:sys.fqhost hub inventory,source=agent,attribute_name=Host name
```
@@ -29,6 +31,7 @@ default:sys.fqhost hub
```command
hostname -f
```
+
```output
hub
```
diff --git a/web-ui/hub_administration/custom-ldap-port-settings.png b/content/web-ui/hub_administration/custom-ldap-port-settings.png
similarity index 100%
rename from web-ui/hub_administration/custom-ldap-port-settings.png
rename to content/web-ui/hub_administration/custom-ldap-port-settings.png
diff --git a/web-ui/hub_administration/custom-ldap-port.markdown b/content/web-ui/hub_administration/custom-ldap-port.markdown
similarity index 96%
rename from web-ui/hub_administration/custom-ldap-port.markdown
rename to content/web-ui/hub_administration/custom-ldap-port.markdown
index 8fd3ea7de..2a6700350 100644
--- a/web-ui/hub_administration/custom-ldap-port.markdown
+++ b/content/web-ui/hub_administration/custom-ldap-port.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Configure a custom LDAP port
-published: true
+aliases:
+ - "/web-ui-hub_administration-custom-ldap-port.html"
---
Mission Portals User settings and preferences provides a radio button
diff --git a/web-ui/hub_administration/custom-ldaps-certificate.markdown b/content/web-ui/hub_administration/custom-ldaps-certificate.markdown
similarity index 86%
rename from web-ui/hub_administration/custom-ldaps-certificate.markdown
rename to content/web-ui/hub_administration/custom-ldaps-certificate.markdown
index fa43bfb6e..714ec7a88 100644
--- a/web-ui/hub_administration/custom-ldaps-certificate.markdown
+++ b/content/web-ui/hub_administration/custom-ldaps-certificate.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Custom LDAPs certificate
-published: true
+aliases:
+ - "/web-ui-hub_administration-custom-ldaps-certificate.html"
---
To use a custom LDAPs certificate install it into your hubs operating system.
diff --git a/web-ui/hub_administration/decommissioning-hosts.markdown b/content/web-ui/hub_administration/decommissioning-hosts.markdown
similarity index 97%
rename from web-ui/hub_administration/decommissioning-hosts.markdown
rename to content/web-ui/hub_administration/decommissioning-hosts.markdown
index b9f906fd2..0fee872cc 100644
--- a/web-ui/hub_administration/decommissioning-hosts.markdown
+++ b/content/web-ui/hub_administration/decommissioning-hosts.markdown
@@ -2,7 +2,8 @@
layout: default
title: Decommissioning hosts
sorting: 30
-published: true
+aliases:
+ - "/web-ui-hub_administration-decommissioning-hosts.html"
---
Once a host is shut off, or CFEngine is uninstalled, you should remove it from Mission Portal.
diff --git a/web-ui/hub_administration/enable-plain-http.markdown b/content/web-ui/hub_administration/enable-plain-http.markdown
similarity index 82%
rename from web-ui/hub_administration/enable-plain-http.markdown
rename to content/web-ui/hub_administration/enable-plain-http.markdown
index 7de763a7b..cc683c6fe 100644
--- a/web-ui/hub_administration/enable-plain-http.markdown
+++ b/content/web-ui/hub_administration/enable-plain-http.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Enable plain http
-published: true
+aliases:
+ - "/web-ui-hub_administration-enable-plain-http.html"
---
By default HTTPS is enforced by redirecting any non secure connection requests.
@@ -12,8 +13,7 @@ If you would like to enable plain HTTP you can do so by defining
For example, simply place the following inside `def.json` in the root of your
masterfiles.
-```json
-[file=def.json]
+```json {file="def.json"}
{
"classes": {
"cfe_enterprise_enable_plain_http": [ "any" ]
diff --git a/web-ui/hub_administration/extended-menu.png b/content/web-ui/hub_administration/extended-menu.png
similarity index 100%
rename from web-ui/hub_administration/extended-menu.png
rename to content/web-ui/hub_administration/extended-menu.png
diff --git a/web-ui/hub_administration/extended-query-builder-report.png b/content/web-ui/hub_administration/extended-query-builder-report.png
similarity index 100%
rename from web-ui/hub_administration/extended-query-builder-report.png
rename to content/web-ui/hub_administration/extended-query-builder-report.png
diff --git a/web-ui/hub_administration/extended-query-builder.png b/content/web-ui/hub_administration/extended-query-builder.png
similarity index 100%
rename from web-ui/hub_administration/extended-query-builder.png
rename to content/web-ui/hub_administration/extended-query-builder.png
diff --git a/web-ui/hub_administration/extending-mission-portal.markdown b/content/web-ui/hub_administration/extending-mission-portal.markdown
similarity index 92%
rename from web-ui/hub_administration/extending-mission-portal.markdown
rename to content/web-ui/hub_administration/extending-mission-portal.markdown
index d0d15a239..18eabdf02 100644
--- a/web-ui/hub_administration/extending-mission-portal.markdown
+++ b/content/web-ui/hub_administration/extending-mission-portal.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Extending Mission Portal
-published: true
sorting: 90
+aliases:
+ - "/web-ui-hub_administration-extending-mission-portal.html"
---
## Custom pages requiring authenticated users
@@ -42,8 +43,7 @@ File `test_documentation.html` was uploaded to the directory specified above.
Use the following structure in your HTML to style the page the same as the rest
of Mission Portal.
-```html
-[file=file_name.html]
+```html {file="file_name.html"}
PAGE TITLE
diff --git a/web-ui/hub_administration/extending-query-builder.markdown b/content/web-ui/hub_administration/extending-query-builder.markdown
similarity index 99%
rename from web-ui/hub_administration/extending-query-builder.markdown
rename to content/web-ui/hub_administration/extending-query-builder.markdown
index b0040fcf0..fa97527ef 100644
--- a/web-ui/hub_administration/extending-query-builder.markdown
+++ b/content/web-ui/hub_administration/extending-query-builder.markdown
@@ -1,8 +1,9 @@
---
layout: default
title: Extending query builder in Mission Portal
-published: true
sorting: 90
+aliases:
+ - "/web-ui-hub_administration-extending-query-builder.html"
---
This instruction is created to explain how to extend the [Query builder][Reporting UI#Query builder] in the case where
diff --git a/web-ui/hub_administration/lookup-license-info.markdown b/content/web-ui/hub_administration/lookup-license-info.markdown
similarity index 94%
rename from web-ui/hub_administration/lookup-license-info.markdown
rename to content/web-ui/hub_administration/lookup-license-info.markdown
index 466cb515b..95936c790 100644
--- a/web-ui/hub_administration/lookup-license-info.markdown
+++ b/content/web-ui/hub_administration/lookup-license-info.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Lookup license info
-published: true
+aliases:
+ - "/web-ui-hub_administration-lookup-license-info.html"
---
Information about the currently issued license can be obtained from the About section in Mission Portal web interface or from the command line as shown here.
@@ -28,6 +29,7 @@ Run as `root` from the hub itself.
```command
cf-hub --show-license
```
+
```output
License file: /var/cfengine/licenses/hub-SHA=d13c14c3dc46ef1c5824eb70ffae3a1d1c67c7ce70a1e8e8634b1324d0041131.dat
License status: Valid
diff --git a/web-ui/hub_administration/policy-deployment.markdown b/content/web-ui/hub_administration/policy-deployment.markdown
similarity index 96%
rename from web-ui/hub_administration/policy-deployment.markdown
rename to content/web-ui/hub_administration/policy-deployment.markdown
index 8cbea1cab..1592f8ab9 100644
--- a/web-ui/hub_administration/policy-deployment.markdown
+++ b/content/web-ui/hub_administration/policy-deployment.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Policy deployment
-published: true
+aliases:
+ - "/web-ui-hub_administration-policy-deployment.html"
---
By default CFEngine policy is distributed from `/var/cfengine/masterfiles` on
@@ -54,6 +55,7 @@ The last option, a read-only login, is the best approach as it removes the possi
To configure the upstream repository. You must provide the uri and a refspec (branch name usually).
Credentials can be specified in several ways as mentioned above so pick your choice above and enter in only the needed information in the form.
+If your CFEngine policies are not located in the repository root, you can specify the path in the "Project subdirectory" text input field.
### Configuring upstream VCS via Mission Portal
@@ -83,6 +85,7 @@ For example:
```command
cf-agent -KIf update.cf --define cfengine_internal_masterfiles_update
```
+
```output
info: Executing 'no timeout' ... '/var/cfengine/httpd/htdocs/api/dc-scripts/masterfiles-stage.sh'
info: Command related to promiser '/var/cfengine/httpd/htdocs/api/dc-scripts/masterfiles-stage.sh' returned code defined as promise kept 0
@@ -100,8 +103,7 @@ To configure automatic deployments simply ensure the
Create `def.json` in the root of your masterfiles with the following content:
-```json
-[file=def.json]
+```json {file="def.json"}
{
"classes": {
"cfengine_internal_masterfiles_update": [ "hub" ]
@@ -113,8 +115,7 @@ Create `def.json` in the root of your masterfiles with the following content:
Simply edit `bundle common update_def` in `controls/update_def.cf`.
-```cf3
-[file=update_def.cf]
+```cf3 {file="update_def.cf"}
bundle common update_def
{
# ...
@@ -137,6 +138,7 @@ For example:
```command
cf-agent -KIf update.cf --define cfengine_internal_masterfiles_update
```
+
```output
info: Executing 'no timeout' ... '/var/cfengine/httpd/htdocs/api/dc-scripts/masterfiles-stage.sh'
error: Command related to promiser '/var/cfengine/httpd/htdocs/api/dc-scripts/masterfiles-stage.sh' returned code defined as promise failed 1
@@ -154,6 +156,7 @@ can see that there is a syntax error in `promises.cf` near line 14.
```command
tail -n 5 /var/cfengine/outputs/dc-scripts.log
```
+
```output
/opt/cfengine/masterfiles_staging_tmp/promises.cf:14:46: error: Expected ',', wrong input '@(inventory.bundles)'
@(inventory.bundles),
diff --git a/web-ui/hub_administration/public-key-distribution.markdown b/content/web-ui/hub_administration/public-key-distribution.markdown
similarity index 96%
rename from web-ui/hub_administration/public-key-distribution.markdown
rename to content/web-ui/hub_administration/public-key-distribution.markdown
index a8ae2c7a3..10c437c27 100644
--- a/web-ui/hub_administration/public-key-distribution.markdown
+++ b/content/web-ui/hub_administration/public-key-distribution.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Public key distribution
-published: true
+aliases:
+ - "/web-ui-hub_administration-public-key-distribution.html"
---
> How can I arrange for the hosts in my infrastructure to trust a new key?
@@ -27,8 +28,7 @@ This policy shows how public keys can be stored in a central location on the
policy server and automatically installed on all hosts.
-```cf3
-[file=trust_distkeys.cf]
+```cf3 {file="trust_distkeys.cf"}
bundle agent trust_distkeys
#@ brief Example public key distribution
{
diff --git a/web-ui/hub_administration/regenerate-self-signed-cert.markdown b/content/web-ui/hub_administration/regenerate-self-signed-cert.markdown
similarity index 89%
rename from web-ui/hub_administration/regenerate-self-signed-cert.markdown
rename to content/web-ui/hub_administration/regenerate-self-signed-cert.markdown
index 50dbbd315..df170bf38 100644
--- a/web-ui/hub_administration/regenerate-self-signed-cert.markdown
+++ b/content/web-ui/hub_administration/regenerate-self-signed-cert.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Regenerate self signed SSL certificate
-published: true
+aliases:
+ - "/web-ui-hub_administration-regenerate-self-signed-cert.html"
---
When first installed a self-signed ssl certificate is automatically generated
diff --git a/web-ui/hub_administration/reinstall.markdown b/content/web-ui/hub_administration/reinstall.markdown
similarity index 94%
rename from web-ui/hub_administration/reinstall.markdown
rename to content/web-ui/hub_administration/reinstall.markdown
index 20ee13f6e..25761256d 100644
--- a/web-ui/hub_administration/reinstall.markdown
+++ b/content/web-ui/hub_administration/reinstall.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: Re-installing Enterprise hub
-published: true
+aliases:
+ - "/web-ui-hub_administration-reinstall.html"
---
Sometimes it is useful to re-install the hub while still preserving existing
diff --git a/web-ui/hub_administration/reset-admin-creds.markdown b/content/web-ui/hub_administration/reset-admin-creds.markdown
similarity index 94%
rename from web-ui/hub_administration/reset-admin-creds.markdown
rename to content/web-ui/hub_administration/reset-admin-creds.markdown
index 232cb39e1..d45a08f3e 100644
--- a/web-ui/hub_administration/reset-admin-creds.markdown
+++ b/content/web-ui/hub_administration/reset-admin-creds.markdown
@@ -1,14 +1,14 @@
---
layout: default
title: Reset administrative credentials
-published: true
+aliases:
+ - "/web-ui-hub_administration-reset-admin-creds.html"
---
The default `admin` user can be reset to defaults using the following SQL.
-```sql
-[file=cfsettings-setadminpassword.sql]
+```sql {file="cfsettings-setadminpassword.sql"}
INSERT INTO "users" ("username", "password", "salt", "name", "email", "external", "active", "roles", "changetimestamp")
SELECT 'admin', 'SHA=aa459b45ecf9816d472c2252af0b6c104f92a6faf2844547a03338e42e426f52', 'eWAbKQmxNP', 'admin', 'admin@organisation.com', false, '1', '{admin,cf_remoteagent}', now()
ON CONFLICT (username, external) DO UPDATE
@@ -38,8 +38,7 @@ If these credentials are not synchronized properly you can get "Authentication f
To rotate these credentials execute the following shell script on the hub and then restart the system with `systemctl restart cfengine3` or similar.
-```bash
-[file=rotate_mp_credentials.sh]
+```bash {file="rotate_mp_credentials.sh"}
#!/usr/bin/env bash
pwgen() {
dd if=/dev/urandom bs=1024 count=1 2>/dev/null | tr -dc 'a-zA-Z0-9' | fold -w $1 | head -n 1
@@ -65,8 +64,7 @@ If these credentials are out of sync or incorrect you will see errors like "500
Execute the following shell script to rotate and synchronize the CFE Robot credentials and then restart the system with `systemctl restart cfengine3` or similar.
-```bash
-[file=rotate_cfrobot_credentials.sh]
+```bash {file="rotate_cfrobot_credentials.sh"}
#!/usr/bin/env bash
pwgen() {
dd if=/dev/urandom bs=1024 count=1 2>/dev/null | tr -dc 'a-zA-Z0-9' | fold -w $1 | head -n 1
diff --git a/web-ui/hub_administration/settings-menu.png b/content/web-ui/hub_administration/settings-menu.png
similarity index 100%
rename from web-ui/hub_administration/settings-menu.png
rename to content/web-ui/hub_administration/settings-menu.png
diff --git a/content/web-ui/hub_administration/settings-vcs.png b/content/web-ui/hub_administration/settings-vcs.png
new file mode 100644
index 000000000..eefa7220a
Binary files /dev/null and b/content/web-ui/hub_administration/settings-vcs.png differ
diff --git a/web-ui/inventory_filter.gif b/content/web-ui/inventory_filter.gif
similarity index 100%
rename from web-ui/inventory_filter.gif
rename to content/web-ui/inventory_filter.gif
diff --git a/web-ui/license-info.png b/content/web-ui/license-info.png
similarity index 100%
rename from web-ui/license-info.png
rename to content/web-ui/license-info.png
diff --git a/web-ui/license-status-report.png b/content/web-ui/license-status-report.png
similarity index 100%
rename from web-ui/license-status-report.png
rename to content/web-ui/license-status-report.png
diff --git a/web-ui/license.markdown b/content/web-ui/license.markdown
similarity index 93%
rename from web-ui/license.markdown
rename to content/web-ui/license.markdown
index 0edab3df5..b152da906 100644
--- a/web-ui/license.markdown
+++ b/content/web-ui/license.markdown
@@ -1,7 +1,8 @@
---
layout: default
title: License
-published: true
+aliases:
+ - "/web-ui-license.html"
---
## License information
diff --git a/web-ui/mail-settings.png b/content/web-ui/mail-settings.png
similarity index 100%
rename from web-ui/mail-settings.png
rename to content/web-ui/mail-settings.png
diff --git a/web-ui/measurements.markdown b/content/web-ui/measurements.markdown
similarity index 97%
rename from web-ui/measurements.markdown
rename to content/web-ui/measurements.markdown
index 339d8b5ad..16aaece77 100644
--- a/web-ui/measurements.markdown
+++ b/content/web-ui/measurements.markdown
@@ -3,7 +3,8 @@ layout: default
title: Measurements app
alias: Measurements
sorting: 70
-published: true
+aliases:
+ - "/web-ui-measurements.html"
---
Measurements allows you to get an overview of specific metrics on your hosts over time.
diff --git a/web-ui/mp-settings-custom-notification-add.png b/content/web-ui/mp-settings-custom-notification-add.png
similarity index 100%
rename from web-ui/mp-settings-custom-notification-add.png
rename to content/web-ui/mp-settings-custom-notification-add.png
diff --git a/web-ui/mp-settings-custom-notification.png b/content/web-ui/mp-settings-custom-notification.png
similarity index 100%
rename from web-ui/mp-settings-custom-notification.png
rename to content/web-ui/mp-settings-custom-notification.png
diff --git a/web-ui/pause_alerts.gif b/content/web-ui/pause_alerts.gif
similarity index 100%
rename from web-ui/pause_alerts.gif
rename to content/web-ui/pause_alerts.gif
diff --git a/web-ui/role_based_access_control_settings.png b/content/web-ui/role_based_access_control_settings.png
similarity index 100%
rename from web-ui/role_based_access_control_settings.png
rename to content/web-ui/role_based_access_control_settings.png
diff --git a/web-ui/roles-list.png b/content/web-ui/roles-list.png
similarity index 100%
rename from web-ui/roles-list.png
rename to content/web-ui/roles-list.png
diff --git a/web-ui/settings-export-import-3.18.0.png b/content/web-ui/settings-export-import-3.18.0.png
similarity index 100%
rename from web-ui/settings-export-import-3.18.0.png
rename to content/web-ui/settings-export-import-3.18.0.png
diff --git a/web-ui/settings.markdown b/content/web-ui/settings.markdown
similarity index 99%
rename from web-ui/settings.markdown
rename to content/web-ui/settings.markdown
index 766a4f89b..3cc0b17fb 100644
--- a/web-ui/settings.markdown
+++ b/content/web-ui/settings.markdown
@@ -2,7 +2,8 @@
layout: default
title: Settings
sorting: 10
-published: true
+aliases:
+ - "/web-ui-settings.html"
---
A variety of CFEngine and system properties can be changed in the settings view.
diff --git a/web-ui/web-ui-event-log.png b/content/web-ui/web-ui-event-log.png
similarity index 100%
rename from web-ui/web-ui-event-log.png
rename to content/web-ui/web-ui-event-log.png
diff --git a/web-ui/web-ui-events-api-rbac-get-event-list-event-checked.png b/content/web-ui/web-ui-events-api-rbac-get-event-list-event-checked.png
similarity index 100%
rename from web-ui/web-ui-events-api-rbac-get-event-list-event-checked.png
rename to content/web-ui/web-ui-events-api-rbac-get-event-list-event-checked.png
diff --git a/web-ui/web-ui-mission-portal-api-view-whole-system-events-rbac.png b/content/web-ui/web-ui-mission-portal-api-view-whole-system-events-rbac.png
similarity index 100%
rename from web-ui/web-ui-mission-portal-api-view-whole-system-events-rbac.png
rename to content/web-ui/web-ui-mission-portal-api-view-whole-system-events-rbac.png
diff --git a/web-ui/welcome_2nd_screen.png b/content/web-ui/welcome_2nd_screen.png
similarity index 100%
rename from web-ui/welcome_2nd_screen.png
rename to content/web-ui/welcome_2nd_screen.png
diff --git a/web-ui/widget_1.gif b/content/web-ui/widget_1.gif
similarity index 100%
rename from web-ui/widget_1.gif
rename to content/web-ui/widget_1.gif
diff --git a/examples/example-snippets/active_directory.markdown b/examples/example-snippets/active_directory.markdown
deleted file mode 100644
index b1f137aef..000000000
--- a/examples/example-snippets/active_directory.markdown
+++ /dev/null
@@ -1,22 +0,0 @@
----
-layout: default
-title: Interacting with directory services
-published: true
-sorting: 7
----
-
-## Active directory example
-
-[%CFEngine_include_snippet(active_directory_example.cf, .* )%]
-
-## Active list users directory example
-
-[%CFEngine_include_snippet(active_list_users_directory_example.cf, .* )%]
-
-## Active directory show users example
-
-[%CFEngine_include_snippet(active_directory_show_users_example.cf, .* )%]
-
-## LDAP interactions
-
-[%CFEngine_include_snippet(ldap_interactions.cf, .* )%]
diff --git a/examples/example-snippets/file_permissions.markdown b/examples/example-snippets/file_permissions.markdown
deleted file mode 100644
index be0a012f6..000000000
--- a/examples/example-snippets/file_permissions.markdown
+++ /dev/null
@@ -1,18 +0,0 @@
----
-layout: default
-title: File permissions
-published: true
-sorting: 15
----
-
-## ACL file example
-
-[%CFEngine_include_snippet(acl_file_example.cf, .* )%]
-
-## ACL generic example
-
-[%CFEngine_include_snippet(acl_generic_example.cf, .* )%]
-
-## ACL secret example
-
-[%CFEngine_include_snippet(acl_secret_example.cf, .* )%]
diff --git a/generator/.gitignore b/generator/.gitignore
index f58df0670..ca3e2ba62 100644
--- a/generator/.gitignore
+++ b/generator/.gitignore
@@ -3,7 +3,6 @@ _cache/*
_site/*
_generated/*
/nbproject/private/
-/pages/*
*.pyc
.DS_Store
node_modules
diff --git a/generator/README.org b/generator/README.org
index 0d17e4025..c024dadeb 100644
--- a/generator/README.org
+++ b/generator/README.org
@@ -158,7 +158,7 @@ For example:
./_scripts/cfdoc_preprocess.py master || exit 4
- bash -x ./_scripts/_run_jekyll.sh master || exit 5
+ bash -x ./_scripts/_run.sh master || exit 5
#+END_SRC
@@ -174,7 +174,7 @@ Once the syntax map has been regenerated [[https://github.com/cfengine/documenta
(whatever that means), resolving links, expanding our custom macros and creating
printable (dead trees) versions of the documentation.
-After pre-processing is complete [[https://github.com/cfengine/documentation/blob/master/generator/_scripts/_run_jekyll.sh][_run_jekyll.sh]] performs the =jekyll= build,
+After pre-processing is complete [[https://github.com/cfengine/documentation/blob/master/generator/_scripts/_run.sh][_run.sh]] performs the =jekyll= build,
post processes the build with [[https://github.com/cfengine/documentation/blob/master/generator/_scripts/cfdoc_postprocess.py][cfdoc_postprocess.py]]
*** Publishing
diff --git a/generator/_assets/css/.gitignore b/generator/_assets/css/.gitignore
deleted file mode 100644
index e1bb9ab38..000000000
--- a/generator/_assets/css/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-styles.min.css
\ No newline at end of file
diff --git a/generator/_assets/css/hacks.css b/generator/_assets/css/hacks.css
deleted file mode 100644
index e69de29bb..000000000
diff --git a/generator/_assets/css/navigation.css b/generator/_assets/css/navigation.css
deleted file mode 100644
index e69de29bb..000000000
diff --git a/generator/_assets/css/style.css b/generator/_assets/css/style.css
deleted file mode 100644
index e69de29bb..000000000
diff --git a/generator/_assets/js/custom.js b/generator/_assets/js/custom.js
deleted file mode 100755
index e6a8d215b..000000000
--- a/generator/_assets/js/custom.js
+++ /dev/null
@@ -1,467 +0,0 @@
-'use strict';
-import '../styles/cfengine.less';
-
-var is_mobile = true;
-$(document).ready(function() {
- if ($(window).width() > 800)
- {
- is_mobile = false;
- }
- var scrollPos = 380;
- /*show/hide moveTop link */
- var showMoveTop = false;
-
- if (is_mobile === false)
- {
- $("#moveTop a").click(function(e) {
- $(window).scrollTop($('#nav_wrapper').offset().top);
- showMoveTop = false;
- $("#moveTop").hide();
- e.preventDefault();
- });
-
- $(window).scroll(function() {
- if ($(window).scrollTop() > scrollPos && showMoveTop===false) {
- $("#moveTop").show();
- showMoveTop = true;
- } else if($(window).scrollTop() < scrollPos && showMoveTop === true ) {
- $("#moveTop").hide();
- showMoveTop = false;
- }
- });
- }
-
- if ($(window).scrollTop() > scrollPos && is_mobile === false)
- {
- $("#moveTop").show();
- showMoveTop = true;
- }
-
-
- var ToC_start =
- "";
-
- var newLine, el, title, link, elClass, url, ToC='';
- var usedIds = {};
- $(".article h2, .article h3, .article h4").each(function() {
- el = $(this);
- title = el.text()
- var id = el.attr("id");
- var uniqueId = id;
- if (usedIds[id]){
- uniqueId = id +'-' + usedIds[id];
- el.attr("id",uniqueId);
- usedIds[id] += 1;
- } else {
- usedIds[id] = 1;
- }
- link = "#" + uniqueId;
- elClass = "link_" + el.prop("tagName").toLowerCase()
- url = window.location.pathname;
-
- // if header has data-behavior= exclude-from-toc - do not include it to the TOC list
- if (el.children('center').attr('data-behavior') !=="exclude-from-toc")
- {
- newLine =
- "" +
- "" +
- title +
- "" +
- " ";
- ToC += newLine;
- }
- });
-
- if (ToC.length)
- {
- if (is_mobile === false)
- {
- $("#TOCbox_wrapper").show();
- }
- var result = ToC_start + ToC + ToC_End;
-
- $("#TOCbox_wrapper #TOCbox_list").html('');
- $("#print_TOC").html('');
-
- $("#TOCbox_wrapper #TOCbox_list").append(result);
- $("#print_TOC").append(result);
- } else {
- $("#TOCbox_wrapper").hide();
- }
-
- // detect print event, display TOC
- var beforePrint = function() {
- $("#print_TOC_wrapper").show();
- };
- var afterPrint = function() {
- $("#print_TOC_wrapper").hide();
- };
-
- if (window.matchMedia) {
- var mediaQueryList = window.matchMedia('print');
- mediaQueryList.addListener(function(mql) {
- if (mql.matches) {
- beforePrint();
- } else {
- afterPrint();
- }
- });
- }
-
- window.onbeforeprint = beforePrint;
- window.onafterprint = afterPrint;
-
-
-});
-
-document.querySelectorAll('pre').forEach(function (pre) {
- var closest = pre.closest('div.highlight');
- if (closest) {
- closest.innerHTML += '';
- }
-});
-
-document.querySelectorAll(".copy-to-clipboard").forEach(function (el) {
- el.addEventListener("click", function (event) {
- event.preventDefault();
- var target = event.target;
- var copyText = target
- .closest(event.target.dataset.closest)
- .querySelector(event.target.dataset.copyfrom)
- .innerText
- .replace(/\n+$/, ""); // remove trailing newlines from the copied text
- navigator.clipboard.writeText(copyText);
- target.classList.remove('bi-clipboard');
- target.className += ' bi-check2 ';
- setTimeout(function () { target.className = 'bi bi-clipboard copy-to-clipboard' }, 2000);
- })
-});
-
-var tableOfContents = document.querySelector('.table-of-contents .TOC');
-if (tableOfContents) {
- window.onclick = function (e) {
- if (!e.target.closest('.TOC') && !tableOfContents.querySelector('.closed')) {
- tableOfContents.classList.add('closed');
- }
- };
- tableOfContents.onclick = function () {
- tableOfContents.classList.toggle('closed');
- };
-}
-
-
-var menu = document.querySelector('.top_menu ul');
-var overlay = document.querySelector('#overlay');
-var openedClass = "opened";
-
-window.openMenuHandler = function (collapseMenu) {
- if (collapseMenu.className.indexOf(openedClass) == -1) {
- collapseMenu.classList.add(openedClass);
- menu.classList.add('d-b');
- overlay.style.display = "block";
- } else {
- collapseMenu.classList.remove(openedClass);
- menu.classList.remove('d-b');
- overlay.style.display = "none";
- }
-}
-
-window.openNavigationHandler = function () {
- document.querySelector('.left-menu').classList.add(openedClass);
- overlay.style.display = "block";
-}
-
-document.querySelector('.left-menu .menu-close').onclick = function () {
- document.querySelector('.left-menu').classList.remove(openedClass);
- overlay.style.display = "none";
-}
-
-overlay.onclick = function () {
- document.querySelector('.collapse').classList.remove(openedClass);
- document.querySelector('.left-menu').classList.remove(openedClass);
- menu.classList.remove('d-b');
- overlay.style.display = "none";
-}
-
-var topMenuVersions = document.querySelector('.top_menu-versions');
-topMenuVersions.onclick = function (event) {
- topMenuVersions.classList.toggle('opened');
-}
-
-document.querySelector('.top_menu-versions-title > span > span').innerText = document.querySelector('.top_menu-versions-list a[selected="selected"], .top_menu-versions-list a').innerText;
-
-var mainMenuCopy = document.querySelector('.left-menu ul.mainMenu').cloneNode(true);
-var clickedMenuHistory = [{href: './', name: 'Home'}];
-
-var urlPaths = document.location.pathname.split('/');
-var url = urlPaths[urlPaths.length - 1]; // get last url part
-var currentMenuItem = document.querySelector('.left-menu li[data-url="'+ url +'"]');
-
-var renderNestedMenu = function (href) {
- if (href == null) {
- document.querySelector('.left-menu ul.mainMenu').replaceWith(mainMenuCopy);
- } else {
- var ul = mainMenuCopy.querySelector('li[data-url="'+ href +'"]').querySelector('ul').cloneNode(true);
- ul.classList.add('mainMenu');
- document.querySelector('.left-menu ul.mainMenu').replaceWith(ul);
- var selected = document.querySelector('li[data-url="'+ url +'"]');
- if (selected){
- selected.className += ' opened current';
- }
- }
-
- applyOnclickToMenuItems();
-}
-var menuItemClickFn = function (e) {
- if (window.innerWidth < 1024) { // if the window width is less than 1024 then treat the menu as mobile one
- if (e.target.closest('li').classList.contains('parent')) {
- e.preventDefault();
- renderNestedMenu(e.target.getAttribute('href'));
- clickedMenuHistory.push({href: e.target.getAttribute('href'), name: e.target.innerText});
- buildBreadcrumbs(clickedMenuHistory);
- }
- }
-};
-
-var applyOnclickToMenuItems = function () {
- document
- .querySelector('.left-menu')
- .querySelectorAll('ul li.parent > a')
- .forEach(function (item) {
- item.onclick = menuItemClickFn
- });
-}
-applyOnclickToMenuItems();
-
-var selectedMenu = document.querySelector('.selectedMenu');
-var leftMenuBreadcrumbs = document.querySelector('.left-menu-breadcrumbs');
-var buildBreadcrumbs = function (items) {
- var html = '';
- if (items.length > 3) {
- items = items.slice(-3);
- html = '... / ';
- }
- items.forEach(function (item, index) {
- if (index > 0) {
- html += '/ ';
- }
- html += ''+ item.name +' '
- })
- leftMenuBreadcrumbs.innerHTML = html;
- var lastItem = items[items.length - 1];
- if (window.innerWidth < 1024){
- selectedMenu.innerHTML = lastItem.name !== 'Home' ?
- ''+ lastItem.name +' ' :
- '';
- }
-}
-
-document.querySelector('.menu-back').onclick = function () {
- if (clickedMenuHistory.length != 1) {
- clickedMenuHistory.pop();
- var lastHistoryElement = clickedMenuHistory[clickedMenuHistory.length - 1];
- renderNestedMenu(lastHistoryElement['name'] !== 'Home' ? lastHistoryElement['href'] : null);
- buildBreadcrumbs(clickedMenuHistory);
- }
-}
-
-
-
-if (currentMenuItem != null) {
- currentMenuItem.className += ' opened current';
- var menuHistory = [];
- var currentLink = currentMenuItem.querySelector('a');
- // if selected menu item is a parent we show children on mobile menu
- if (currentLink && currentMenuItem.classList.contains('parent')){
- menuHistory.unshift({href: currentLink.getAttribute('href'), name: currentLink.innerText});
- }
- var closest = currentMenuItem.closest('ul').closest('li');
-
- while (true) {
- if (!closest) break;
- if (window.innerWidth > 1023) { // if the window width more than 1023 then treat the menu as desktop one
- closest.classList.add('opened');
- } else {
- // Restore history from html
- var link = closest.querySelector('a');
- if (link){
- menuHistory.unshift({href: link.getAttribute('href'), name: link.innerText});
- }
- }
- closest = closest.closest('ul').closest('li');
- }
- clickedMenuHistory = clickedMenuHistory.concat(menuHistory);
-}
-buildBreadcrumbs(clickedMenuHistory);
-
-if (window.innerWidth > 1023) {
- document.querySelectorAll('.mainMenu li.parent > i').forEach(function (element) {
- element.onclick = function (event) {
- event.stopImmediatePropagation();
- var parent = element.closest('li.parent');
- parent.classList.toggle('opened');
- var openedSubmenus = parent.querySelectorAll('.' +openedClass);
- openedSubmenus.forEach((subMenu)=>{
- subMenu.classList.remove(openedClass);
- })
- }
- });
-} else {
- // Small screen
- var lastHistoryElement = clickedMenuHistory[clickedMenuHistory.length - 1];
- renderNestedMenu(lastHistoryElement.href);
-}
-
-function fillVersionWrapperSelect(url) {
- var xmlhttp = new XMLHttpRequest();
- xmlhttp.open('GET', url, true);
- xmlhttp.onreadystatechange = function () {
- if (xmlhttp.readyState != 4 || xmlhttp.status != 200) {
- return
- }
- var str = ''; //generated HTML
- var data = JSON.parse(xmlhttp.responseText);
- for (var i = 0; i < data.docs.length; i++) {
- var branch = data.docs[i];
- var selected = '';
- if (location.pathname.indexOf(branch.Link) == 0) {
- // this is version that we're currently looking at
- selected = ' selected';
- window.currentVersionLink = branch.Link;
- }
- str += '';
- }
- var top_version_wrapper = document.querySelector('#top_version_wrapper select');
-
- if (top_version_wrapper) {
- top_version_wrapper.innerHTML = str;
- }
- }
- xmlhttp.send(null);
-};
-
-function selectVersion(value) {
- if (value.indexOf('archive') == -1 && window.currentVersionLink) {
- window.location = window.location.href.replace(window.currentVersionLink, value);
- } else {
- window.location = value;
- }
-};
-window.selectVersion = selectVersion;
-
-$(document).ready(function () {
- fillVersionWrapperSelect('/docs/branches.json')
-
- const anchors = document.querySelectorAll(
- ".article h1[id], .article h2[id], .article h3[id], .article h4[id]"
- );
-
- anchors.forEach(function(el){
- const url = new URL(window.location.href);
- el.insertAdjacentHTML('beforeend', '');
- });
-
- document.querySelectorAll('a.anchor').forEach(function (a) {
- a.onclick = function (e) {
- e.preventDefault();
- navigator.clipboard.writeText(a.href);
- a.classList.add('url-copied');
- history.replaceState(null, null, a.href);
- setTimeout(function () { a.classList.remove('url-copied') }, 2000);
- }
- });
-
- /**
- * Highlight the current TOC item when a user scrolls to the corresponding page section.
- */
- (() => {
- const tocLinks = document.querySelectorAll('#TOCbox_list li a');
-
- if (!tocLinks || !anchors) {
- return;
- }
-
- // offsetTop returns offset to the offsetParent, which is main wrapper, we need to add 130px to get actual offset
- const fetchOffsets = anchors => [...anchors].map(a => a.offsetTop + 130);
- let anchorsOffsets;
- let timeout = undefined;
- const updateActiveTocItem = () => {
- if (timeout) {
- clearTimeout(timeout)
- }
- anchorsOffsets = fetchOffsets(anchors);
-
- // The current TOC menu item will be calculated in 100 ms after the user stops scrolling.
- // Otherwise, there might be redundant calculations.
- timeout = setTimeout( () => {
- let scrollTop = window.scrollY;
- tocLinks.forEach(link => link.classList.remove('current'));
-
- for (let i = anchorsOffsets.length - 1; i >= 0; i--) {
- if (scrollTop > anchorsOffsets[i]) {
- setActiveLink(anchors[i].id, i);
- break;
- }
- }
- }, 50); // 0.05s threshold
-
- }
-
- const setActiveLink = (id, n) => {
- const activeLink = document.querySelector(`#TOCbox_list li a[href$="#${id}"]`);
- if (activeLink) {
- activeLink.classList.add('current');
- }
- const tocWrapper = document.getElementById('TOCbox_wrapper');
- const TOC_TOP_OFFSET = 42;
- let i = 0;
- const offsetArr = [...tocLinks].map((el,)=>{
- const li = el.parentElement;
- i+=li.clientHeight + parseInt(window.getComputedStyle(li).getPropertyValue('margin-bottom'));
- return i;
- })
- const selectedOffset = window.innerHeight-TOC_TOP_OFFSET - (offsetArr[Math.min(offsetArr.length -1 , n + 1)]);
- tocWrapper.style.top = (selectedOffset < 0 ? 12 + selectedOffset : 12) + 'px';
-
- }
- if (window.location.hash){
- const id = window.location.hash.slice(1);
- const n = [...anchors].findIndex(a => a.id === id);
- setActiveLink(id, n);
- }
-
-
- window.addEventListener('scroll', updateActiveTocItem);
- window.addEventListener("resize", () => {
- // anchors position change when the window is resized
- anchorsOffsets = fetchOffsets(anchors);
- });
- })();
-
- /**
- * Display scroll to top button when the scroll reaches 350px
- * from the top and window width less than 1280px
- */
- (() => {
- const scrollToTopBtn = document.getElementById('scrollToTopBtn');
- const showClass = 'show';
-
- if (!scrollToTopBtn) {
- return;
- }
-
- const handleScrollToTopVisibility = () => {
- if (window.scrollY > 350 && window.innerWidth <= 1280) {
- scrollToTopBtn.classList.add(showClass);
- } else {
- scrollToTopBtn.classList.remove(showClass);
- }
- }
-
- window.addEventListener('scroll', handleScrollToTopVisibility);
- })();
-});
diff --git a/generator/_assets/js/dropdown.js b/generator/_assets/js/dropdown.js
deleted file mode 100644
index ac906c823..000000000
--- a/generator/_assets/js/dropdown.js
+++ /dev/null
@@ -1,23 +0,0 @@
-window.onclick = function (e) {
- if (!e.target.closest('.dropdown-select') || e.target.parentElement.classList.contains('dropdown-select_options')) {
- document.querySelectorAll('.dropdown-select').forEach(function (item) {
- item.classList.remove('opened')
- });
- }
-};
-
-document.querySelectorAll('.dropdown-select span').forEach(function (item) {
- item.onclick = function () {
- item.closest('.dropdown-select').classList.toggle('opened');
- }
-});
-
-document.querySelectorAll('.dropdown-select').forEach(function (item) {
- var selected_version = item.querySelector('a[selected="selected"]');
- // select first version in dropdown if no selected version
- // this happens on build previews, because branch name isn't master there
- if (!selected_version) {
- selected_version = item.querySelector('a');
- }
- item.querySelector('span div').textContent = selected_version.textContent;
-});
diff --git a/generator/_assets/js/google_analytics_search.js b/generator/_assets/js/google_analytics_search.js
deleted file mode 100644
index 5d55e5022..000000000
--- a/generator/_assets/js/google_analytics_search.js
+++ /dev/null
@@ -1,28 +0,0 @@
-//google search
-(function() {
-
- var cx = '96c0f638b03564284';
- var gcse = document.createElement('script');
- gcse.type = 'text/javascript';
- gcse.async = true;
- gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
- '//www.google.com/cse/cse.js?cx=' + cx;
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(gcse, s);
-
-})();
-
-//google analytics
-var _gaq = _gaq || [];
-_gaq.push(['_setAccount', 'UA-2576171-2']);
-_gaq.push(['_setDomainName', 'cfengine.com']);
-_gaq.push(['_trackPageview']);
-
-(function() {
- var ga = document.createElement('script');
- ga.type = 'text/javascript';
- ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(ga, s);
-})();
diff --git a/generator/_assets/js/jquery-1.9.1.min.js b/generator/_assets/js/jquery-1.9.1.min.js
deleted file mode 100644
index 006e95310..000000000
--- a/generator/_assets/js/jquery-1.9.1.min.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
-//@ sourceMappingURL=jquery.min.map
-*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
a",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="t
",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;
-return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,""],area:[1,""],param:[1,""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X",""]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"