Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node[elkstack_kibana_password] not working #55

Open
martinb3 opened this issue Oct 7, 2014 · 2 comments
Open

node[elkstack_kibana_password] not working #55

martinb3 opened this issue Oct 7, 2014 · 2 comments

Comments

@martinb3
Copy link
Contributor

martinb3 commented Oct 7, 2014

@hhoover Kibana Auth seems to generate a random password even if node[elkstack_kibana_password] is present and defined.

@gortazar
Copy link

gortazar commented Feb 6, 2015

@martinb3 the problem is that the key is not available at compile time, so a new random password is generated even if later on (at converge time) the key is present. To make it work I need to do something like this:

ruby_block 'revision' do
  block do
    node.run_state['elkstack_kibana_password'] = 'test' 
  end
end.run_action(:run)

But then I cannot use an attribute in my recipe to define the password. It seems that attributes are still not available when the resource is executed at compile time.

Reading comments at issue #99 it seems that a standard attribute is not an option. Any ideas on how to fix this? I may provide a pull request for this but need some guidance.

@scalp42
Copy link

scalp42 commented Feb 8, 2016

@gortazar just in case, need to make sure it's wrapped in the lazy method:

file 'myfile' do
  content(lazy { node.run_state['elkstack_kibana_password'] })
end

Should work as intended (wait for execution phase to populate content).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants