Update ssh_keys.rb
Ensures idempotency
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.
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 .
"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 .
"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.