Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from RexOps:master #1

Merged
merged 1,162 commits into from
Oct 28, 2022
Merged
Changes from 1 commit
Commits
Show all changes
1162 commits
Select commit Hold shift + click to select a range
0c47af0
Merge pull request #1372 from RexOps/local_rsync_fixes
ferki Jul 2, 2020
0d3d1e0
Release 1.12.0
ferki Jul 5, 2020
598baaf
Document feature flags
randyl Jul 3, 2020
5e9e814
Clarify feature flag documentation
ferki Aug 1, 2020
1a7bc53
Merge pull request #1389 from RexOps/feature_flags
ferki Aug 3, 2020
ca81ecb
Gather only files tracked by git
ferki Aug 3, 2020
a815e97
Merge pull request #1391 from RexOps/gather_dist_files
ferki Aug 3, 2020
161775a
Clarify description of the rex script
ferki Aug 3, 2020
0fcfd0f
Merge pull request #1393 from RexOps/rex_description
ferki Aug 3, 2020
72cc884
Fix typo
ferki Aug 4, 2020
f90d3c4
Update feature flag examples
ferki Aug 4, 2020
688de10
Release 1.12.1
ferki Aug 5, 2020
cb28e34
Set Travis CI root build job options explicitly
ferki Jun 4, 2020
6094895
Merge pull request #1398 from RexOps/travis-ci
ferki Aug 11, 2020
a947e94
Update links
ferki Aug 19, 2020
c97744f
Perltidy
ferki Aug 22, 2020
ebedfeb
Clarify contributing guide
ferki Aug 22, 2020
40d3734
Clarify git workflow
ferki Aug 22, 2020
4493db4
Clarify issue and pull request templates
ferki Aug 22, 2020
1842248
Merge pull request #1404 from RexOps/contributing_guide
ferki Aug 22, 2020
fe4b654
Refactor MD5 checksum calculation
ferki Aug 23, 2020
b537ee4
Test internal MD5 checksumming methods
ferki Aug 23, 2020
5e43a31
Choose MD5 binary based on availability
ferki Aug 24, 2020
a2a7ec4
Use regex to parse MD5 binary output
ferki Aug 24, 2020
7995186
Merge pull request #1407 from RexOps/os_x_md5
ferki Aug 24, 2020
282977f
Clarify INI file documentation
ferki Aug 24, 2020
826d012
Document custom server parameters in INI files
ferki Aug 24, 2020
4dcbf0d
Merge pull request #1406 from RexOps/ini_custom_properties
ferki Aug 24, 2020
e975694
Report coverage to Coveralls
ferki Jun 26, 2020
f4cafe4
Merge pull request #1409 from ferki/coverage
ferki Aug 26, 2020
afe12f7
Initial test for dmidecode section getter
ferki Aug 26, 2020
2dacbb0
Fix dmidecode section getter
ferki Aug 26, 2020
d6ce73d
Add initial test for proc inventory
ferki Aug 26, 2020
02a10bd
Fix cpuinfo parsing
ferki Aug 26, 2020
1fd42ce
Merge pull request #1410 from RexOps/inventory
ferki Aug 27, 2020
3f5f30f
Test custom template functions
ferki Aug 27, 2020
540bd5a
Fix registering custom template functions
ferki Aug 27, 2020
3c87437
Move needs registration into a private function
ferki Aug 27, 2020
0197198
Move set handler registration into a private function
ferki Aug 27, 2020
06e0ed5
Move config handler registration into a private function
ferki Aug 27, 2020
5452a39
Add initial config file tests
ferki Aug 27, 2020
db5259e
Fix handling of configuration file settings
ferki Aug 27, 2020
796cd64
Remove dead code
ferki Aug 28, 2020
a646061
Test custom server functions
ferki Aug 28, 2020
f428659
Merge pull request #1414 from RexOps/symbol_coverage
ferki Aug 28, 2020
385d0d3
Add test for OS-specific dependencies
ferki Aug 29, 2020
d8784a0
Install OS-specific dependencies explicitly on Travis CI
ferki Aug 23, 2020
b22da46
Clarify installation of OS-specific dependencies
ferki Aug 29, 2020
ebcf529
Merge pull request #1415 from RexOps/os_dependencies
ferki Aug 29, 2020
1429d19
Update dependencies to latest versions
ferki Aug 23, 2020
4a77126
Remove already required dependencies
ferki Aug 23, 2020
0c48d85
Remove autodetected dependency
ferki Aug 30, 2020
7c975be
List optional features and their dependencies
ferki Aug 30, 2020
8102460
List suggested development dependencies
ferki Aug 30, 2020
5cdf791
Clarify installation steps
ferki Aug 30, 2020
0130c4e
Add contributor
ferki Aug 30, 2020
975b53c
Merge pull request #1417 from RexOps/optional_features
ferki Aug 30, 2020
91faff2
Skip MD5 binary test if there's no binary available
ferki Aug 30, 2020
f749800
Merge pull request #1419 from RexOps/fix_md5_test
ferki Aug 30, 2020
d0e693b
Update pull request template
ferki Aug 30, 2020
ef86105
Test cpuinfo inventory
ferki Aug 31, 2020
690f921
Warn if cpuinfo is unreadable
ferki Aug 31, 2020
f3c8fa6
Merge pull request #1422 from RexOps/fix_proc_inventory
ferki Aug 31, 2020
b2fa563
Add initial file hook tests
ferki Aug 31, 2020
13239f2
Fix file hook options
ferki Aug 31, 2020
3d423e4
Clarify file hook documentation
ferki Aug 31, 2020
a267e05
Merge pull request #1424 from RexOps/file_hooks
ferki Aug 31, 2020
1442e3a
Add file on_change tests for source option
ferki Aug 31, 2020
9dc0440
Fix file on_change hook when source option is used
ferki Aug 31, 2020
df5c3aa
Merge pull request #1426 from RexOps/file_on_change
ferki Aug 31, 2020
86e786b
Refactor environment variable handling
ferki Sep 2, 2020
a1f05d7
Set uniform environment for Debian package commands
ferki Sep 2, 2020
0ae3812
Disable apt-listbugs
ferki Sep 2, 2020
5f57655
Merge pull request #1427 from RexOps/pkg_debian_env
ferki Sep 4, 2020
9924bec
Mark file on_change tests known to fail on Windows
ferki Sep 2, 2020
27b5fbe
Release 1.12.2
ferki Sep 5, 2020
60c9a85
Fix list layout
ferki Sep 12, 2020
2622bfd
Perltidy
ferki Sep 30, 2020
a624f2b
Add test for Rex::Commands::MD5::_binary_md5 function with "strangely…
Ilya33 Sep 14, 2020
e6529c7
Fix _binary_md5 function behavior with "strangely named files", #1429
Ilya33 Sep 14, 2020
dbfffa4
Use a single MD5 testing file
ferki Sep 30, 2020
6079f9a
Fix arguments of temporary testing file
ferki Sep 30, 2020
8f0e4b3
Add comment about test file naming
ferki Sep 30, 2020
eeb24d7
Update changelog
ferki Sep 30, 2020
a339cfd
Merge pull request #1430 from Ilya33/patch-1
ferki Sep 30, 2020
280a30c
Implement "on_no_change" for file
choroba Jul 26, 2020
c4483f6
Implement "on_no_change" for delete_lines_according_to
choroba Jul 26, 2020
542182c
Implement "on_no_change" for _append_or_update
choroba Jul 26, 2020
3ab99ef
Implement "on_no_change" for sed
choroba Jul 26, 2020
321a2cb
Test on_no_change in file.t
choroba Jul 26, 2020
be43aa2
Update ChangeLog with on_no_change
choroba Jul 26, 2020
a40aa33
Perltidy
ferki Sep 30, 2020
27b61f2
Move declaration of default on_no_change action
ferki Sep 30, 2020
e63e615
Fix debug message
ferki Sep 30, 2020
b976595
Update docs about file change hooks
ferki Sep 30, 2020
607df62
Reword changelog entry
ferki Sep 30, 2020
c49ccaa
Merge pull request #1386 from choroba/nochange
ferki Sep 30, 2020
daf0e3f
Fix fallback hostname detection on Linux
ferki Sep 30, 2020
7e01866
Merge pull request #1433 from RexOps/fallback_hostname
ferki Sep 30, 2020
2a5692a
Add progressive perlcritic test
ferki Oct 1, 2020
6f0446f
Remove previously accepted perlcritic violations
ferki Oct 2, 2020
4ea21d8
Enable more perlcritic policies
ferki Oct 1, 2020
2e0280a
Cache perlcritic history in Travis CI
ferki Oct 2, 2020
71609dc
Run author tests first to fail early
ferki Oct 2, 2020
475a9b9
Merge pull request #1435 from RexOps/progressive_critic
ferki Oct 3, 2020
9d6edde
Upgrade Mac OS X image on Travis CI
ferki Oct 2, 2020
80e852f
Check for installed Strawberry Perl on Travis CI
ferki Oct 2, 2020
cb7aee8
Require minimum version of List::MoreUtils
ferki Oct 4, 2020
fde64f1
Merge pull request #1437 from RexOps/list-moreutils
ferki Oct 4, 2020
eddc418
Automatically tag upon release
ferki Oct 4, 2020
fe4c302
Automatically push upon release
ferki Oct 4, 2020
5264c9e
drop! fake releases
ferki Oct 4, 2020
0d8e96b
Release 1.13.0
ferki Oct 4, 2020
ee679ab
Revert "Release 1.13.0"
ferki Oct 4, 2020
54a843a
Revert "drop! fake releases"
ferki Oct 4, 2020
21c628d
Mark trial versions in changelog
ferki Oct 4, 2020
45a5e13
Automatically commit changelog upon release
ferki Oct 4, 2020
1d9ea33
Annotate tags upon release
ferki Oct 4, 2020
c94ac4d
Release 1.13.0
ferki Oct 5, 2020
d242eb3
Refactor MD5 test
ferki Oct 13, 2020
e261e74
Fix MD5 checksumming when multiple perls are available
ferki Oct 12, 2020
a1eec3e
Merge pull request #1442 from RexOps/md5
ferki Oct 13, 2020
02694ec
Fix changelog formatting
ferki Oct 13, 2020
d6e192b
Fix marking trial releases in changelog
ferki Oct 13, 2020
750eb42
Release 1.13.0.1
ferki Oct 13, 2020
2da952f
Fix critic about Modules::RequireVersionVar
ferki Oct 24, 2020
2b873e2
Require minimum perl version explicitly
ferki Oct 24, 2020
5c7a07c
Fix POD syntax for link
ferki Oct 24, 2020
2c7a18e
Criticize all files
ferki Oct 26, 2020
8ecbe82
Add option to reset perlcritic history
ferki Oct 26, 2020
7d27146
Fix test for perlcritic history reset
ferki Oct 26, 2020
0d3d5a8
Add initial CMDB path tests
ferki Oct 24, 2020
52fb978
Make CMDB file list testable
ferki Oct 24, 2020
8b7a9fc
Accept prefix for internal private subroutines
ferki Oct 27, 2020
967f25d
Fix CMDB hostname when Rex is being run locally
ferki Oct 24, 2020
39af20d
Refactor path macro replacement
ferki Oct 26, 2020
b5869a6
Make path macro replacement configurable
ferki Oct 26, 2020
52ef36b
Fix replacing hostname macro in CMDB paths
ferki Oct 26, 2020
034d6d6
Fix host information gathering on Windows
ferki Oct 24, 2020
95c00a2
Fix hostname detection on Windows
ferki Oct 26, 2020
5218d68
Fix CMDB path separators on Windows
ferki Oct 24, 2020
44e98b8
Use OS info for replacing CMDB macros
ferki Oct 26, 2020
5ecb553
Refactor CMDB tests
ferki Oct 10, 2020
372b412
Merge pull request #1445 from RexOps/cmdb_fixes
ferki Oct 28, 2020
d43ab10
Update mailmap
ferki Oct 28, 2020
7453c45
Clarify CMDB documentation
ferki Oct 27, 2020
96fe3dd
Release 1.13.0.2
ferki Oct 28, 2020
cbd96e8
Fix gathering OS version for Cygwin
ferki Oct 29, 2020
41ff745
Merge pull request #1449 from RexOps/cygwin_version
ferki Oct 30, 2020
8c476f6
Fix excessive caching when querying a CMDB item
ferki Oct 29, 2020
86b23f2
Merge pull request #1446 from RexOps/cmdb_cache
ferki Oct 30, 2020
1301fd9
Fix gathering OS version for Windows
ferki Oct 31, 2020
290d27f
Merge pull request #1452 from RexOps/windows_version
ferki Oct 31, 2020
47eb339
Add missing autodie feature
nfg Oct 30, 2020
d6f0965
Fix changelog entry
ferki Oct 31, 2020
3f96d7d
Convert test module to script
ferki Oct 31, 2020
e62c7b6
Fix autodie feature flag docs
ferki Oct 31, 2020
b8e6f0d
Merge pull request #1450 from nfg/add-autodie-feature
ferki Oct 31, 2020
ff88d60
Replace List::MoreUtils with List::Util
ferki Sep 30, 2020
e29c116
Merge pull request #1453 from RexOps/replace_list_moreutils
ferki Oct 31, 2020
391b9b8
Release 1.13.0.3
ferki Oct 31, 2020
2a06fdd
Clarify perlcritic policy
ferki Nov 5, 2020
33bc30b
Release 1.13.1
ferki Nov 5, 2020
1f2704c
Clarify Rex::Template docs
ferki Dec 5, 2020
8cc9d4d
Add initial Rex::Template::NG docs
ferki Dec 5, 2020
6c678de
Clarify templating documentation
ferki Dec 5, 2020
8f25b29
Merge pull request #1457 from RexOps/template_docs
ferki Dec 5, 2020
6766cc8
Fix code formatting
ferki Dec 5, 2020
6b70343
Fix link
ferki Dec 5, 2020
1ff81cb
Release 1.13.2
ferki Dec 5, 2020
9c976e4
Replace Travis CI with GitHub Actions
ferki Jan 22, 2021
6b343b6
Perltidy
ferki Jan 17, 2021
510f545
Remove Travis CI badge
ferki Feb 1, 2021
64b5a41
Clarify contributing guide
ferki Feb 14, 2021
6253117
Update pull request template
ferki Feb 15, 2021
b436afd
Trigger daily CI builds
ferki Feb 26, 2021
2ad3ac4
Remove misleading sudo command variant
ferki Feb 26, 2021
05522b4
Merge pull request #1476 from RexOps/sudo_docs
ferki Feb 26, 2021
237a03d
Include OS version in CI cache key
ferki Mar 3, 2021
fd76172
Fix parsing debconf values containing colons
ferki Mar 3, 2021
19ce26b
Merge pull request #1477 from RexOps/fix_debconf
ferki Mar 3, 2021
281233b
Update changelog
ferki Mar 5, 2021
6b5e90b
Release 1.13.3
ferki Mar 5, 2021
4afdfd3
Update issue template
ferki Mar 13, 2021
f009ab7
fix typo in code example
szabgab Mar 23, 2021
df033ce
Perltidy
ferki Apr 2, 2021
a455ddc
Remove unused tasks array
ferki Jun 10, 2021
a84d917
Merge pull request #1494 from RexOps/remove_unused_symbol
ferki Jun 16, 2021
0c5719b
Clarify contributing guide
ferki Jun 16, 2021
854ad4f
Update support channels
ferki Jun 16, 2021
5d58efd
Annotate CI workflow step
ferki Jun 16, 2021
1dd5f3c
Update perlcritic policies
ferki Jun 16, 2021
a132438
Fix typo
ferki Jun 16, 2021
b86aef1
Fix typo
ferki Jun 19, 2021
fa11474
Merge pull request #1484 from szabgab/patch-1
ferki Jun 19, 2021
02074c2
Add link to support channels
ferki Jun 24, 2021
558aa9a
Use versioned CI cache keys
ferki Jun 29, 2021
0cb5682
Refactor file hook tests
ferki Jun 28, 2021
942a7cd
Test file hooks when source option is used
ferki Jun 28, 2021
1041907
Fix file hooks when source option is used
ferki Jun 28, 2021
57e5249
Merge pull request #1499 from RexOps/file_source_hook
ferki Jul 2, 2021
675fed4
Release 1.13.3.1
ferki Jul 2, 2021
6bd030a
Fix local file copy on Windows
ferki Jul 3, 2021
b2aa898
Merge pull request #1501 from RexOps/copy_windows
ferki Jul 3, 2021
28c25bb
Release 1.13.3.2
ferki Jul 3, 2021
4661016
Add section about Rex core vs extending Rex
ferki Jul 4, 2021
fe121d0
Add common scenarios to contributing guide
ferki Jul 4, 2021
075738f
Merge pull request #1502 from RexOps/common_scenarios
ferki Jul 5, 2021
01c5918
Clarify documentation of run command
ferki Jul 5, 2021
6bb91e9
Clarify documentation of can_run command
ferki Jul 5, 2021
f22f8fe
Merge pull request #1503 from RexOps/run_docs
ferki Jul 5, 2021
be1da29
Fix Rex::Task synopsis
ferki Jul 5, 2021
7ffcf25
Merge pull request #1504 from RexOps/task_synopsis
ferki Jul 5, 2021
cb6d480
Clarify documentation of rex script
ferki Jul 5, 2021
bddb77e
Merge pull request #1505 from RexOps/rex_docs
ferki Jul 5, 2021
805133f
Release 1.13.4
ferki Jul 5, 2021
4f4d649
Test for invalid hostgroup expression
ferki Jul 7, 2021
6f5eae1
Detect invalid hostgroup expressions
ferki Jul 7, 2021
9663d7f
Merge pull request #1506 from ferki/invalid_hostgroup
ferki Jul 8, 2021
137dcab
Perltidy
ferki Oct 30, 2021
c8f9c3e
Revert "Use versioned CI cache keys"
ferki Oct 30, 2021
2e6041f
Install aspell to enable Documentation::PodSpelling
ferki Oct 30, 2021
607c0f3
Use upstream MySQL APT repository in CI
ferki Dec 17, 2021
bd60180
Fix Matrix link
ferki Dec 21, 2021
a730482
Convert issue templates into forms
ferki Dec 21, 2021
677aec6
Configure issue templates
ferki Dec 21, 2021
814a5dc
Fix issue template indent
ferki Dec 24, 2021
e65c276
Split out coverage dependencies in CI
ferki Dec 24, 2021
554f771
Exclude coverage tests in scheduled CI runs
ferki Dec 24, 2021
aa078fd
Update MySQL version in CI
ferki Jan 18, 2022
2ff1977
Add missing YAML header
ferki Apr 16, 2022
b2552b8
Enable manual workflow triggering
ferki Apr 16, 2022
6177178
Upgrade GitHub actions
ferki Apr 16, 2022
795df9f
Rely on pre-installed packages
ferki Apr 16, 2022
e9da189
Remove redundant logging
ferki Apr 16, 2022
9e0695e
Split out coverage tests into separate job
ferki Apr 16, 2022
65eb519
Don't run tests during build job
ferki Apr 16, 2022
9d51448
Split out extra tests into separate job
ferki Apr 16, 2022
1f067a7
Unify test jobs across operating systems
ferki Apr 16, 2022
b9428a0
Simplify build dependency caching
ferki Apr 16, 2022
9d10b3b
Build pushes only for default branch
ferki Apr 16, 2022
58ff86a
Store build results as a tarball
ferki Apr 16, 2022
117b94e
Merge pull request #1524 from RexOps/ci
ferki Jun 8, 2022
ed32416
Add initial commit linting workflow
ferki Jun 8, 2022
8a0f128
Merge pull request #1528 from RexOps/commitlint
ferki Jun 11, 2022
c7e93b9
Enable manual workflow triggering
ferki Jun 17, 2022
daec4d6
Upgrade all CPAN modules during workflows
ferki Jun 17, 2022
19e2bcb
Perltidy
ferki Jun 14, 2022
447b465
Clarify optional arguments of file commands
rwp0 Jun 20, 2022
ddb42ae
Merge pull request #1530 from rwp0/commands-file-pod
ferki Jun 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move set handler registration into a private function
  • Loading branch information
ferki committed Aug 27, 2020
commit 019719876193467c95af5542f09598b669a9949d
54 changes: 29 additions & 25 deletions lib/Rex/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1839,33 +1839,37 @@ __PACKAGE__->register_config_handler(
}
);

my @set_handler =
qw/user password private_key public_key -keyauth -passwordauth -passauth
parallelism sudo_password connection ca cert key distributor
template_function port waitpid_blocking_sleep_time/;
for my $hndl (@set_handler) {
__PACKAGE__->register_set_handler(
$hndl => sub {
my ($val) = @_;
if ( $hndl =~ m/^\-/ ) {
$hndl = substr( $hndl, 1 );
}
if ( $hndl eq "keyauth" ) { $hndl = "key_auth"; $val = 1; }
if ( $hndl eq "passwordauth" || $hndl eq "passauth" ) {
$hndl = "password_auth";
$val = 1;
}
if ( $hndl eq "connection" ) { $hndl = "connection_type"; }
if ( $hndl eq "ca" ) { $hndl = "ca_file"; }
if ( $hndl eq "cert" ) { $hndl = "ca_cert"; }
if ( $hndl eq "key" ) { $hndl = "ca_key"; }
_register_set_handlers();

sub _register_set_handlers {
my @set_handler =
qw/user password private_key public_key -keyauth -passwordauth -passauth
parallelism sudo_password connection ca cert key distributor
template_function port waitpid_blocking_sleep_time/;
for my $hndl (@set_handler) {
__PACKAGE__->register_set_handler(
$hndl => sub {
my ($val) = @_;
if ( $hndl =~ m/^\-/ ) {
$hndl = substr( $hndl, 1 );
}
if ( $hndl eq "keyauth" ) { $hndl = "key_auth"; $val = 1; }
if ( $hndl eq "passwordauth" || $hndl eq "passauth" ) {
$hndl = "password_auth";
$val = 1;
}
if ( $hndl eq "connection" ) { $hndl = "connection_type"; }
if ( $hndl eq "ca" ) { $hndl = "ca_file"; }
if ( $hndl eq "cert" ) { $hndl = "ca_cert"; }
if ( $hndl eq "key" ) { $hndl = "ca_key"; }

my $ref_to_hndl = qualify_to_ref( $hndl, __PACKAGE__ );
my $ref_to_hndl_scalar = *{$ref_to_hndl}{SCALAR};
my $ref_to_hndl = qualify_to_ref( $hndl, __PACKAGE__ );
my $ref_to_hndl_scalar = *{$ref_to_hndl}{SCALAR};

${$ref_to_hndl_scalar} = $val;
}
);
${$ref_to_hndl_scalar} = $val;
}
);
}
}

sub _home_dir {
Expand Down