From 5762b07a5447684ab75b4cf0d2ed989d37b25459 Mon Sep 17 00:00:00 2001 From: Gabriel Nagy Date: Thu, 30 Sep 2021 19:34:09 +0300 Subject: (MODULES-8183) Fix ToC truncation in REFERENCE.md Puppet Strings prefers a `@summary` tag with a max of 140 characters to fill in the Table of Contents summary. Without this, the description will appear truncated. Add `@summary` and `@example` tags to the type documentation. --- REFERENCE.md | 199 ++++++++++++++++++++++++++-------------------- lib/puppet/type/augeas.rb | 11 ++- 2 files changed, 117 insertions(+), 93 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 5304160..8019100 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1,42 +1,48 @@ # Reference + ## Table of Contents -**Resource types** +### Resource types -* [`augeas`](#augeas): Apply a change or an array of changes to the filesystem using the augeas tool. Requires: - [Augeas](http://www.augeas.net) - The ruby-augea +* [`augeas`](#augeas): Apply a change or an array of changes to the filesystem using the augeas tool. ## Resource types -### augeas - -Apply a change or an array of changes to the filesystem -using the augeas tool. +### `augeas` Requires: - [Augeas](http://www.augeas.net) - The ruby-augeas bindings -Sample usage with a string: +#### Examples + +##### Sample usage with a string: - augeas{"test1" : - context => "/files/etc/sysconfig/firstboot", - changes => "set RUN_FIRSTBOOT YES", - onlyif => "match other_value size > 0", - } +```puppet -Sample usage with an array and custom lenses: +augeas { "test1": + context => "/files/etc/sysconfig/firstboot", + changes => "set RUN_FIRSTBOOT YES", + onlyif => "match other_value size > 0", +} +``` - augeas{"jboss_conf": - context => "/files", - changes => [ - "set etc/jbossas/jbossas.conf/JBOSS_IP $ipaddress", - "set etc/jbossas/jbossas.conf/JAVA_HOME /usr", - ], - load_path => "$/usr/share/jbossas/lenses", - } +##### Sample usage with an array and custom lenses: + +```puppet + +augeas { "jboss_conf": + context => "/files", + changes => [ + "set etc/jbossas/jbossas.conf/JBOSS_IP $ipaddress", + "set etc/jbossas/jbossas.conf/JAVA_HOME /usr", + ], + load_path => "$/usr/share/jbossas/lenses", +} +``` #### Properties @@ -46,27 +52,88 @@ The following properties are available in the `augeas` type. The expected return code from the augeas command. Should not be set. -Default value: 0 +Default value: `0` #### Parameters The following parameters are available in the `augeas` type. -##### `name` +* [`changes`](#changes) +* [`context`](#context) +* [`force`](#force) +* [`incl`](#incl) +* [`lens`](#lens) +* [`load_path`](#load_path) +* [`name`](#name) +* [`onlyif`](#onlyif) +* [`provider`](#provider) +* [`root`](#root) +* [`show_diff`](#show_diff) +* [`type_check`](#type_check) + +##### `changes` -namevar +The changes which should be applied to the filesystem. This +can be a command or an array of commands. The following commands are supported: -The name of this task. Used for uniqueness. +* `set ` --- Sets the value `VALUE` at location `PATH` +* `setm ` --- Sets multiple nodes (matching `SUB` relative to `PATH`) to `VALUE` +* `rm ` --- Removes the node at location `PATH` +* `remove ` --- Synonym for `rm` +* `clear ` --- Sets the node at `PATH` to `NULL`, creating it if needed +* `clearm ` --- Sets multiple nodes (matching `SUB` relative to `PATH`) to `NULL` +* `touch ` --- Creates `PATH` with the value `NULL` if it does not exist +* `ins