[chef] Re: Re: Re: Re: Re: Re: using env attr to override a default


Chronological Thread 
  • From:
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: using env attr to override a default
  • Date: Tue, 27 Sep 2011 16:20:48 -0700

On Tue, 27 Sep 2011, Matt Ray wrote:

> Could you show the output of
> knife node show yourmail-server
> knife node show yourmail-server -a postfix
> knife environment show dev
> knife environment show prod

[chef-repo]$ knife node show sous-chef2.dev.dorqtown.com
Node Name:   sous-chef2.dev.dorqtown.com
Environment: dev
FQDN:        sous-chef2.dev.dorqtown.com
IP:          50.19.69.96
Run List:    role[mail-server]
Roles:       mail-server
Recipes:     postfix
Platform:    centos 5.6


[cheftain01]$ knife node show sous-chef2.dev.dorqtown.com -a postfix
postfix:
  mail-client:
    relayhost:  mungbeans.dev.dorqtown.com
  mail-server:
    relayhost:  [outbound.mailhop.org],[smtp.gmail.com]:587
  mail_relay_networks:         127.0.0.0/8
  mail_type:                   mail-client
  mydomain:                    dev.dorqtown.com
  myhostname:                  sous-chef2.dev.dorqtown.com
  myorigin:                    $myhostname   
  relayhost:                   mailrelay.dev.dorqtown.com
  smtp_fallback_relay:         [smtp.gmail.com]:587
  smtp_sasl_auth_enable:       no
  smtp_sasl_passwd:
  smtp_sasl_password_maps:     hash:/etc/postfix/sasl_passwd
  smtp_sasl_security_options:  noanonymous
  smtp_sasl_user_name:
  smtp_tls_cafile:             /etc/postfix/cacert.pem
  smtp_use_tls:                no


[chef-repo]$ knife environment show dev
chef_type:            environment
cookbook_versions:
default_attributes:
  postfix:
    mail-client:
      relayhost:  mungbeans.dev.dorqtown.com
    mail-server:
      relayhost:  [outbound.mailhop.org],[smtp.gmail.com]:587
description:          Development environment (dev)
json_class:           Chef::Environment
name:                 dev
override_attributes:

[chef-repo]$ knife environment show prod
chef_type:            environment
cookbook_versions:
default_attributes:
  mail-client:
    relayhost:  mailrelay.prod.dorqtown.com
  mail-server:
    relayhost:            [smtp.sendgrid.net]:587
    smtp_fallback_relay:  [outbound.mailhop.org],[smtp.gmail.com]:587
description:          Production environment
json_class:           Chef::Environment
name:                 prod
override_attributes:


 
> Are any of the roles setting the attributes?

nope. the roles only set the run-list.

> Here are the precedence
> rules for reference:
> http://wiki.opscode.com/display/chef/Attributes#Attributes-Precedence
> 
> Thanks,
> Matt Ray
> Senior Technical Evangelist | Opscode Inc.
> 
>  | (512) 731-2218
> Twitter, IRC, GitHub: mattray



Archive powered by MHonArc 2.6.16.

§