The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com
ssh_authorized_key is not idempotent
|Assignee:||Andrea M||% Done:|
|Affected Puppet version:||Branch:|
Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com
This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.
When an ssh_authorized_key resource type is applied multiple times, the authorized_keys grows with keys being repeated. Since operations should be idempotent, this procedure needs to include logic that checks for the existence of the key before adding it.
#1 Updated by Stefan Schulte almost 2 years ago
- Status changed from Unreviewed to Needs More Information
- Assignee set to Andrea M
Can you please post your resource that is causing the duplication and the duplicate lines in your authorized key file? In general the type is idempotent. Puppet will check the existance of a key by checking the comment field (that is the title of the resource).
#2 Updated by Andrea M almost 2 years ago
- Status changed from Needs More Information to Closed
- % Done changed from 0 to 100
Thank you. Knowing that it is based on the comment that the key is checked solved my problem. I already had a comment tailing the key. So, it was probably not detecting as duplicate.