On Tue, 27 Sep 2011, AJ Christensen wrote:
> Yo,
>
> Your environments attributes are wrong:
>
> On 27 September 2011 17:49, < "> > wrote:
> >
> > first, the prod and dev environments:i can show you the json version of the env files. i was trying to
> >
> > [chef-repo]$ knife environment show dev
> > chef_type: environment
> > cookbook_versions:
> > default_attributes:
> > mail-client:
> > relayhost: mungbeans.dev.dorqtown.com
> > mail-server:
> > relayhost: [smtp.gmail.com]:587
> > description: Development environment (dev)
> > json_class: Chef::Environment
> > name: dev
> > override_attributes:
>
> this should be:
> default_attributes "postfix" => { "relayhost" => "whatever" }
>
> The attributes are deep merged together onto the node and thus the
> atribute structure must remain the same. Does this make sense?
>
> If you can post the on-disk, ruby version of the environment files I
> can point out the problem, otherwise good luck!
cobble together the ruby, but not getting it quickly. for the sake of
speed i'll show the json. i see what you're saying about attribute
structure, so i corrected it, i believe. but the client's relayhost
in main.cf is still picking up the setting from the postfix cookbook
attr setting rather than the dev env setting.
[chef-repo]$ cat environments/dev.json
{
"name": "dev",
"default_attributes": {
"postfix": {
"mail-server": {
"relayhost": "[outbound.mailhop.org],[smtp.gmail.com]:587"
},
"json_class": "Chef::Environment",
"description": "Development environment (dev)",
"chef_type": "environment"
run_list: role[mail-client]
[sous-chef1-dev ~]# grep relayhost /etc/postfix/main.cf
where to look?
Archive powered by MHonArc 2.6.16.