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

rewind a LWRP that is called twice #3

Closed
danielnbarbosa opened this issue Feb 19, 2013 · 1 comment
Closed

rewind a LWRP that is called twice #3

danielnbarbosa opened this issue Feb 19, 2013 · 1 comment

Comments

@danielnbarbosa
Copy link

Hi,

Is it possible to use chef-rewind to rewind only one of two instances of a LWRP? For example in the sensu::rabbitmq recipe I have this:

rabbitmq_user node.sensu.rabbitmq.user do
  password node.sensu.rabbitmq.password
  action :add
end

rabbitmq_user node.sensu.rabbitmq.user do
  vhost node.sensu.rabbitmq.vhost
  permissions "\".*\" \".*\" \".*\""
  action :set_permissions
end

I would like to change the permissions in the second rabbitmq_user call. Is there a way to do this using chef-rewind?

Thanks,
Daniel

@kisoku
Copy link

kisoku commented Mar 12, 2013

I don't think you would need to use chef-rewind for this. You should be able to write this resource like this instead

rabbitmq_user node.sensu.rabbitmq.user do
  vhost node.sensu.rabbitmq.vhost
  password node.sensu.rabbitmq.password
  permissions "\".*\" \".*\" \".*\""
  action [ :add, :set_permissions ]
end

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