Move Ansible configuration to Work-specific files
This commit is contained in:
parent
4a5f426428
commit
c9df765b19
1 changed files with 2 additions and 17 deletions
|
@ -191,34 +191,19 @@ Using the [[https://github.com/seagle0128/doom-modeline][Doom Modeline]] to add
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Languages
|
* Languages
|
||||||
Simple to configure languages go here. More advanced stuff will go in their own files...eventually.
|
Simple to configure languages go here. More advanced stuff will go in their own files...eventually.
|
||||||
** YAML/Ansible/Jinja
|
** YAML and Jinja
|
||||||
Doing a lot of [[https://github.com/yoshiki/yaml-mode][YAML work]], but this project needs a new maintainer.
|
Doing a lot of [[https://github.com/yoshiki/yaml-mode][YAML work]], but this project needs a new maintainer.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package yaml-mode
|
(use-package yaml-mode
|
||||||
:mode "\\.ya?ml\\'")
|
:mode "\\.ya?ml\\'")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Ansible uses Jinja, so we install the [[https://github.com/paradoxxxzero/jinja2-mode][jinja2-mode]]:
|
Ansible uses Jinja, so we install the [[https://github.com/paradoxxxzero/jinja2-mode][jinja2-mode]]:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package jinja2-mode
|
(use-package jinja2-mode
|
||||||
:mode (rx ".j2" eol))
|
:mode (rx ".j2" eol))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
And, finally, we install [[https://github.com/k1LoW/emacs-ansible][Ansible]] as well:
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package ansible
|
|
||||||
:init
|
|
||||||
(setq ansible-vault-password-file "~/work/5/wpc5/deploy/playbooks/.vault-password")
|
|
||||||
:config
|
|
||||||
(add-hook 'yaml-mode-hook '(lambda () (ansible 1))))
|
|
||||||
#+END_SRC
|
|
||||||
And some special keybindings to encrypt/decrypt files:
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(ha-prog-leader
|
|
||||||
"x" '(:ignore t :which-key "decryption")
|
|
||||||
"x d" '("decrypt buffer" . ansible-decrypt-buffer)
|
|
||||||
"x e" '("encrypt buffer" . ansible-encrypt-buffer))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Emacs Lisp
|
** Emacs Lisp
|
||||||
|
|
||||||
Why yes, I do find I code a lot in Emacs...
|
Why yes, I do find I code a lot in Emacs...
|
||||||
|
|
Loading…
Reference in a new issue