chef-dokku icon indicating copy to clipboard operation
chef-dokku copied to clipboard

Update ssh_keys.rb

Open jbianquetti opened this issue 12 years ago • 4 comments

Ensures idempotency

jbianquetti avatar Dec 10 '13 15:12 jbianquetti

What issue were you having that this solves? This doesn't actually ensure any kind of idempotency, it just creates a unique name for each bash/user resource instead of them all using the same name.

This behavior (amongst others in the cookbook) will be converted to an LWPR soon, so if this is not causing an issue I would like to keep the behavior as-is.

wingrunr21 avatar Dec 10 '13 15:12 wingrunr21

If I have 2 users in a kitchen test (first: vargant second: user) , the second user do not get created $HOME

2013/12/10 Stafford Brunk [email protected]

What issue were you having that this solves? This doesn't actually ensure any kind of idempotency, it just creates a unique name for each bash/user resource instead of them all using the same name.

This behavior (amongst others in the cookbook) will be converted to an LWPR soon, so if this is not causing an issue I would like to keep the behavior as-is.

— Reply to this email directly or view it on GitHubhttps://github.com/fgrehm/chef-dokku/pull/10#issuecomment-30238277 .

jbianquetti avatar Dec 10 '13 16:12 jbianquetti

"it just creates a unique name for each bash/user resource instead of them all using the same name." Chef is not really good managing resources that have the SAME name, so a best practice is make every resource uniq.

2013/12/10 Jorge Bianquetti [email protected]

If I have 2 users in a kitchen test (first: vargant second: user) , the second user do not get created $HOME

2013/12/10 Stafford Brunk [email protected]

What issue were you having that this solves? This doesn't actually ensure any kind of idempotency, it just creates a unique name for each bash/user resource instead of them all using the same name.

This behavior (amongst others in the cookbook) will be converted to an LWPR soon, so if this is not causing an issue I would like to keep the behavior as-is.

— Reply to this email directly or view it on GitHubhttps://github.com/fgrehm/chef-dokku/pull/10#issuecomment-30238277 .

jbianquetti avatar Dec 10 '13 16:12 jbianquetti

"Managing" in this context is pretty loose. It's just shelling out to SSH command. These need to be converted to proper LWRPs in order for Chef to manage them.

I will merge this to fix the multiple user import issue but you need to fix the tests and preferably add a test for the problem you were seeing.

wingrunr21 avatar Dec 10 '13 16:12 wingrunr21