might be easier to just use sed in a exec statement to replace all
occurances of DS with DShostname.domain
Ex:
sed 's/DS/c DShostname.domain' /etc/mail/sendmail.cf
On Thursday, January 24, 2013 2:28:34 PM UTC+10, kdo wrote:
>
> what i thought would be a simple edit using augeas is turning out to not
> be so straight forward, can anyone please help ?
>
> the plan is to edit sendmail.cf and change the default DS to
> DShostname.domain
>
> class mail {
> $key = DS
>
> service {
> 'sendmail':;
> }
> augeas { "sendmail.cf/$key":
> context => "/files/etc/mail/sendmail.cf",
> changes => "set $key mail.hostname.domain",
> notify => Service['sendmail'];
> }
> }
>
>
> debug:
> Augeas[sendmail.cf/DS](provider=augeas)<http://sendmail.cf/DS%5D(provider=augeas)>:
>
> Opening augeas with root /, lens path , flags 0
> debug:
> Augeas[sendmail.cf/DS](provider=augeas)<http://sendmail.cf/DS%5D(provider=augeas)>:
>
> Augeas version 0.9.0 is installed
> debug:
> Augeas[sendmail.cf/DS](provider=augeas)<http://sendmail.cf/DS%5D(provider=augeas)>:
>
> Will attempt to save and only run if files changed
> debug:
> Augeas[sendmail.cf/DS](provider=augeas)<http://sendmail.cf/DS%5D(provider=augeas)>:
>
> sending command 'set' with params ["/files/etc/mail/sendmail.cf/DS",
> "mail.hostname.domain"]
> debug:
> Augeas[sendmail.cf/DS](provider=augeas)<http://sendmail.cf/DS%5D(provider=augeas)>:
>
> Skipping because no files were changed
> debug:
> Augeas[sendmail.cf/DS](provider=augeas)<http://sendmail.cf/DS%5D(provider=augeas)>:
>
> Closed the augeas connection
>
>
>
>
>
--
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/-/m8UfPL9e84cJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.