Guest User

Untitled

a guest
Sep 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. # /etc/puppet/manifests/classes/noapache2.pp
  2. #
  3. # Removes apache2 from an Ubuntu server.
  4. # Removal is sometimes not enough, hence the service definition.
  5.  
  6. class noapache2 {
  7. package { 'apache2':
  8. ensure => purged,
  9. }
  10. service { 'apache2':
  11. ensure => stopped,
  12. enable => false,
  13. }
  14. exec { 'autoremove':
  15. command => '/usr/bin/apt-get autoremove --purge -y',
  16. refreshonly => true,
  17. subscribe => Package['apache2'],
  18. }
  19. }
Add Comment
Please, Sign In to add comment