Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4612

Puppet module for uninstall a software

$
0
0

I need to remove seafile and seafile gpg on my debian machines,I think modify the puppet module for install seafile.

class remove_ seafile {     case $facts['os']['distro']['codename'] {         'buster','bullseye','focal': {              include apt              apt::source { 'seafilerepo2020':                  location => "https://linux-clients.seafile.com/seafile-deb/$lsbdistcodename",                  release => 'stable',                  repos => 'main',                  key => {                      # OLD id => "C789DBBD226BACFA3708053BB9AEC3A21F035485",                      id => "658A84218F4954AAB205037A2B844307BE7E9E8C",                      source => "https://linux-clients.seafile.com/seafile.asc"                  },                  pin => 500,               }               package { 'seafile-gui':                   ensure => absent,                   require => Apt::Source['seafilerepo2020'],               }           }     }           exec{'cleanupseafile2022key':                 command => 'apt-key del "C789 DBBD 226B ACFA 3708  053B B9AE C3A2 1F03 5485"               onlyif => 'apt-key list|grep -q "C789 DBBD"',                 }           exec{'cleanupseafile2022key':                 command => 'apt-key del "658A 8421 8F49 54AA B205  037A 2B84 4307 BE7E 9E8C"                onlyif => 'apt-key list|grep -q "658A 8421"',                 }     file { "/etc/skel/.seafilerc":         ensure => "absent",         source => "puppet:///modules/seafile/seafilerc",     }     #file {"/etc/xdg/autostart/seafile.desktop":     #    ensure => "link",     #    target => "/usr/share/applications/seafile.desktop"     #}  }

It's correct ?

Have a nice day.

If the code works, gpg keys is delete and seafile is uninstall of clients machines.


Viewing all articles
Browse latest Browse all 4612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>