-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I run the example "ansibleplaybook-walk-through-json-output" #114
Comments
HI @Yang-yyf I executed the example as it comes in the repository, and it works for me ❯ go run ansibleplaybook-walk-through-json-output.go
[127.0.0.1] that is just an example
[127.0.0.1] that is another example I think that I would need more details, in order to help you. I tested it using the go-ansible's master branch, the ansible-core's version that I am using is 2.13.6 and the ansible version is 6.6.0. ❯ ansible --version
ansible [core 2.13.6]
config file = ***
configured module search path = ***
ansible python module location = ***
ansible collection location = ***
executable location = ***
python version = 3.10.6 (main, Nov 2 2022, 18:53:38) [GCC 11.3.0]
jinja version = 3.1.2
libyaml = True |
I do run the command like go run ansibleplaybook-walk-through-json-output.go, and I got this : I check the version of my ansible,It seems like this: |
Hi! ❯ ANSIBLE_STDOUT_CALLBACK=json ansible-playbook -i 127.0.0.1, -c local site1.yml site2.yml I saw that you are using |
Hi, Thanks for your help. |
Good to know that we figured out why it does not work! |
Hi, sorry to add issue here. I have some problem here but it only happen in ansible [core 2.13.6]
config file = ***
configured module search path = ['***', '***']
ansible python module location = /root/.local/lib/python3.10/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /root/.local/bin/ansible
python version = 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
jinja version = 3.1.2
libyaml = True But it works when I running it in the docker host ansible [core 2.13.6]
config file = ***
configured module search path = ['***', '***']
ansible python module location = /opt/homebrew/Cellar/ansible/6.6.0/libexec/lib/python3.11/site-packages/ansible
ansible collection location = ***
executable location = /opt/homebrew/bin/ansible
python version = 3.11.0 (main, Oct 25 2022, 13:57:33) [Clang 14.0.0 (clang-1400.0.29.202)]
jinja version = 3.1.2
libyaml = True SOLVED - Forget it, if you guys found same issue please install missing dependency when using docker as ansible executor. |
When I run the example ansibleplaybook-walk-through-json-output.go, I met this err:
ERROR! Invalid callback for stdout specified: json
Error during command execution: ansible-playbook error: general error
What should I do?
The text was updated successfully, but these errors were encountered: