Giter Club home page Giter Club logo

Comments (6)

prakasa1904 avatar prakasa1904 commented on May 28, 2024 1

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.

apenella avatar apenella commented on May 28, 2024

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.

Yang-yyf avatar Yang-yyf commented on May 28, 2024

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

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.

apenella avatar apenella commented on May 28, 2024

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.

Yang-yyf avatar Yang-yyf commented on May 28, 2024

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.

apenella avatar apenella commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.