view modules/inifile/examples/ini_setting.pp @ 399:2c6065b5be5e

Switch to config-based PHP extensions This makes it compatible with Ubuntu, otherwise it keeps trying to re-install the same module because the "phpX.X" package is a virtual package and the Puppet handling of Ubuntu's "is it installed" system is incapable of saying "yes" when a virtual package is installed.
author IBBoard <dev@ibboard.co.uk>
date Wed, 20 Apr 2022 19:08:14 +0100
parents 3fce34f642f1
children
line wrap: on
line source

ini_setting { 'sample setting':
  ensure  => present,
  path    => '/tmp/foo.ini',
  section => 'foo',
  setting => 'foosetting',
  value   => 'FOO!',
}

ini_setting { 'sample setting2':
  ensure            => present,
  path              => '/tmp/foo.ini',
  section           => 'bar',
  setting           => 'barsetting',
  value             => 'BAR!',
  key_val_separator => '=',
  require           => Ini_setting['sample setting'],
}

ini_setting { 'sample setting3':
  ensure  => absent,
  path    => '/tmp/foo.ini',
  section => 'bar',
  setting => 'bazsetting',
  require => Ini_setting['sample setting2'],
}