Guy,

Check the debug output of the agent.  puppetd --debug or puppet agent
--debug (I think)

Or try running the same set with augtool from the command line.

# augtool --noload
augtool> set /files/etc/php5/fpm/php.ini/PHP/error_log /var/log/php/php.log
augtool> print /augeas//error

See what the output of /augeas//error is.

I suspect augeas doesn't have a lens that knows about
/etc/php5/fpm/php.ini file.

You might have to change your augeas type to something like:

augeas { 'set_php_errorlog':
   notify    => Service['php5-fpm'],
   require   => Package['php5-fpm'],
   lens   => 'IniFile.lns',
   incl   => '/etc/php5/fpm/php.ini',
   context   => '/files/etc/php5/fpm/php.ini',
   changes   => [
     "set /PHP/error_log /var/log/php/php.log",
   ],
}

Some relevant links.
http://projects.puppetlabs.com/projects/1/wiki/Puppet_Augeas
http://augeas.net/docs/references/lenses/files/inifile-aug.html

Regards,
-Alan


On Fri, Jun 15, 2012 at 2:47 PM, Guy Knights <g...@eastsidegamestudio.com> 
wrote:
> I've recently configured a couple of augeas resources, one for a php.ini
> file and one for sudoers, however neither set of changes is being saved. I
> have no idea why. The sudoers resource is here:
>
>    augeas { 'set_sudoers':
>      context    => '/files/etc/sudoers/spec[user="%sudo"]',
>      changes    => 'set /host_group/command/tag NOPASSWD',
>    }
>
> I've tested the above using augtool ('set
> /files/etc/sudoers/spec[user="%sudo"]/host_group/command/tag NOPASSWD',
> followed by 'save') and it works fine. It seems like puppet isn't saving the
> change.
>
> Here's the one for php.ini that is also not working:
>
>    augeas { 'set_php_errorlog':
>       notify    => Service['php5-fpm'],
>       require   => Package['php5-fpm'],
>       context   => '/files/etc/php5/fpm/php.ini',
>       changes   => [
>         "set /PHP/error_log /var/log/php/php.log",
>       ],
>    }
>
> Does anyone have any idea why these aren't being saved?
>
> Thanks,
> Guy
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/nVj8fzqwEp8J.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to