Mirrored from Obsolete Your Idols.
So the first puppet module for postfix I tried to apply was riseup’s, from
https://labs.riseup.net/code/projects/sh
Here’s the manifest I wrote to test the module
node default {
$postfix_smtp_listen = '0.0.0.0'
$postfix_mydestination = '$myorigin, manjusri.org'
include postfix::mta
postfix::transport { 'manjusri.org':
ensure => present,
destination => 'local:',
}
}
Not very sophisticated but that’s what I wanted to test. Set up a simple receiving postfix which accepts email for manjusri.org.
Then I hit a problem, trying to use the module.
ubuntu@ip-10-248-21-143:~/puppet$ sudo puppet apply --modulepath=/home/ubuntu/puppet/modules manifests/mx.pp
Could not find class postfix::mta for ip-10-248-21-143.us-west-2.compute.internal at /home/ubuntu/puppet/manifests/mx.pp:5 on node ip-10-248-21-143.us-west-2.compute.internal
ubuntu@ip-10-248-21-143:~/puppet$
That’s not good, the example given says that’s right. The module file postfix-mta.pp declares the class with the name postfix::mta. Ah. It’s the autoloader. So, simple enough, just cp modules/postfix/manifests/classes/postfi
ubuntu@ip-10-248-21-143:~/puppet$ sudo puppet apply --modulepath=/home/ubuntu/puppet/modules manifests/mx.pp
warning: Dynamic lookup of $postfix_mydestination at /home/ubuntu/puppet/modules/postfix/manifests/classes/postfix-mta.pp:39 is deprecated. Support will be removed in Puppet 2.8. Use a fully-qualified variable name (e.g., $classname::variable) or parameterized classes.
warning: Dynamic lookup of $postfix_smtp_listen at /home/ubuntu/puppet/modules/postfix/manifests/classes/postfix.pp:37 is deprecated. Support will be removed in Puppet 2.8. Use a fully-qualified variable name (e.g., $classname::variable) or parameterized classes.
Could not find class common::moduledir for ip-10-248-21-143.us-west-2.compute.internal at /home/ubuntu/puppet/modules/postfix/manifests/classes/postfix.pp:75 on node ip-10-248-21-143.us-west-2.compute.internal
ubuntu@ip-10-248-21-143:~/puppet$
BRAAAAAAAAAAP. So now this module is wanting to invoke another module, common::moduledir. I’m not sure I want to buy into the whole suite of modules at this time so let’s table this test and flag it as Unsuccessful for the simple reason that it would require more to use it than simply making this module a submodule of my puppet repository.