2022-12-19 22:27:26 +00:00
|
|
|
- name: Download Neovim PPA signing key
|
|
|
|
become: true
|
2023-01-19 23:16:35 +00:00
|
|
|
apt_key:
|
2022-12-19 22:27:26 +00:00
|
|
|
keyserver: keyserver.ubuntu.com
|
|
|
|
id: 9DBB0BE9366964F134855E2255F96FCF8231B6DD
|
2023-02-26 00:17:16 +00:00
|
|
|
keyring: /etc/apt/trusted.gpg.d/neovim.gpg
|
2022-12-18 12:03:12 +00:00
|
|
|
- name: Install Neovim PPA
|
2022-12-02 19:10:38 +00:00
|
|
|
become: true
|
2022-12-18 12:03:12 +00:00
|
|
|
apt_repository:
|
2023-02-26 00:17:16 +00:00
|
|
|
repo: "deb [signed-by=/etc/apt/trusted.gpg.d/neovim.gpg] https://ppa.launchpadcontent.net/neovim-ppa/unstable/ubuntu {{ distribution_release }} main"
|
2022-12-20 16:20:36 +00:00
|
|
|
register: apt_repository
|
|
|
|
- name: Update APT cache
|
2022-12-20 17:31:17 +00:00
|
|
|
become: true
|
2022-12-20 16:20:36 +00:00
|
|
|
apt:
|
|
|
|
update_cache: true
|
|
|
|
when: apt_repository.changed
|
2022-12-18 12:03:12 +00:00
|
|
|
- name: Install Neovim
|
2022-12-02 19:10:38 +00:00
|
|
|
become: true
|
2022-12-18 12:03:12 +00:00
|
|
|
apt:
|
|
|
|
name: neovim
|
2023-02-11 19:00:38 +00:00
|
|
|
- name: Create configuration directory
|
|
|
|
file:
|
|
|
|
path: ~/.config/nvim
|
|
|
|
state: directory
|
2023-01-19 23:16:35 +00:00
|
|
|
- name: Copy init.lua
|
|
|
|
copy:
|
|
|
|
src: "{{ role_path }}/files/init.lua"
|
|
|
|
dest: ~/.config/nvim/init.lua
|
2023-01-20 15:58:46 +00:00
|
|
|
- name: Create plugin directory
|
|
|
|
file:
|
|
|
|
path: ~/.config/nvim/plugin
|
|
|
|
state: directory
|
|
|
|
recurse: true
|
|
|
|
- name: Copy plugin configuration files
|
|
|
|
copy:
|
|
|
|
src: "{{ role_path }}/files/plugin/"
|
|
|
|
dest: ~/.config/nvim/plugin
|
|
|
|
- name: Create lua directory
|
|
|
|
file:
|
|
|
|
path: ~/.config/nvim/lua
|
|
|
|
state: directory
|
|
|
|
recurse: true
|
|
|
|
- name: Copy lua files
|
|
|
|
copy:
|
|
|
|
src: "{{ role_path }}/files/lua/"
|
|
|
|
dest: ~/.config/nvim/lua
|
2023-01-20 21:18:32 +00:00
|
|
|
- name: Install python-lsp-server
|
|
|
|
pip:
|
|
|
|
name:
|
|
|
|
- "python-lsp-server[all]"
|
2023-02-13 12:47:25 +00:00
|
|
|
- name: Clone packer repository
|
|
|
|
git:
|
|
|
|
repo: https://github.com/wbthomason/packer.nvim
|
|
|
|
depth: 1
|
|
|
|
dest: ~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
2023-01-23 13:02:52 +00:00
|
|
|
- name: Install terraform-ls
|
2023-02-11 20:14:07 +00:00
|
|
|
become: true
|
2023-01-23 13:02:52 +00:00
|
|
|
apt:
|
|
|
|
pkg: terraform-ls
|
2023-02-01 17:46:38 +00:00
|
|
|
- name: Set default applications
|
|
|
|
ini_file:
|
|
|
|
path: ~/.config/mimeapps.list
|
|
|
|
section: "Default Applications"
|
|
|
|
option: "{{ item }}"
|
|
|
|
value: "nvim.desktop"
|
2023-05-03 21:56:33 +00:00
|
|
|
no_extra_spaces: true
|
2023-02-01 17:46:38 +00:00
|
|
|
loop: "{{ default_apps }}"
|
2023-03-04 13:28:09 +00:00
|
|
|
- name: Copy neovim.bashrc
|
|
|
|
copy:
|
|
|
|
src: "{{ role_path }}/files/neovim.bashrc"
|
|
|
|
dest: ~/.bashrc.d/neovim.bashrc
|