Conditions | 1 |
Total Lines | 14 |
Lines | 14 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | # frozen_string_literal: true |
||
22 | def apply(resource_factory) |
||
23 | account = @account |
||
24 | key = @key |
||
25 | name = "#{account.id}:#{key.owner}:#{key.id}" |
||
26 | content = (key.content || '').to_s |
||
27 | resource_factory.ssh_private_key name do |
||
28 | id key.id.to_s |
||
29 | user account.id.to_s |
||
30 | # TODO: remove when https://github.com/ama-team/cookbook-ssh-private-keys/issues/2 |
||
31 | # is resolved |
||
32 | content content |
||
33 | action :remove |
||
34 | end |
||
35 | end |
||
36 | end |
||
43 |