Ansible-Util
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Ansible/Util/Vars.pm view on Meta::CPAN
package Ansible::Util::Vars;
$Ansible::Util::Vars::VERSION = '0.001';
=head1 NAME
Ansible::Util::Vars
=head1 VERSION
version 0.001
=head1 SYNOPSIS
$vars = Ansible::Util::Vars->new;
$href = $vars->getVar('foo');
$href = $vars->getVars(['foo', 'bar']);
$val = $vars->getValue('foo');
=head1 DESCRIPTION
Read Ansible runtime vars into native Perl.
To indicate which vars to read, you use the variable dot notation similar to
what is described in the Ansible documentation. Further information about the
Perl implementation can be found in L<Hash::DotPath>.
An optional cache layer is used to speed up multiple invocations.
=cut
use Modern::Perl;
use Moose;
use namespace::autoclean;
use Kavorka 'method';
use Data::Printer alias => 'pdump';
use File::Temp 'tempfile', 'tempdir';
use Hash::DotPath;
use JSON;
use YAML ();
use Ansible::Util::Run;
with 'Ansible::Util::Roles::Constants';
##############################################################################
# PUBLIC ATTRIBUTES
##############################################################################
=head1 ATTRIBUTES
=head2 vaultPasswordFiles
A list of vault-password-files to pass to the command line.
=over
=item type: ArrayRef[Str]
=item required: no
=back
=cut
with
'Ansible::Util::Roles::Attr::VaultPasswordFiles',
'Util::Medley::Roles::Attributes::Cache',
'Util::Medley::Roles::Attributes::Logger',
'Util::Medley::Roles::Attributes::File';
=head2 cacheEnabled
Toggle to disable/enable caching.
=over
=item type: Bool
=item required: no
=item default: 1
=back
=cut
has cacheEnabled => (
is => 'rw',
isa => 'Bool',
default => 1,
writer => '_setCacheEnabled',
);
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.600 second using v1.00-cache-2.02-grep-82fe00e-cpan-cec75d87357c )