The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #15778

ssh_authorized_key is not idempotent

Added by Andrea M almost 4 years ago. Updated over 3 years ago.

Status:ClosedStart date:08/01/2012
Priority:NormalDue date:
Assignee:Andrea M% Done:


Target version:-
Affected Puppet version: Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


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 over 3 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 over 3 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.

Also available in: Atom PDF