Git Product home page Git Product logo

Comments (5)

ujenmr avatar ujenmr commented on September 25, 2024

Hi,

Your problem is full-text search by ansible_result?
If yes, you can use template (file call ansible.template) for ElasticSearch 5

from ansible-logstash-callback.

dsever avatar dsever commented on September 25, 2024

Thanks,
Will try it .

from ansible-logstash-callback.

ujenmr avatar ujenmr commented on September 25, 2024

Also try to use the new version (updated yesterday)

from ansible-logstash-callback.

dsever avatar dsever commented on September 25, 2024

Hi,

Actually I'm trying to avoid full text search, because I have situation that my ansible module return multiple results like:
{"changed": false, "debug": "", "msg": "Testiranje sigurnosnih postavki operacijskog sustava", "results": [{"login_encrypt_method": {"msg": "Zadovoljavajuci algoritam sazimanja sha512", "status": "true"}}], "stderr": null, "stdout": " password hashing algorithm is sha512\n", "stdout_lines": [" password hashing algorithm is sha512"]}
And that is saved like ansible_result, what I'm trying to accomplish, is ability to create search by specific filed in json tree.
For example I'm trying to pull all hosts that have status "true", so using lucene queries it is:
ansible_result.result.login_encrypt_method:true

And it will provides me all hosts that had true on ansible run.

As I mention before if if using json_dump, that all nested fields in ansible_results are interpreted as part of string of ansible_result, and not like field. (correct me if I'm wrong)

Not sure eventually ansible_result could be nested.

Dubravko

from ansible-logstash-callback.

goldyfruit avatar goldyfruit commented on September 25, 2024

@dsever Have you been able to retrieve data from ansible_result as JSON?

from ansible-logstash-callback.

Related Issues (13)

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.