Giter Club home page Giter Club logo

Comments (5)

diLLec avatar diLLec commented on August 22, 2024 1

As noted in the summary, I've tracked the problem to the following line in lib\ansible\plugins\connection\httpapi.py:241

self.httpapi.login(self.get_option('remote_user'), self.get_option('password'))

The get_options originates in lib/ansible/plugins/__init__.py. Putting the following there, will show that in the "EXPECTED RESULTS" case the decrypted password is returned (...'password': 'test',...)and in the "ACTUAL RESULTS" the vault dict is returned ('password': {'__ansible_vault': '$ANSIBLE_VAULT;1....)

        import traceback
        if option == 'password':
            raise Exception("%s -- %s" % (self._options, traceback.format_stack()))

From the other connection plugins, I've already seen that self._play_context is used. I've replace the line with

            self.httpapi.login(self._play_context.remote_user, self._play_context.password)

which worked. As I don't know the side effects of this, please review :-).

from ansible.netcommon.

yarokifor avatar yarokifor commented on August 22, 2024

I could be wrong, but the issue looks like it is in module_utils/connection.py on line 142:

data = json.dumps(req, cls=AnsibleJSONEncoder)

Should vault_to_text=true argument be passed in here?

from ansible.netcommon.

yarokifor avatar yarokifor commented on August 22, 2024

Looks like there's already an issue with ansible.

ansible/ansible#75503

from ansible.netcommon.

gmuloc avatar gmuloc commented on August 22, 2024

indeed - should have been fixed by: ansible/ansible#78236

from ansible.netcommon.

KB-perByte avatar KB-perByte commented on August 22, 2024

Closing it off, as the issue is already fixed in ansible/ansible#78236
Regards

from ansible.netcommon.

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.