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:

[header]
ip = '1.1.1.1'
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

[header]

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.

thanks,

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