Edit File by line
/home/barbar84/www/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/puppet
File: index.html
<!doctype html>
[0] Fix | Delete
[1] Fix | Delete
<title>CodeMirror: Puppet mode</title>
[2] Fix | Delete
<meta charset="utf-8"/>
[3] Fix | Delete
<link rel=stylesheet href="../../doc/docs.css">
[4] Fix | Delete
[5] Fix | Delete
<link rel="stylesheet" href="../../lib/codemirror.css">
[6] Fix | Delete
<script src="../../lib/codemirror.js"></script>
[7] Fix | Delete
<script src="../../addon/edit/matchbrackets.js"></script>
[8] Fix | Delete
<script src="puppet.js"></script>
[9] Fix | Delete
<style>
[10] Fix | Delete
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
[11] Fix | Delete
.cm-s-default span.cm-arrow { color: red; }
[12] Fix | Delete
</style>
[13] Fix | Delete
<div id=nav>
[14] Fix | Delete
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
[15] Fix | Delete
[16] Fix | Delete
<ul>
[17] Fix | Delete
<li><a href="../../index.html">Home</a>
[18] Fix | Delete
<li><a href="../../doc/manual.html">Manual</a>
[19] Fix | Delete
<li><a href="https://github.com/codemirror/codemirror">Code</a>
[20] Fix | Delete
</ul>
[21] Fix | Delete
<ul>
[22] Fix | Delete
<li><a href="../index.html">Language modes</a>
[23] Fix | Delete
<li><a class=active href="#">Puppet</a>
[24] Fix | Delete
</ul>
[25] Fix | Delete
</div>
[26] Fix | Delete
[27] Fix | Delete
<article>
[28] Fix | Delete
<h2>Puppet mode</h2>
[29] Fix | Delete
<form><textarea id="code" name="code">
[30] Fix | Delete
# == Class: automysqlbackup
[31] Fix | Delete
#
[32] Fix | Delete
# Puppet module to install AutoMySQLBackup for periodic MySQL backups.
[33] Fix | Delete
#
[34] Fix | Delete
# class { 'automysqlbackup':
[35] Fix | Delete
# backup_dir => '/mnt/backups',
[36] Fix | Delete
# }
[37] Fix | Delete
#
[38] Fix | Delete
[39] Fix | Delete
class automysqlbackup (
[40] Fix | Delete
$bin_dir = $automysqlbackup::params::bin_dir,
[41] Fix | Delete
$etc_dir = $automysqlbackup::params::etc_dir,
[42] Fix | Delete
$backup_dir = $automysqlbackup::params::backup_dir,
[43] Fix | Delete
$install_multicore = undef,
[44] Fix | Delete
$config = {},
[45] Fix | Delete
$config_defaults = {},
[46] Fix | Delete
) inherits automysqlbackup::params {
[47] Fix | Delete
[48] Fix | Delete
# Ensure valid paths are assigned
[49] Fix | Delete
validate_absolute_path($bin_dir)
[50] Fix | Delete
validate_absolute_path($etc_dir)
[51] Fix | Delete
validate_absolute_path($backup_dir)
[52] Fix | Delete
[53] Fix | Delete
# Create a subdirectory in /etc for config files
[54] Fix | Delete
file { $etc_dir:
[55] Fix | Delete
ensure => directory,
[56] Fix | Delete
owner => 'root',
[57] Fix | Delete
group => 'root',
[58] Fix | Delete
mode => '0750',
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
# Create an example backup file, useful for reference
[62] Fix | Delete
file { "${etc_dir}/automysqlbackup.conf.example":
[63] Fix | Delete
ensure => file,
[64] Fix | Delete
owner => 'root',
[65] Fix | Delete
group => 'root',
[66] Fix | Delete
mode => '0660',
[67] Fix | Delete
source => 'puppet:///modules/automysqlbackup/automysqlbackup.conf',
[68] Fix | Delete
}
[69] Fix | Delete
[70] Fix | Delete
# Add files from the developer
[71] Fix | Delete
file { "${etc_dir}/AMB_README":
[72] Fix | Delete
ensure => file,
[73] Fix | Delete
source => 'puppet:///modules/automysqlbackup/AMB_README',
[74] Fix | Delete
}
[75] Fix | Delete
file { "${etc_dir}/AMB_LICENSE":
[76] Fix | Delete
ensure => file,
[77] Fix | Delete
source => 'puppet:///modules/automysqlbackup/AMB_LICENSE',
[78] Fix | Delete
}
[79] Fix | Delete
[80] Fix | Delete
# Install the actual binary file
[81] Fix | Delete
file { "${bin_dir}/automysqlbackup":
[82] Fix | Delete
ensure => file,
[83] Fix | Delete
owner => 'root',
[84] Fix | Delete
group => 'root',
[85] Fix | Delete
mode => '0755',
[86] Fix | Delete
source => 'puppet:///modules/automysqlbackup/automysqlbackup',
[87] Fix | Delete
}
[88] Fix | Delete
[89] Fix | Delete
# Create the base backup directory
[90] Fix | Delete
file { $backup_dir:
[91] Fix | Delete
ensure => directory,
[92] Fix | Delete
owner => 'root',
[93] Fix | Delete
group => 'root',
[94] Fix | Delete
mode => '0755',
[95] Fix | Delete
}
[96] Fix | Delete
[97] Fix | Delete
# If you'd like to keep your config in hiera and pass it to this class
[98] Fix | Delete
if !empty($config) {
[99] Fix | Delete
create_resources('automysqlbackup::backup', $config, $config_defaults)
[100] Fix | Delete
}
[101] Fix | Delete
[102] Fix | Delete
# If using RedHat family, must have the RPMforge repo's enabled
[103] Fix | Delete
if $install_multicore {
[104] Fix | Delete
package { ['pigz', 'pbzip2']: ensure => installed }
[105] Fix | Delete
}
[106] Fix | Delete
[107] Fix | Delete
}
[108] Fix | Delete
</textarea></form>
[109] Fix | Delete
<script>
[110] Fix | Delete
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
[111] Fix | Delete
mode: "text/x-puppet",
[112] Fix | Delete
matchBrackets: true,
[113] Fix | Delete
indentUnit: 4
[114] Fix | Delete
});
[115] Fix | Delete
</script>
[116] Fix | Delete
[117] Fix | Delete
<p><strong>MIME types defined:</strong> <code>text/x-puppet</code>.</p>
[118] Fix | Delete
[119] Fix | Delete
</article>
[120] Fix | Delete
[121] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function