Resource Type: dsc_replacetext

Defined in:
lib/puppet/type/dsc_replacetext.rb
Providers:
powershell

Overview

The DSC ReplaceText resource type. Automatically generated from ‘FileContentDsc/DSCResources/DSR_ReplaceText/DSR_ReplaceText.schema.mof’

To learn more about PowerShell Desired State Configuration, please visit technet.microsoft.com/en-us/library/dn249912.aspx.

For more information about built-in DSC Resources, please visit technet.microsoft.com/en-us/library/dn249921.aspx.

For more information about xDsc Resources, please visit github.com/PowerShell/DscResources.

Properties

  • ensure

    The basic property that the resource should be in.

    Supported values:
    • exists?
    • present

Parameters

  • dsc_allowappend

    AllowAppend - Specifies to append text to the file being modified. Adds the ability to add a configuration entry.

    Supported values:
    • true
    • false
  • dsc_encoding

    Encoding - Specifies the file encoding. Defaults to ASCII Valid values are ASCII, BigEndianUnicode, BigEndianUTF32, UTF8, UTF32.

  • dsc_path

    Path - The path to the text file to replace the string in.

  • dsc_psdscrunascredential

    PsDscRunAsCredential

  • dsc_search

    Search - The RegEx string to use to search the text file.

  • dsc_secret

    Secret - The secret text to replace the text identified by the RegEx. Only used when Type is set to ‘Secret’.

  • dsc_text

    Text - The text to replace the text identified by the RegEx. Only used when Type is set to ‘Text’.

  • dsc_type

    Type - Specifies the value type to use as the replacement string. Defaults to ‘Text’. Valid values are Text, Secret.

  • name (namevar)
  • provider

    The specific backend to use for this ‘dsc_replacetext` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.