Joel Wilson
01/10/2023, 6:53 PMJoel Wilson
01/10/2023, 6:54 PMcsharpsteen
01/10/2023, 6:54 PM$certname had the class.Joel Wilson
01/10/2023, 6:55 PMcsharpsteen
01/10/2023, 6:55 PMnatemccurdy
01/10/2023, 6:55 PMnatemccurdy
01/10/2023, 6:55 PMJoel Wilson
01/10/2023, 6:57 PMcsharpsteen
01/10/2023, 6:58 PMbolt than puppet.Joel Wilson
01/10/2023, 6:59 PMSlackbot
01/10/2023, 6:59 PMnatemccurdy
01/10/2023, 6:59 PMensure => absent that yumrepo by name because..... why?natemccurdy
01/10/2023, 6:59 PMensure => absent that yumrepo by name because..... why?Joel Wilson
01/10/2023, 6:59 PMnatemccurdy
01/10/2023, 7:00 PMnatemccurdy
01/10/2023, 7:00 PMnatemccurdy
01/10/2023, 7:00 PMJoel Wilson
01/10/2023, 7:00 PMJoel Wilson
01/10/2023, 7:01 PMnatemccurdy
01/10/2023, 7:01 PMJoel Wilson
01/10/2023, 7:02 PMabsent it, and then put it back.natemccurdy
01/10/2023, 7:02 PMJoel Wilson
01/10/2023, 7:03 PMnatemccurdy
01/10/2023, 7:07 PM# If the foo::repo class has been included, remove the foo repo.
# CAUTION: This is parse order dependent. Don't use it.
if defined(Class[foo::repo]) {
yumrepo { 'foo':
ensure => absent,
}
}
ref: https://gist.github.com/natemccurdy/07e8f08f0b1811e8cbb8996bd08e5915?permalink_comment_id=3129252#gistcomment-3129252natemccurdy
01/10/2023, 7:08 PMnatemccurdy
01/10/2023, 7:09 PM# If the foo::repo class has been included, remove the foo repo.
# CAUTION: This is parse order dependent. Don't use it.
if defined(Class[foo::repo]) {
yumrepo { 'foo':
ensure => absent,
}
}
ref: https://gist.github.com/natemccurdy/07e8f08f0b1811e8cbb8996bd08e5915?permalink_comment_id=3129252#gistcomment-3129252Joel Wilson
01/10/2023, 7:11 PMnatemccurdy
01/10/2023, 7:11 PMif in my example.
unless defined(Class[foo::repo]) {natemccurdy
01/10/2023, 7:12 PMnatemccurdy
01/10/2023, 7:12 PMdefined() is good and better than using defined().