Ansible::Util::Run
version 0.001
$run = Ansible::Util::Run->new; ( $stdout, $stderr, $exit ) = $run->ansiblePlaybook(playbook => $playbook); $run = Ansible::Util::Run->new( vaultPasswordFiles => ['secret1', 'secret2'] ); ( $stdout, $stderr, $exit ) = $run->ansiblePlaybook(playbook => $playbook);
A thin wrapper around the Ansible CLI tools.
A list of vault-password-files to pass to the command line.
All methods confess on error unless otherwise specified.
Invokes the ansible-playbook command with the specified args.
($stdout, $stderr, $exit) = $run->ansiblePlaybook(playbook => $file, [extraArgs => $aref], [confessOnError => $bool], [wantArrayRefs => $bool]);
An array containing the stdout, stderr, and exit status from the ansible-playbook command.
The name of the playbook file.
Any additional args you want to pass to the command line.
If the command exits with an error, the call will simply confess with the output from stderr.
The stdout and stderr are returned as array refs split across newlines.
To install Ansible::Util, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ansible::Util
CPAN shell
perl -MCPAN -e shell install Ansible::Util
For more information on module installation, please visit the detailed CPAN module installation guide.