I am trying to use information that facter gathers on the agent server in 
the manifest. I am trying to use "domain => dev.com" depending on what 
domain is I deploy the file. I ran the manifest and it did not give me an 
error but it did not fdeploy the file. My code is below. 
In my files directory for this manifest I have these files
aliases
submit.cf.dev.com
submit.cf.test.com
 
MY init.pp file is the one below
class sendmailnew {
exec { "mail":
     command => "/usr/bin/yum -y install sendmail",
  }
  exec { "restart":
       command => "/etc/init.d/sendmail restart",
  }
    file {
    "/etc/mail/aliases":
      ensure => file,
      source => "puppet:///sendmailnew/aliases",
      owner => root,
      group => root,
      mode => 644;
  }
  exec { "mailaliases":
       command => "/usr/bin/newaliases",
  }
}
class submitcf ($domain) {
      file { submit:
         path => $domain ? {
             default => "/etc/mail/submit.cf",
      },
      ensure => file,
      owner => root,
      group => root,
      mode => 644,
      source => "puppet:///sendmailnew/submit.cf.$domain";
  }
}

-- 
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/-/_jEyytVTYGUJ.
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.

Reply via email to