Closed boydj closed 8 years ago
If I specify override in attributes/default.rb, the override takes place and the IPs show up in consul.json.
If I specify the attribute in recipes/default.rb, the attributes show up with knife show, but not in consul.json.
Example...
vault_nodes=search(:node, 'recipes:"role-vault-server" AND chef_environment:"' + node.chef_environment + '"') vault_ips=vault_nodes.map(&:ipaddress) node.default['consul']['config']['start_join'] = vault_ips
Results in knife show ...
consul: config: .. start_join: 10.0.0.1 10.0.0.2 10.0.0.3
But, they do not appear in /etc/consul/consul.json
I assume something screwy is happening here with poise? Any ideas?
My mistake, was setting the attributes after including the wrapped cookbook. Whoops.
If I specify override in attributes/default.rb, the override takes place and the IPs show up in consul.json.
If I specify the attribute in recipes/default.rb, the attributes show up with knife show, but not in consul.json.
Example...
vault_nodes=search(:node, 'recipes:"role-vault-server" AND chef_environment:"' + node.chef_environment + '"') vault_ips=vault_nodes.map(&:ipaddress) node.default['consul']['config']['start_join'] = vault_ips
Results in knife show ...
consul: config: .. start_join: 10.0.0.1 10.0.0.2 10.0.0.3
But, they do not appear in /etc/consul/consul.json
I assume something screwy is happening here with poise? Any ideas?