Comments (5)
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.
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.
Looks like there's already an issue with ansible.
from ansible.netcommon.
indeed - should have been fixed by: ansible/ansible#78236
from ansible.netcommon.
Closing it off, as the issue is already fixed in ansible/ansible#78236
Regards
from ansible.netcommon.
Related Issues (20)
- Broadcast messages cause cli_command to timeout. HOT 2
- ansible-lint CI dependency is broken HOT 1
- Integrating Commit Comment Support for Nokia SROS Devices in Ansible's netcommon Module HOT 4
- Add in diff on resource_module for result
- `result` keyword usage in Conditional class in parsing.py
- ansible.netcommon.netconf_config delete not working and missing example in documentation HOT 1
- Ansible Connection gets stuck when using VS Code Debugger HOT 3
- ansible.netcommon.cli_command module should consider the task successful if launched command succeed to execute even though the output includes error keyword. HOT 1
- Ansible copying Cisco Bin File locally/remotely at the same time HOT 4
- Config failure when non-unique iosxr configuration lines are uploaded.
- "Unmarshallable object" exception while used with dynamic inventories
- Add CR line ending support to telnet
- Saving config to startup should always be from running configuration.
- socket path does not exist or cannot be found HOT 4
- Typo in Documentation for telnet module parameters
- Merged #635 Causing Downstream issue in Collection cisco.ios HOT 5
- Variables inventory_hostname, remote_user don't contain the correct value HOT 6
- Add support to prettify xml with netconf_config before making diff HOT 1
- File "/tmp/ansible_fortios_monitor_fact_payload_v68501bf/ansible_fortios_monitor_fact_payload.zip/ansible/module_utils/connection.py", line 199, in __rpc__ ansible.module_utils.connection.ConnectionError: Requested entry (plugin_type: connection plugin: ansible_collections.ansible.netcommon.plugins.connection.httpapi setting: access_token ) was not defined in configuration.
- Ansible-libssh unable to use βbecomeβ
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 ansible.netcommon.