Comments (12)
Ok, I've tested out a patch against python 2.7.x / ansible 2.9.x, python 3.6.9 / ansible 2.10.10, and python 3.6.9 / ansible 2.11.1. I'll put together a PR, etc... It might take a day or two for me to push out the new revision.
from atom-autocomplete-ansible.
The PR above resolved this for me.
% ansible-playbook --version
ansible-playbook [core 2.11.6]
config file = None
configured module search path = ['/Users/wrowe/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/4.7.0_1/libexec/lib/python3.10/site-packages/ansible
ansible collection location = /Users/wrowe/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible-playbook
python version = 3.10.0 (default, Oct 13 2021, 06:45:00) [Clang 13.0.0 (clang-1300.0.29.3)]
jinja version = 3.0.2
libyaml = True
Command failed: "/usr/local/Cellar/ansible/4.7.0_1/libexec/bin/python" "/Users/wrowe/.atom/packages/autocomplete-ansible/libs/parse_ansible.py"
Traceback (most recent call last):
File "/Users/wrowe/.atom/packages/autocomplete-ansible/libs/parse_ansible.py", line 20, in <module>
BLACKLIST_MODULES = plugin_docs.BLACKLIST['MODULE']
AttributeError: module 'ansible.utils.plugin_docs' has no attribute 'BLACKLIST'
try:
from ansible.plugins.loader import lookup_loader, module_loader
from ansible.utils import plugin_docs
use_old_loader = False
BLACKLIST_MODULES = plugin_docs.BLACKLIST['MODULE']
except ImportError:
from ansible.plugins import lookup_loader, module_loader
from ansible.utils import module_docs as plugin_docs
use_old_loader = True
BLACKLIST_MODULES = plugin_docs.BLACKLIST_MODULES
from atom-autocomplete-ansible.
i have the same issue
from atom-autocomplete-ansible.
Same here. I think it is now called REJECTLIST.
https://docs.ansible.com/ansible/latest/user_guide/plugin_filtering_config.html
from atom-autocomplete-ansible.
@k0ste @z-deniz & @gunman808
What version(s) of Ansible & Python are the three of you using?
from atom-autocomplete-ansible.
√ ~ % ansible --version
ansible [core 2.11.0]
config file = None
configured module search path = ['/Users/k0ste/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/4.0.0/libexec/lib/python3.9/site-packages/ansible
ansible collection location = /Users/k0ste/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.9.5 (default, May 4 2021, 03:36:27) [Clang 12.0.0 (clang-1200.0.32.29)]
jinja version = 3.0.1
libyaml = True
from atom-autocomplete-ansible.
Looks like ansible/ansible#70028 swapped out the lists one-for-one. Once I've figured out how to test for it a change shouldn't be that complicated.
from atom-autocomplete-ansible.
For those willing to apply the change manually, see the linked PR... As the CI for this repo has broken again I cannot currently merge anything.
from atom-autocomplete-ansible.
Tried the patch : excellent. Thank you :)
from atom-autocomplete-ansible.
I applied the patch but was still having some issues about a missing key 'module_blacklist'.
I ended up with the following line in my ~/.ansible.cfg file:
PLUGIN_FILTERS_CFG = /etc/ansible/filter_plugins.yml
And the following in the /etc/ansible/filter_plugins.yml file:
---
filter_version: '1.0'
module_rejectlist:
module_blacklist:
from atom-autocomplete-ansible.
I hope that's helps, the plugin_docs.BLACKLIST['MODULE'] has changed to plugin_docs.REJECTLIST['MODULE'].
And i set 'from ansible.plugin_docs import *'
try:
from ansible.plugins.loader import lookup_loader, module_loader
# from ansible.utils import plugin_docs
from ansible.plugin_docs import *
use_old_loader = False
BLACKLIST_MODULES = plugin_docs.REJECTLIST['MODULE']
# BLACKLIST_MODULES = plugin_docs.BLACKLIST['MODULE']
except ImportError:
from ansible.plugins import lookup_loader, module_loader
from ansible.utils import module_docs as plugin_docs
use_old_loader = False
BLACKLIST_MODULES = plugin_docs.BLACKLIST_MODULE
from atom-autocomplete-ansible.
As Atom is discontinued this extension is also, alas I don't have the access needed to mark it as such.
from atom-autocomplete-ansible.
Related Issues (20)
- please add ansible-advanced grammar HOT 1
- parse_ansible.py failed "The lookup aws_account_attribute requires boto3 and botocore" HOT 3
- Failed on ansible 2.5 HOT 5
- autocomplete-ansible unable to import ansible HOT 10
- Failed to activate the autocomplete-ansible package HOT 2
- Ansible does not auto complete modules HOT 4
- Add ci for newer versions of python and ansible.
- autocomplete failed on mac OS X 10.11.4 HOT 1
- Getting `stdout maxBuffer length exceeded` HOT 1
- ValueError: A non-empty list for args is required HOT 16
- autocomplete-ansible give error traceback, when ansible installed with pip HOT 2
- TypeError: on line 44, in parse_ansible.py after upgrading ansible HOT 13
- autocomplete fails to load. HOT 5
- REFACTOR to make ongoing Ansible Version Support easier; WAS: {Add support for Ansible >=2.10.x} HOT 5
- does not work on windows HOT 7
- Does not find ansible installed by brew on macOS HOT 20
- option to reduce comments HOT 1
- Travis migration
- Sorry for being dumb but how do you get do that secod auto fill bit? HOT 1
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 atom-autocomplete-ansible.