Michael J. Flickinger > Sysync-0.33 > Sysync

Download:
Sysync-0.33.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.33   Source   Latest Release: Sysync-0.35

NAME ^

Sysync - Simplistic system management

SYNOPSIS ^

See: http://sysync.nongnu.org/tutorial.html

METHODS ^

new

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

Log a message.

 $self->log('the moon is broken');

sysdir

Returns the base system directory for sysync.

stagedir

Returns stage directory.

stagefilesdir

Returns stage-files directory.

get_user

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',
   ],
 }

get_all_users

Return array of all usernames.

get_user_password

Return a user's encrypted password.

set_user_password

Set a user's encrypted password.

get_users_from_group

Returns array of users in a given group.

get_all_groups

Returns array of all groups.

get_all_hosts

Returns all hosts.

must_refresh

Returns true if sysync must refresh.

Passing 1 or 0 as an argument sets whether this returns true.

must_refresh_files

Returns true if sysync must refresh managed files.

Passing 1 or 0 as an argument sets whether this returns true.

generate_user_line

Generate a line for both the user and shadow file.

generate_group_line

Generate a line for the group file.

is_valid_host

Returns true if host is valid.

get_host_user

Given a host, then a username, return a hashref with user details.

get_host_group

Given a host, then a group name, return a hashref with group details.

get_host_users

Given a host return a hashref with user details.

get_host_groups

Given a host return a hashref with group details.

get_host_ent

For a generate all of the password data, including ssh keys, for a specific host.

get_host_files

Generate a list of files with their content.

 Returns hashref:
 '/etc/filename.conf' => {
    mode     => 600,
    gid      => 0,
    uid      => 0,
    data     => 'data is here'
 }

update_host_files

Build host files from specifications.

update_all_hosts

Iterate through every host and build password files.

write_file_contents

read_file_contents

COPYRIGHT ^

2012 Ohio-Pennsylvania Software, LLC.

LICENSE ^

 Copyright (C) 2012 Ohio-Pennsylvania Software, LLC.

 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/>.

AUTHOR ^

Michael J. Flickinger, <mjflick@gnu.org>

syntax highlighting: