Merge "Add neovim support in tacker installer"

This commit is contained in:
Zuul 2023-08-07 05:47:50 +00:00 committed by Gerrit Code Review
commit 5cd0aad675
8 changed files with 88 additions and 6 deletions

View File

@ -100,3 +100,12 @@ $ ./stack.sh
See instruction how to configure `local.conf` described in
[DevStack Quick Start](https://docs.openstack.org/devstack/latest/).
### Editor support
Although you can use any editors on the setup VM, it provides `vim` and
`neovim` with minimal configurations for LSP.
You can choose the editor by configuring parameters related vim
in `group_vars/all.yml`, so turn it `false` if you don't use the
support.

View File

@ -16,10 +16,13 @@ fixed_range: 10.4.128.0/20
# 2. Configure optional tools on controller node
# Use the latest stable Neovim.
use_neovim: true
# Use the latest vim on `ppa:jonathonf/vim`, and use plugins with
# vim-plug.
use_vim_latest: true
use_vim_extra_plugins: true
use_vim_latest: false
use_vim_extra_plugins: false
# Clone tacker in addition to devstack.
use_tacker: true

View File

@ -1,15 +1,25 @@
---
- name: install basic packages
- name: install python and libs
become: yes
apt: name={{ item }} update_cache=yes
with_items:
- python3
- python3-dev
- python3-pip
- bridge-utils
- name: install git tools
become: yes
apt: name={{ item }}
with_items:
- git
- git-review
- name: install networking tools
become: yes
apt: name={{ item }}
with_items:
- bridge-utils
- name: upgrade apt packages
become: yes
apt:

View File

@ -14,6 +14,9 @@
- include: vim_extra_plugins.yml
when: use_vim_extra_plugins == true
- include: neovim.yml
when: use_neovim == true
- include: devstack.yml
- include: setup_tacker.yml

View File

@ -0,0 +1,22 @@
---
- name: install neovim
become: yes
unarchive:
src=https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.tar.gz
dest=/usr/local
remote_src=yes
- name: set PATH for '.local/bin'
lineinfile:
line="export PATH=/usr/local/nvim-linux64/bin:$PATH"
dest={{ ansible_env.HOME }}/.bashrc
- name: install latest nodejs for nvim coc
become: yes
shell: curl -sL install-node.vercel.app | sudo bash -s -- --yes
- name: install latest yarn for nvim coc
become: yes
npm:
name: yarn
global: yes

View File

@ -1,15 +1,25 @@
---
- name: install basic packages
- name: install python and libs
become: yes
apt: name={{ item }} update_cache=yes
with_items:
- python3
- python3-dev
- python3-pip
- bridge-utils
- name: install git tools
become: yes
apt: name={{ item }}
with_items:
- git
- git-review
- name: install networking tools
become: yes
apt: name={{ item }}
with_items:
- bridge-utils
- name: upgrade apt packages
become: yes
apt:

View File

@ -14,6 +14,9 @@
- include: vim_extra_plugins.yml
when: use_vim_extra_plugins == true
- include: neovim.yml
when: use_neovim == true
- include: devstack.yml
- include: setup_tacker.yml

View File

@ -0,0 +1,22 @@
---
- name: install neovim
become: yes
unarchive:
src=https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.tar.gz
dest=/usr/local
remote_src=yes
- name: set PATH for '.local/bin'
lineinfile:
line="export PATH=/usr/local/nvim-linux64/bin:$PATH"
dest={{ ansible_env.HOME }}/.bashrc
- name: install latest nodejs for nvim coc
become: yes
shell: curl -sL install-node.vercel.app | sudo bash -s -- --yes
- name: install latest yarn for nvim coc
become: yes
npm:
name: yarn
global: yes