.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Rex::Config 3pm" .TH Rex::Config 3pm "2020-09-18" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Rex::Config \- Handles Rex configuration .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Rex::Config; \& \& # set a config option \& Rex::Config\->set_exec_autodie(TRUE); \& \& # get value of a config option \& my $user = Rex::Config\->get_user(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module holds all configuration options for Rex, and also allows you to specify your own ones for your modules. .PP Please take a look at Rex::Commands first, which provides convenience wrappers for many of these options. .PP While it's possible to use the methods below to set a configuration option directly, their main intended purpose is to be used as internal plumbing, and to provide an escape hatch in case there are no better alternatives. .SH "EXPORTED METHODS" .IX Header "EXPORTED METHODS" .SS "set_autodie" .IX Subsection "set_autodie" .SS "get_autodie" .IX Subsection "get_autodie" Sets and gets the value of the \f(CW$autodie\fR configuration variable. .PP This controls whether Rex should \f(CW\*(C`die()\*(C'\fR if there's an error while executing file system commands that are supposed to change the contents. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_use_net_openssh_if_present" .IX Subsection "set_use_net_openssh_if_present" .SS "get_use_net_openssh_if_present" .IX Subsection "get_use_net_openssh_if_present" Sets and gets the value of the \f(CW$use_net_openssh_if_present\fR configuration variable. .PP This controls whether Rex should use Net::OpenSSH for connections if that is available. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_use_rex_kvm_agent" .IX Subsection "set_use_rex_kvm_agent" .SS "get_use_rex_kvm_agent" .IX Subsection "get_use_rex_kvm_agent" Sets and gets the value of the \f(CW$use_rex_kvm_agent\fR configuration variable. .PP This controls whether Rex should setup and use a serial device for the experimental Rex \s-1KVM\s0 agent for managed VMs. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_use_template_ng" .IX Subsection "set_use_template_ng" .SS "get_use_template_ng" .IX Subsection "get_use_template_ng" Sets and gets the value of the \f(CW$use_template_ng\fR configuration variable. .PP This controls whether Rex should use Rex::Template::NG to render templates. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_set_no_append" .IX Subsection "set_set_no_append" .SS "get_set_no_append" .IX Subsection "get_set_no_append" Sets and gets the value of the \f(CW$set_no_append\fR configuration variable. .PP This controls whether Rex should overwrite or append values of configuration options when using the set command. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_check_service_exists" .IX Subsection "set_check_service_exists" .SS "get_check_service_exists" .IX Subsection "get_check_service_exists" Sets and gets the value of the \f(CW$check_service_exists\fR configuration variable. .PP This controls whether Rex should \f(CW\*(C`die()\*(C'\fR early if it is asked to manage a service that doesn't exist. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_register_cmdb_template" .IX Subsection "set_register_cmdb_template" .SS "get_register_cmdb_template" .IX Subsection "get_register_cmdb_template" Sets and gets the value of the \f(CW$register_cmdb_template\fR configuration variable. .PP This controls whether Rex should make \s-1CMDB\s0 data available to be used in templates as variables. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_fallback_auth" .IX Subsection "set_fallback_auth" .SS "get_fallback_auth" .IX Subsection "get_fallback_auth" Sets and gets the value of the \f(CW$fallback_auth\fR configuration variable. .PP This can be used to define an array of hash references, each of them containing authentication details to be tried during connection attempts when the directly specified ones fail. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_task_call_by_method" .IX Subsection "set_task_call_by_method" .SS "get_task_call_by_method" .IX Subsection "get_task_call_by_method" Sets and gets the value of the \f(CW$task_call_by_method\fR configuration variable. .PP This controls whether calling tasks as a method is allowed or not. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_disable_taskname_warning" .IX Subsection "set_disable_taskname_warning" .SS "get_disable_taskname_warning" .IX Subsection "get_disable_taskname_warning" Sets and gets the value of the \f(CW$disable_taskname_warning\fR configuration variable. .PP This controls whether Rex should show or suppress the warning message about task names that can not be used as Perl identifiers. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_task_chaining_cmdline_args" .IX Subsection "set_task_chaining_cmdline_args" .SS "get_task_chaining_cmdline_args" .IX Subsection "get_task_chaining_cmdline_args" Sets and gets the value of the \f(CW$task_chaining_cmdline_args\fR configuration variable. .PP This controls whether Rex should parse task arguments on the command line per task, or should pass all arguments to all tasks. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_verbose_run" .IX Subsection "set_verbose_run" .SS "get_verbose_run" .IX Subsection "get_verbose_run" Sets and gets the value of the \f(CW$verbose_run\fR configuration variable. .PP This controls whether Rex should show verbose output about executed run commands. This means an error message if the command is not found, a warning message if the exit code indicates an error, and an informational message upon success. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_exec_autodie" .IX Subsection "set_exec_autodie" .SS "get_exec_autodie" .IX Subsection "get_exec_autodie" Sets and gets the value of the \f(CW$exec_autodie\fR configuration variable. .PP This controls whether Rex should \f(CW\*(C`die()\*(C'\fR or not when the exit code of executed run command indicate an error. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_no_path_cleanup" .IX Subsection "set_no_path_cleanup" .SS "get_no_path_cleanup" .IX Subsection "get_no_path_cleanup" Sets and gets the value of the \f(CW$no_path_cleanup\fR configuration variable. .PP This controls whether Rex should clean up the \f(CW$PATH\fR before executing a run command. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_source_profile" .IX Subsection "set_source_profile" .SS "get_source_profile" .IX Subsection "get_source_profile" Sets and gets the value of the \f(CW$source_profile\fR configuration variable. .PP This controls whether Rex should source shell-specific profile files before executing commands. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_say_format" .IX Subsection "set_say_format" .SS "get_say_format" .IX Subsection "get_say_format" Sets and gets the value of the \f(CW$say_format\fR configuration variable. .PP This controls the output format of the built-in \f(CW\*(C`say\*(C'\fR command (see also sayformat). .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_do_reporting" .IX Subsection "set_do_reporting" .SS "get_do_reporting" .IX Subsection "get_do_reporting" Sets and gets the value of the \f(CW$do_reporting\fR configuration variable. .PP This controls whether Rex should do reporting on executed resources where it is supported. This only affects the data structures returned internally. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_report_type" .IX Subsection "set_report_type" .SS "get_report_type" .IX Subsection "get_report_type" Sets and gets the value of the \f(CW$report_type\fR configuration variable, which can also be controlled via the \f(CW\*(C`REX_REPORT_TYPE\*(C'\fR environment variable. .PP This selects the reporting type (format) Rex should use, e.g. \f(CW\*(AqYAML\*(Aq\fR. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_sleep_hack" .IX Subsection "set_sleep_hack" .SS "get_sleep_hack" .IX Subsection "get_sleep_hack" Sets and gets the value of the \f(CW$sleep_hack\fR configuration variable. .PP This controls whether Rex should use or not an extra 10 ns long sleep after executed commands. .PP This might help working around an issue when Rex runs inside a \s-1KVM\s0 virtualized host and Net::SSH2/libssh2 is used to connect to another \s-1VM\s0 on the same hardware. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_cache_type" .IX Subsection "set_cache_type" .SS "get_cache_type" .IX Subsection "get_cache_type" Sets and gets the value of the \f(CW$cache_type\fR configuration variable, which can also be controlled via the \f(CW\*(C`REX_CACHE_TYPE\*(C'\fR environment variable. .PP This selects the cache type Rex should use, e.g. \f(CW\*(AqYAML\*(Aq\fR. .PP Default is \f(CW\*(AqBase\*(Aq\fR. .SS "set_use_cache" .IX Subsection "set_use_cache" .SS "get_use_cache" .IX Subsection "get_use_cache" Sets and gets the value of the \f(CW$use_cache\fR configuration variable. .PP This controls whether Rex should use caching or not for runtime information like \s-1CMDB\s0 contents, hardware and operating system information, or the shell type that is being used to execute commands on the managed endpoint. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_openssh_opt" .IX Subsection "set_openssh_opt" .SS "get_openssh_opt" .IX Subsection "get_openssh_opt" Sets and gets the value of the \f(CW$openssh_opt\fR configuration variable, which holds a hash of the \s-1SSH\s0 configuration options used for the connection. See the \fBssh_config\fR\|(5) man page for the available options. .PP .Vb 1 \& Rex::Config\->set_openssh_opt( $option => $value, ); .Ve .PP There is a custom option named \f(CW\*(C`initialize_options\*(C'\fR specific to Rex, which can be used to pass a hash reference describing the constructor parameters new($host,-%opts)> for the underlying Net::OpenSSH object: .PP .Vb 1 \& Rex::Config\->set_openssh_opt( initialize_options => { $parameter => $value, } ); .Ve .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_sudo_without_locales" .IX Subsection "set_sudo_without_locales" .SS "get_sudo_without_locales" .IX Subsection "get_sudo_without_locales" Sets and gets the value of the \f(CW$sudo_without_locales\fR configuration variable. .PP This controls whether Rex should execute sudo commands without setting any locales via the \f(CW\*(C`LC_ALL\*(C'\fR environment variable. .PP \&\fBWarning:\fR if the locale is something else than \f(CW\*(C`C\*(C'\fR or \f(CW\*(C`en_US\*(C'\fR, then things will break! .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_sudo_without_sh" .IX Subsection "set_sudo_without_sh" .SS "get_sudo_without_sh" .IX Subsection "get_sudo_without_sh" Sets and gets the value of the \f(CW$sudo_without_sh\fR configuration variable. .PP This controls whether Rex should run sudo commands without \f(CW\*(C`sh\*(C'\fR. This might break things. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_executor_for" .IX Subsection "set_executor_for" .SS "get_executor_for" .IX Subsection "get_executor_for" Sets and gets the keys and values of the \f(CW%executor_for\fR configuration variable. .PP This sets the executor for a given file type when using the \f(CW\*(C`upload_and_run()\*(C'\fR function of Rex::Helper::Run module. .PP Default is: .PP .Vb 6 \& ( \& perl => \*(Aqperl\*(Aq, \& python => \*(Aqpython\*(Aq, \& ruby => \*(Aqruby\*(Aq, \& bash => \*(Aqbash\*(Aq, \& ) .Ve .SS "set_tmp_dir" .IX Subsection "set_tmp_dir" .SS "get_tmp_dir" .IX Subsection "get_tmp_dir" Sets and gets the value of the \f(CW$tmp_dir\fR configuration variable. .PP This controls which directory Rex should use for temporary files. .PP Default is determined by the following logic: .IP "\(bu" 4 try to use what \f(CW\*(C`File::Spec\->tmpdir\*(C'\fR would return on the managed endpoint .IP "\(bu" 4 fall back to \f(CW\*(Aq/tmp\*(Aq\fR .SS "set_path" .IX Subsection "set_path" .SS "get_path" .IX Subsection "get_path" Sets and gets the value of the \f(CW$path\fR configuration variable. .PP This controls which \f(CW\*(C`PATH\*(C'\fR Rex should use when executing run commands. The value should be set as an array reference, and will be dereferenced as such before returned by \f(CW\*(C`get_path\*(C'\fR. .PP Default is .PP .Vb 10 \& qw( \& /bin \& /sbin \& /usr/bin \& /usr/sbin \& /usr/local/bin \& /usr/local/sbin \& /usr/pkg/bin \& /usr/pkg/sbin \& ) .Ve .SS "set_user" .IX Subsection "set_user" .SS "get_user" .IX Subsection "get_user" Sets and gets the value of the \f(CW$user\fR configuration variable, which also can be set via the \f(CW\*(C`REX_USER\*(C'\fR environment variable. .PP This controls which user Rex should use for authentication. .PP Default is determined by the following logic: .IP "\(bu" 4 value of \f(CW\*(C`REX_USER\*(C'\fR environment variable .IP "\(bu" 4 user set by user command .IP "\(bu" 4 user running Rex .SS "set_password" .IX Subsection "set_password" .SS "get_password" .IX Subsection "get_password" Sets and gets the value of the \f(CW$password\fR configuration variable, which also can be set via the \f(CW\*(C`REX_PASSWORD\*(C'\fR environment variable. .PP This controls what password Rex should use for authentication or as passphrase when using private keys. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_port" .IX Subsection "set_port" .SS "get_port" .IX Subsection "get_port" Sets and gets the value of the \f(CW$port\fR configuration variable. .PP This controls which port Rex should connect to. .PP \&\f(CW\*(C`get_port\*(C'\fR accepts an optional \f(CW\*(C`server => $server\*(C'\fR argument to return the \f(CW\*(C`port\*(C'\fR setting for the given \f(CW$server\fR as optionally set in group files. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_sudo_password" .IX Subsection "set_sudo_password" .SS "get_sudo_password" .IX Subsection "get_sudo_password" Sets and gets the value of the \f(CW$sudo_password\fR configuration variable, which can also be controlled via the \f(CW\*(C`REX_SUDO_PASSWORD\*(C'\fR environment variable. .PP This controls what sudo password Rex should use. .PP Default is determined by the following logic: .IP "\(bu" 4 value of \f(CW\*(C`REX_SUDO_PASSWORD\*(C'\fR environment variable .IP "\(bu" 4 sudo password set by the sudo_password command .IP "\(bu" 4 password set by the password command .IP "\(bu" 4 empty string (\f(CW\*(Aq\*(Aq\fR) .SS "set_source_global_profile" .IX Subsection "set_source_global_profile" .SS "get_source_global_profile" .IX Subsection "get_source_global_profile" Sets and gets the value of the \f(CW$source_global_profile\fR configuration variable. .PP This controls whether Rex should source \f(CW\*(C`/etc/profile\*(C'\fR before executing commands. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_max_connect_fails" .IX Subsection "set_max_connect_fails" .SS "get_max_connect_fails" .IX Subsection "get_max_connect_fails" Sets and gets the value of the \f(CW$max_connect_fails\fR configuration variable. .PP This controls how many times Rex should retry to connect before giving up. .PP \&\f(CW\*(C`get_max_connect_fails\*(C'\fR accepts an optional \f(CW\*(C`server => $server\*(C'\fR argument to \f(CW\*(C`connectionattempts\*(C'\fR setting for the given \f(CW$server\fR as optionally set in group files. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_proxy_command" .IX Subsection "set_proxy_command" .SS "get_proxy_command" .IX Subsection "get_proxy_command" Sets and gets the value of the \f(CW$proxy_command\fR configuration variable. .PP This controls the \s-1SSH\s0 ProxyCommand Rex should set for connections when Net::OpenSSH is used. .PP \&\f(CW\*(C`get_proxy_command\*(C'\fR accepts an optional \f(CW\*(C`server => $server\*(C'\fR argument to return the \f(CW\*(C`proxycommand\*(C'\fR setting for the given \f(CW$server\fR as optionally set in group files. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_timeout" .IX Subsection "set_timeout" .SS "get_timeout" .IX Subsection "get_timeout" Sets and gets the value of the \f(CW$timeout\fR configuration variable. .PP This controls how many seconds Rex should wait for connections to succeed when using \s-1SSH\s0 or Rex::Commands::Rsync. .PP \&\f(CW\*(C`get_timeout\*(C'\fR accepts an optional \f(CW\*(C`server => $server\*(C'\fR argument to return the \f(CW\*(C`connecttimeout\*(C'\fR setting for the given \f(CW$server\fR as optionally set in group files. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_password_auth" .IX Subsection "set_password_auth" .SS "get_password_auth" .IX Subsection "get_password_auth" Sets and gets the value of the \f(CW$password_auth\fR configuration variable, which can also be set by setting the \f(CW\*(C`REX_AUTH_TYPE\*(C'\fR environment variable to \f(CW\*(C`pass\*(C'\fR. .PP This controls whether Rex should use the password authentication method. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_key_auth" .IX Subsection "set_key_auth" .SS "get_key_auth" .IX Subsection "get_key_auth" Sets and gets the value of the \f(CW$key_auth\fR configuration variable, which can also be set by setting the \f(CW\*(C`REX_AUTH_TYPE\*(C'\fR environment variable to \f(CW\*(C`key\*(C'\fR. .PP This controls whether Rex should use the key authentication method. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_krb5_auth" .IX Subsection "set_krb5_auth" .SS "get_krb5_auth" .IX Subsection "get_krb5_auth" Sets and gets the value of the \f(CW$krb5_auth\fR configuration variable, which can also be set by setting the \f(CW\*(C`REX_AUTH_TYPE\*(C'\fR environment variable to \f(CW\*(C`krb5\*(C'\fR. .PP This controls whether Rex should use the Kerberos 5 authentication method. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_public_key" .IX Subsection "set_public_key" .SS "get_public_key" .IX Subsection "get_public_key" Sets and gets the value of the \f(CW$public_key\fR configuration variable. .PP This controls which public key Rex should use when using Net::SSH2 for connections. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_private_key" .IX Subsection "set_private_key" .SS "get_private_key" .IX Subsection "get_private_key" Sets and gets the value of the \f(CW$private_key\fR configuration variable. .PP This controls which private key Rex should use with Rex::Commands::Rsync or when using Net::SSH2 for connections. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_parallelism" .IX Subsection "set_parallelism" .SS "get_parallelism" .IX Subsection "get_parallelism" Sets and gets the value of the \f(CW$parallelism\fR configuration variable. .PP This controls how many hosts Rex should connect to in parallel. .PP Default is \f(CW1\fR. .SS "set_log_filename" .IX Subsection "set_log_filename" .SS "get_log_filename" .IX Subsection "get_log_filename" Sets and gets the value of the \f(CW$log_filename\fR configuration variable. .PP This controls which file Rex should use for logging. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_log_facility" .IX Subsection "set_log_facility" .SS "get_log_facility" .IX Subsection "get_log_facility" Sets and gets the value of the \f(CW$log_facility\fR configuration variable. .PP This controls which log facility Rex should use when logging to syslog. .PP Default is \f(CW\*(Aqlocal0\*(Aq\fR. .SS "set_environment" .IX Subsection "set_environment" .SS "get_environment" .IX Subsection "get_environment" Sets and gets the value of the \f(CW$environment\fR configuration variable. .PP This controls which environment Rex should use. .PP Default is \f(CW\*(Aq\*(Aq\fR. .SS "set_distributor" .IX Subsection "set_distributor" .SS "get_distributor" .IX Subsection "get_distributor" Sets and gets the value of the \f(CW$distributor\fR configuration variable. .PP This controls which method Rex should use for distributing tasks for parallel execution. .PP Default is \f(CW\*(AqBase\*(Aq\fR. .SS "set_template_function" .IX Subsection "set_template_function" .SS "get_template_function" .IX Subsection "get_template_function" Sets and gets the value of the \f(CW$template_function\fR configuration variable. .PP This controls the function to be used for rendering templates. The value should be a subroutine reference that will be called with passing two scalar references as positional arguments: first is template content, second is template variables. .PP Default is determined by the following logic: .IP "\(bu" 4 if Rex::Template::NG is loadable and use_template_ng is true, use that .IP "\(bu" 4 fall back to Rex::Template otherwise .SS "set_no_tty" .IX Subsection "set_no_tty" .SS "get_no_tty" .IX Subsection "get_no_tty" Sets and gets the value of the \f(CW$no_tty\fR configuration variable. .PP This controls whether Rex should request a terminal when using Net::SSH2 or allocate a pseudo-tty for the remote process when using Net::OpenSSH. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_allow_empty_groups" .IX Subsection "set_allow_empty_groups" .SS "get_allow_empty_groups" .IX Subsection "get_allow_empty_groups" Sets and gets the value of the \f(CW$allow_empty_groups\fR configuration variable. .PP This controls whether Rex should allow empty groups of hosts or not. .PP Default is \f(CW0\fR. .SS "set_use_server_auth" .IX Subsection "set_use_server_auth" .SS "get_use_server_auth" .IX Subsection "get_use_server_auth" Sets and gets the value of the \f(CW$use_server_auth\fR configuration variable. .PP This controls whether Rex should use server-specific authentication information from group files. .PP Default is \f(CW0\fR. .SS "set_waitpid_blocking_sleep_time" .IX Subsection "set_waitpid_blocking_sleep_time" .SS "get_waitpid_blocking_sleep_time" .IX Subsection "get_waitpid_blocking_sleep_time" Sets and gets the value of the \f(CW$waitpid_blocking_sleep_time\fR configuration variable. .PP This controls how many seconds Rex should sleep between checking forks. .PP Default is \f(CW0.1\fR. .SS "set_write_utf8_files" .IX Subsection "set_write_utf8_files" .SS "get_write_utf8_files" .IX Subsection "get_write_utf8_files" Sets and gets the value of the \f(CW$write_utf8_files\fR configuration variable. .PP This controls whether Rex should force \f(CW\*(C`UTF\-8\*(C'\fR encoding when writing files. .PP Default is \f(CW\*(C`undef\*(C'\fR. .SS "set_default_auth" .IX Subsection "set_default_auth" .SS "get_default_auth" .IX Subsection "get_default_auth" Sets and gets the value of the \f(CW$default_auth\fR configuration variable. .PP This controls whether Rex should attach default authentication info to tasks. .PP Default is \f(CW1\fR. .ie n .SS "register_set_handler($handler_name, $code)" .el .SS "register_set_handler($handler_name, \f(CW$code\fP)" .IX Subsection "register_set_handler($handler_name, $code)" Register a handler that gets called by \fIset\fR. .PP .Vb 4 \& Rex::Config\->register_set_handler("foo", sub { \& my ($value) = @_; \& print "The user set foo \-> $value\en"; \& }); .Ve .PP And now you can use this handler in your \fIRexfile\fR like this: .PP .Vb 1 \& set foo => "bar"; .Ve .ie n .SS "register_config_handler($topic, $code)" .el .SS "register_config_handler($topic, \f(CW$code\fP)" .IX Subsection "register_config_handler($topic, $code)" With this function it is possible to register own sections in the users config file (\f(CW\*(C`$HOME/.rex/config.yml\*(C'\fR). .PP Example: .PP .Vb 4 \& Rex::Config\->register_config_handler("foo", sub { \& my ($param) = @_; \& print "bar is: " . $param\->{bar} . "\en"; \& }); .Ve .PP And now the user can set this in his configuration file: .PP .Vb 5 \& base: \& user: theuser \& password: thepassw0rd \& foo: \& bar: baz .Ve