---

- hosts: '{{ ip_addr }}'
  become: yes
  become_method: sudo
  gather_facts: yes

  tasks:

    - name: "[CONFIG VIM OPTIONS] Comprobando si es necesario configurar vim options"
      debug:
        msg: "No es necesario configurar vim options en la máquina"
      when: vim_options_enabled is not defined or not vim_options_enabled

    - name: "[CONFIG VIM OPTIONS] Config vim options"
      import_role:
        name: config-vim-options
      when: vim_options_enabled is defined and vim_options_enabled