Haproxy frontend attributes are not showing up
We are trying to configure following frontend using haproxy cookbook
frontend http
bind :80
option http-keep-alive
rspidel ^Server:. **
**rspidel ^X-Powered-By:. <em>
rspidel ^X-AspNet-Version:. $
frontend.rb
haproxy_frontend frontend do
bind node['haproxy'][frontend]['bind']
option node['haproxy'][frontend]['option']
mode node['haproxy'][frontend]['mode']
extra_options node['haproxy'][frontend]['extra_options']
acl node['haproxy'][frontend]['acl']
use_backend node['haproxy'][frontend]['backend']
default_backend node['haproxy'][frontend]['default_backend']
end
attributes.rb
default['haproxy']['http']['extra_options'] = { 'rspidel' => '^Server:. ', 'rspidel' => '^X-Powered-By:.* ', 'rspidel' => '^X-AspNet-Version:.$' }
Problem:
After running the chef client I was expecting all of the attributes related to "rspidel" will show up under frontend, instead only "rspidel ^Server:.*$" exist in haproxy.
Chef-client resulted in following WARNING's
/home/ganga/chef-repo/.chef/local-mode-cache/cache/cookbooks/nrhl_haproxy/attributes/erpfcfrontend.rb:37: warning: key "rspidel" is duplicated and overwritten on line 37
/home/ganga/chef-repo/.chef/local-mode-cache/cache/cookbooks/nrhl_haproxy/attributes/erpfcfrontend.rb:37: warning: key "rspidel" is duplicated and overwritten on line 37
/home/ganga/chef-repo/.chef/local-mode-cache/cache/cookbooks/nrhl_haproxy/attributes/erpfcfrontend.rb:48: warning: key "rspidel" is duplicated and overwritten on line 48
/home/ganga/chef-repo/.chef/local-mode-cache/cache/cookbooks/nrhl_haproxy/attributes/erpfcfrontend.rb:48: warning: key "rspidel" is duplicated and overwritten on line 48
CookBook Version: 8.1.1
Chef Client Version: 15.4.45
OS: Centos7