NAME
Ansible::Util::Run
VERSION
version 0.001
SYNOPSIS
$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);
DESCRIPTION
A thin wrapper around the Ansible CLI tools.
ATTRIBUTES
vaultPasswordFiles
A list of vault-password-files to pass to the command line.
METHODS
All methods confess on error unless otherwise specified.
ansiblePlaybook()
Invokes the ansible-playbook command with the specified args.
usage:
($stdout, $stderr, $exit) =
$run->ansiblePlaybook(playbook => $file,
[extraArgs => $aref],
[confessOnError => $bool],
[wantArrayRefs => $bool]);
returns:
An array containing the stdout, stderr, and exit status from the ansible-playbook command.
args:
- extraArgs
-
Any additional args you want to pass to the command line.
- confessOnError
-
If the command exits with an error, the call will simply confess with the output from stderr.