The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

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 https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Feature #1023

yumrepo option to purge unmanaged repos

Added by Ben - over 8 years ago. Updated about 3 years ago.

Status:DuplicateStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:yumrepo
Target version:-
Affected Puppet version:0.24.8 Branch:
Keywords: customer

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com


Description

it would be nice if there was a way to purge any yum repo’s that were not managed by puppet.

file { "/etc/yum.repos.d": ensure => directory, recurse => true, purge => true }

a file type purge would work if the resulting repo file from a yumrepo type was labeled as a file resource too.


Related issues

Duplicates Puppet - Feature #9293: yum repos should be ensurable. In Topic Branch Pending Review

History

#1 Updated by Ben - over 8 years ago

Thankyou i was not aware of that type, however it doesn’t do it. It raises an error.

err: Could not create yumrepo: Parameter purge failed: Purging is only supported on types that accept 'ensure'

#2 Updated by James Turnbull over 8 years ago

  • Status changed from 1 to Closed
  • 7 set to duplicate

Closing as duplicate of [#949]

#3 Updated by James Turnbull over 8 years ago

Have you looked at the resource type – http://reductivelabs.com/trac/puppet/wiki/TypeReference#resources?

#4 Updated by Teyo Tyree over 6 years ago

  • Status changed from Closed to Re-opened
  • Assignee deleted (Puppet Community)
  • Affected Puppet version set to 0.24.8

949 is not a duplicate of this ticket. #949 asks for the ability to “ensure => absent” as well as “present”. The yumrepo resource is not currently “ensurable” and thusly can not be purged using the “resources” resource type. Purging allows us to declare that only managed repos will be available on a host. All other repos will be removed.

#5 Updated by Joshua Corbin almost 6 years ago

Would it be possible for yumrepo to simply define a File resource and update the content of the file through that? This would allow for: * Tidying of /etc/yum.repos.d * Filebucketing of the managed file (#2027)

This would’ve been trivial with a macro:

define yumrepo(...) {
file {"/etc/yum.repos.d/$name.repo":
    ...
}

}

#6 Updated by Peter Meier almost 6 years ago

This would’ve been trivial with a macro:

define yumrepo(...) {
file {"/etc/yum.repos.d/$name.repo":
    ...
}

}

as done here: http://git.puppet.immerda.ch/?p=module-yum.git

#7 Updated by James Turnbull over 5 years ago

  • Category set to yumrepo
  • Status changed from Re-opened to Needs Decision
  • Assignee set to Nigel Kersten

#8 Updated by Nigel Kersten over 5 years ago

  • Status changed from Needs Decision to Accepted
  • Assignee deleted (Nigel Kersten)

You should be able to purge repositories not managed by Puppet, yes.

#9 Updated by Nigel Kersten over 4 years ago

  • Status changed from Accepted to Duplicate

Duping in favor of another ticket to make it ensurable that references these two.

#10 Updated by Charlie Sharpsteen about 3 years ago

  • Keywords set to customer

Also available in: Atom PDF