Issue #2038 has been updated by James Turnbull. Target version deleted (unplanned)
---------------------------------------- Feature #2038: Type/provider to manage swap files https://projects.puppetlabs.com/issues/2038 Author: James Turnbull Status: Accepted Priority: Normal Assignee: Category: newfeature Target version: Affected Puppet version: 0.24.7 Keywords: Branch: Something like: <pre> class swap { $swap_size = $fqdn ? { "admin1.production.domain.com" => "4096", "admin2.production.domain.com" => "4096", default => "2048", } exec { "/bin/dd if=/dev/zero of=/mnt/swapfile bs=1M count=$swap_size": cwd => "/mnt", creates => "/mnt/swapfile", alias => "mkswapfile-with-dd", before => Exec["mkswap-mnt-swapfile"], } exec { "/sbin/mkswap /mnt/swapfile": cwd => "/mnt", unless => "/usr/bin/file /mnt/swapfile | grep -v \"Linux/i386 swap file\"", alias => "mkswap-mnt-swapfile", before => Exec["swapon-mnt-swapfile"], } exec { "/sbin/swapon /mnt/swapfile": cwd => "/mnt", alias => "swapon-mnt-swapfile", } } </pre> -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
