Code Monkey home page Code Monkey logo

emacs-ansible's Introduction

Ansible minor mode

Development of this package has moved to GitLab.

emacs-ansible's People

Contributors

apiology avatar chillum avatar davdunc avatar fredericgiquel avatar juergenhoetzel avatar k1low avatar lucianocavalheiro avatar mavit avatar perdu avatar pwojnowski avatar rranelli avatar seanfarley avatar signalpillar avatar syl20bnr avatar vamega avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

emacs-ansible's Issues

Prompt password for vault?

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!

Ansible snippets show up all text-mode-derived modes

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.

autoload yasnippet snippets

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?

ansible::section-keywords-regex should include gather_facts and strategy

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

BREAKS !!! compilation mode regex parsing for other programming languages.

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)

Support for vault-keyring script execution

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

No recent tagged release

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?

Still maintained ?

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?

Buffer not fontified automatically on ansible mode enter

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.

Automatic {de,en}crypt

In my local emacs dotfiles I have added some functions & hooks to:

  • automatically decrypt ansible vault files when opening a vault file
  • encrypting the file prior to save

Would you be interested in adding such functionality? If so, I would gladly issue a PR.

Thank you for the great work ;)

Change URL to point to this repo

When looking for info on this mode from within Emacs the current URL isn't very helping:
screenshot from 2017-12-07 11-51-28

Solution: use this repository url instead,

Skip --vault-password-file when ansible-vault-password-file is nil

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.

mode naming

(define-minor-mode ansible

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)

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.