puppetlabs-inifile icon indicating copy to clipboard operation
puppetlabs-inifile copied to clipboard

Add new ini_section type

Open smortex opened this issue 11 months ago • 0 comments

In order to explicitly manage sections of an ini file regardless of their content, we introduce a new ini_section type. This make it possible to remove a whole section of an ini file, regardless of its content:

ini_section { 'remove puppet.conf agent section':
  ensure  => abent,
  path    => '/etc/puppetlabs/puppet/puppet.conf',
  section => 'agent',
}

Just like the ini_setting type, ini_section can be subclassed:

puppet_config { 'remove agent section':
  ensure  => abent,
  section => 'agent',
}

Fixes #524

smortex avatar Apr 01 '24 19:04 smortex