Sysync - Simplistic system management
See: http://sysync.nongnu.org/tutorial.html
Creates a new Sysync object.
my $sysync = Sysync->new({ sysdir => '/var/sysync', stagedir => '/var/sysync/stage', # if omitted, appends ./stage to sysdir salt_prefix => '', # if omitted, defaults to '$6$' log => $file_handle_for_logging, });
Log a message.
$self->log('the moon is broken');
Returns the base system directory for sysync.
Returns stage directory.
Returns stage-files directory.
Returns hashref of user information. It's worth noting that passwords should not be returned here for normal users.
Example: { username => 'wafflewizard', uid => 1001, fullname => 'Waffle E. Wizzard', homedir => '/home/wafflewizard', shell => '/bin/bash', disabled => 0, ssh_keys => [ 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA10YAFEAByOlrMmd5Beh73SOg7okHpK5Bz9dOgmYb4idR3A6iz+ycyXtnCmwSGdmh6AQoeKfJx+9rxLtvdHUzhRa/YejqBGsTwYl5Q+1bKbCkJfgZhtB99Xt5j7grXzrJ0zp2vTfG2mPndnD7xuQQQnLsZrFSoTY8FPvQo3a9R1wPIuxBGs5jWm9+pvluJtAT3I7IaVfylNBCGU8+Fw/qvJtWEesyqyRmFJZ47XzFKJ5EzB6hLaW+MAaCH6fZDycdjiTfJOMThtpFF557rqz5EN76VRqHpnkiqKpatMX4h0hiL/Snl+fbUxOYm5qcHughuis4Sf6xXoABsyz2lsrqiQ== wafflewizard', ], }
Return array of all usernames.
Return a user's encrypted password.
Set a user's encrypted password.
Returns array of users in a given group.
Returns array of all groups.
Returns all hosts.
Returns true if sysync must refresh.
Passing 1 or 0 as an argument sets whether this returns true.
Returns true if sysync must refresh managed files.
Generate a line for both the user and shadow file.
Generate a line for the group file.
Returns true if host is valid.
Given a host, then a username, return a hashref with user details.
Given a host, then a group name, return a hashref with group details.
Given a host return a hashref with user details.
Given a host return a hashref with group details.
For a generate all of the password data, including ssh keys, for a specific host.
Generate a list of files with their content.
Returns hashref: '/etc/filename.conf' => { mode => 600, gid => 0, uid => 0, data => 'data is here' }
Build host files from specifications.
Iterate through every host and build password files.
Bizowie cloud erp
Copyright (C) 2012, 2013 Bizowie This file is part of Sysync. Sysync is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Sysync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Michael J. Flickinger, <mjflick@gnu.org>
<mjflick@gnu.org>
To install Sysync, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sysync
CPAN shell
perl -MCPAN -e shell install Sysync
For more information on module installation, please visit the detailed CPAN module installation guide.