playbook and rol config vim options

This commit is contained in:
Ruben Blanco 2024-02-12 10:49:16 +01:00
parent 519cacbbb5
commit d86a48de25
3 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,12 @@
---
- hosts: '{{ ip_addr }}'
become: yes
become_method: sudo
gather_facts: yes
tasks:
- name: "[CONFIG VIM OPTIONS] Config vim options"
import_role:
name: config-vim-options

View File

@ -0,0 +1,21 @@
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Enable VIM options
# step1 - create file vimrc.local
- name: create file vimrc.local
file:
path: "{{ path_vimrclocal }}"
state: touch
mode: '0644'
# step2 - add some options to the file
- name: add some options to vimrc.local
lineinfile:
path: "{{ path_vimrclocal }}"
line: "{{item.line}}"
state: present
with_items:
- line: syntax on
- line: set showcmd
- line: set showmatch
- line: set ignorecase
- line: set smartcase
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

View File

@ -0,0 +1,2 @@
---
path_vimrclocal: /etc/vim/vimrc.local