Development of this package has moved to GitLab.
k1low / emacs-ansible Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v2.0
License: GNU General Public License v2.0
Development of this package has moved to GitLab.
ansible-mode
claims that ansible-related snippets are text-mode
snippets. A ton of non-programming modes (such as html-mode) derive from text-mode
. So ansible-related completions show up in completely non-ansible-related modes. These snippets should only show up in ansible mode.
Hello,
Is this repo still maintained? There has been no update for 2 years. I'm not criticizing, just asking.
Do you accept potential new maintainers?
This will remove the need to hardcode completions and update on every version.
ec2_instance_facts replaces ec2_remote_facts
.
Most likely I'm not the only one confused by the (C++ namespace like) naming used in the codebase. See
https://github.com/bbatsov/emacs-lisp-style-guide#naming
When loading ansible.el 0.3.2 from Emacs 28.1, it complains:
ansible.el: Warning: 'loop' is an obsolete alias (as of 27.1); use 'cl-loop' instead.
The version of this mode provided by MELPA Stable is now over three years old. MELPA Stable only packages versions that are tagged in Git. Are there any plans to tag a newer release?
Would it be possible to configure the mode to request vault pass when trying to decrypt a file?
If its not already supported, I can help to add this support. Please point me where to look (am n00b in both emacs-lisp and ansible) but happy to help!
Arguably, when an encrypted file is visited and is decrypted, it's not really modified. Only when it's actually edited should it be marked modified.
When turning on ansible
mode, the buffer doesn't automatically recolor based on the mode's fontification rules.
Workaround: Go to beginning of buffer, add a character then remove it, forcing a refontification.
I assume this traces down to a missing call to some well-known "refontify" method of Emacs, but don't have the ELisp-fu to prove it.
I would love to be pointed to the adequate method so I can create a PR.
Dear emacs-ansible maintainer,
Thank you for your work on this software! Would you please add a LICENSE/COPYING and then tag a stable release? For your convenience, here is a URL you can get a plain-text copy from: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
I plan on packaging your work for Debian :-)
Regards,
Nicholas
this is a valid site.yml that looks kinda borked with ansible-mode:
- hosts: default
gather_facts: no
strategy: free
roles: [ deploy ]
gather_facts
and strategy
cannot be used in roles, so they should be included to ansible::section-keywords-regex
P.S. same applies to connection
keyword:
- hosts: db
connection: local
gather_facts: no
roles:
- deploy-db
Is there a plan to support ansible-lint by writing a checker for flycheck or the Emacs built in Flymake?
Though there is a flycheck-yamllint which uses yamllint to check YAML files. It is much better to have ansible-lint when writing ansible files.
Due to a bug in Ansible under Python 3, ansible-vault
fails to run when given the --vault-password-file
parameter. I find the auto-decrypt-encrypt
functionality very convenient, but given this Ansible bug it only decrypts; it never encrypts again. This is slightly dangerous, as you can imagine.
A workaround while waiting for the Ansible bug to be fixed is to remove the --vault-password-file
argument from the command string in ansible.el:335
. However, this could be done more generally: if ansible-vault-password-file
is nil, there's no reason to supply that argument at all to the command, and let Ansible try to figure it all out through the environment.
The way I've phrased it makes it sound like it's only good for working around a highly specific Ansible bug, but the reason I propose it is because it sounds like something that might make sense generally as well.
If this is acceptable, I can submit a PR.
Emacs 29.1
Bisected this behavior, where ansible package broke "output parsing" of compilation buffer output parsing for rust.
Ansible modifies/sets the following variable in "some way" that is breaks compilation parsing for other languages:
compilation-error-regexp-alist-alist is a variable defined in ‘compile.el’.
Its value is shown below.
Alist of values for ‘compilation-error-regexp-alist’.
Value:
((ansible "^\\(.*?\\):\\([0-9]+\\)" 1 2) << Culprit
(use-package ansible
:init
(add-hook 'yaml-mode-hook '(lambda () (ansible 1))))
(use-package company-ansible)
https://github.com/k1LoW/emacs-ansible/blob/master/ansible.el#L133-L135
;;;###autoload
(eval-after-load 'yasnippet
'(ansible::snippets-initialize))
The following line doesn't allow finer customization, instead it always loads the ansible snippets even if the user is not in a ansible minor mode. Is it possible to remove those lines so if yasnippet-global-mode is disabled and only loaded selectively per major mode then the ansible snippets won't be autoloaded with them?
Hello
I am using https://github.com/ansible/ansible/blob/devel/contrib/vault/vault-keyring.py
thanks to ANSIBLE_VAULT_PASSWORD_FILE
environment variable, but there are many other means to trigger it.
Instead of storing vault password in clear on disk, it is now requested from system keyring.
May you please adapt ansible::vault-password-file
support so that it allows script execution, the same way ansible-vault
does ?
Thank you in advance
Regards
Yves Martin
In my local emacs dotfiles I have added some functions & hooks to:
Would you be interested in adding such functionality? If so, I would gladly issue a PR.
Thank you for the great work ;)
If company-mode
is enabled, https://github.com/k1LoW/emacs-ansible/blob/master/ansible.el#L140 will result in an error since ac-user-dictionary-files
is not enabled. Would it be possible to add to company-mode's autocomplete if it's enabled?
When loading ansible.el 0.3.2 from Emacs 28.1, it complains:
ansible.el: Warning: 'return' is an obsolete alias (as of 27.1); use 'cl-return' instead.
Line 276 in d89ac0e
is there a specific reason this is defined as ansible
rather than ansible-mode
?
adding the -mode
suffix enables it to be used by other modes that assume standard naming (for example ansbile src blocks in org-mode via ob-ansible)
When loading ansible.el 0.3.2 from Emacs 28.1, it complains:
ansible.el: Warning: 'incf' is an obsolete alias (as of 27.1); use 'cl-incf' instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.