puppet - ini remove [closed]

asked 2017-05-22 14:10:03 -0600

puser gravatar image

I am using puppet 4.5.3 and ini_setting module version 1.4.2. I need to be able to remove a stanza in an ini file. For example:

ip = ''
hostname = 'myserver'
port = 80

I am able to remove each section of the ini file using the ensure => absent parameter but I cannot find a way to remove the stanza header, or preferably the whole thing in one command.

What I have left is


Does anyone know how this can be done? Unfortunately there are other stanzas in the same file that I need to keep so I cannot simply delete the file.


edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by smarlow
close date 2017-05-23 11:09:23.889619