Comments (6)
Hi, sorry to add issue here. I have some problem here but it only happen in docker Ubuntu 22.04
somehow. With detail ansible below:
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 MacOS
with ansible detail below. Can you give me advice about this issue @apenella . Thanks!
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.
from go-ansible.
HI @Yang-yyf
Thanks for your message.
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.
Could you provide me a snippet from the output? Are you running the example as it is?
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
from go-ansible.
HI @Yang-yyf Thanks for your message.
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 exampleI think that I would need more details, in order to help you. Could you provide me a snippet from the output? Are you running the example as it is?
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 :
ERROR! Invalid callback for stdout specified: json
Error during command execution: ansible-playbook error: general error
I check the version of my ansible,It seems like this:
ansible [core 2.15.0.dev0]
config file = None
configured module search path = ['/Users/admin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/homebrew/lib/python3.10/site-packages/ansible_core-2.15.0.dev0-py3.10.egg/ansible
ansible collection location = /Users/admin/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/homebrew/bin/ansible
python version = 3.10.7 (main, Sep 14 2022, 22:38:23) [Clang 14.0.0 (clang-1400.0.29.102)] (/opt/homebrew/opt/[email protected]/bin/python3.10)
jinja version = 3.1.2
libyaml = True
from go-ansible.
Hi!
Since go-ansible is just an ansible wrapper to execute it through Golang, would you mind executing it directly with Ansible?
❯ ANSIBLE_STDOUT_CALLBACK=json ansible-playbook -i 127.0.0.1, -c local site1.yml site2.yml
I saw that you are using ansible-core 2.15.0.dev0
, which is not a stable release and I don't know how it could influence the results you received.
from go-ansible.
Hi, Thanks for your help.
It seems that my ansible-core was not a stable release version, because when I run the command directly, ansible returns me the same error. I will change ansible's version.
Thank you!
from go-ansible.
Good to know that we figured out why it does not work!
Thank you!
I am going to close the issue!
from go-ansible.
Related Issues (20)
- Extra vars issue in playbooks HOT 2
- Feature Request: GO:Embed HOT 12
- real time output HOT 5
- Generate vaulted extra-vars
- Change the Executor signature to 'Execute(ctx context.Context, command []string, options ...ExecuteOptions)' HOT 1
- Ansible Configuration Support HOT 6
- SSH StrictHostKeyChecking HOT 3
- [Question] Can we use alias for inventory? HOT 3
- execute.WithEnvVar is not working HOT 4
- Suggestion for a Feature to Execute Inventory-Related Commands HOT 3
- Implementing support for `go-embed-python` HOT 9
- Example for winrm connection configuration HOT 2
- Many ssh <defunct> then using library. HOT 5
- How to properly provide multiple ssh extra args HOT 3
- cannot use go get v2 HOT 3
- Can I embed playbook and inventory file to binary after build HOT 4
- extra vars not being set HOT 6
- Error decoding results stdout_lines HOT 3
- Unable to see prompt text HOT 1
- Inquiry about Referencing Executed Processes in DefaultExecute Object HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-ansible.