AnsibleModule
view release on metacpan or search on metacpan
script/ansible-perl view on Meta::CPAN
my $fp=App::FatPacker->new;
my @modules = split /\r?\n/, $fp->trace(args => [$ENV{ANSIBLE_MODULE}]);
push @modules,'AnsibleModule.pm';
my @packlists = $fp->packlists_containing(\@modules);
my $base = catdir(cwd, 'fatlib');
$fp->packlists_to_tree($base, \@packlists);
my $code=$fp->fatpack_file($ENV{ANSIBLE_MODULE});
$ENV{ANSIBLE_MODULE}=$ENV{ANSIBLE_MODULE}.'.packed';
spurt $code, $ENV{ANSIBLE_MODULE};
chmod 0755, $ENV{ANSIBLE_MODULE};
print "Wrote $ENV{ANSIBLE_MODULE}\n";
exit 0;
}
$ENV{ANSIBLE_ARGS} ||="{}";
my $t=Test::AnsibleModule->new;
my $res=$t->exec_module($ENV{ANSIBLE_MODULE},decode_json($ENV{ANSIBLE_ARGS}));
( run in 0.377 second using v1.01-cache-2.11-cpan-496ff517765 )