Version information
Start using this module
Add this module to your Puppetfile:
mod 'thias-csync2', '0.1.1'
Learn more about managing modules with a PuppetfileDocumentation
puppet-csync2
Overview
Install, enable and configure csync2. For more information, see http://oss.linbit.com/csync2/
csync2
: Main class to install and enable the server.csync2::cfg
: Simple definition to manage pre-created configuration files.csync2::key
: Simple definition to manage pre-created shared keys.
This module requires another module to manage the xinetd configuration. See examples below for the thias-xinetd module.
You will also need to allow all nodes to access 30865/tcp on each node.
Examples
To generate a key file that you can then deploy using puppet :
csync2 -k example.key
Typical module invocation :
class { 'csync2':
cfg_source => 'puppet:///modules/example/csync2/csync2.cfg',
key_source => 'puppet:///modules/example/csync2/csync2.key',
}
With the content of csync2.cfg
being :
group example {
host www01.example.com@192.168.12.1;
host www02.example.com@192.168.12.2;
host www03.example.com@192.168.12.3;
key /etc/csync2/csync2.key;
include /var/www;
}
Once all nodes have been configured by puppet, run the following on all :
csync2 -xv
From here, you should either run csync2 -x
from cron, or have it triggered
by some other program which watches directories for changes using inotify, such
as lsyncd.
If you have more than one configuration on a node, you will want to use the
csync2::cfg
and csync2::key
definitions to manage its files :
csync2::cfg { 'example2':
source => 'puppet:///modules/example/csync2/csync2_example2.cfg',
}
csync2::key { 'example2':
source => 'puppet:///modules/example/csync2/csync2_example2.key',
}
Note that in this case, all files have the csync2_
prefix automatically
added, in order to make things work with the csync2 -C example2 -xv
syntax.
2013-04-16 - 0.1.1
- Add csync2::cfg defition to manage multiple configurations.
- Use csync2::cfg and csync2::key from the main class for the defaults.
2013-04-16 - 0.1.0
- Initial module release.
Copyright (C) 2013 Matthias Saou Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.