go-ansible
go-ansible copied to clipboard
Set -v (VerboseV) not working
I try to enable -v arg, but it not work, the command always missing -v args. Below is the command output:
ansible-playbook --extra-vars @/home/cloud.terpusat.com/my-variable.json --inventory /home/cloud.terpusat.com/my-inventory.json --tags golang --connection ssh --private-key /cloud.terpusat.com/my-key --user root --become-method sudo cloud.terpusat.com/my-playbook.yml
but when use Verbose, the output will always use -vvvv args, which is not what I want:
ansible-playbook --extra-vars @/home/cloud.terpusat.com/my-variable.json --inventory /home/cloud.terpusat.com/my-inventory.json --tags golang -vvvv --connection ssh --private-key /cloud.terpusat.com/my-key --user root --become-method sudo cloud.terpusat.com/my-playbook.yml
any trick on this, how to use -v / -vv arg ?
Hi @prakasa1904 ! Thanks for opening this issue!
Indeed, the String method in AnsiblePlaybookOptions does not cover all verbosity levels, and I will fix this. In the meantime, when generating the command options, setting the VerboseV attribute should correctly include the -v flag.
I keep you updated! Thanks!
Hi @prakasa1904!
Version v2.0.1 solves the issue with the String method, which returned the verbose flags incorrectly. However, as I mentioned, when go-ansible executes a command, it uses the GenerateCommandOptions method, instead, and the issue is not present there.
Will you need further help with this?
I will close this issue as no further assistance is required.