Compare commits
3 Commits
3652b3c9cb
...
18.04
| Author | SHA1 | Date | |
|---|---|---|---|
| 1186cfe33f | |||
| 92a15c6e18 | |||
| 6aca74ff3c |
20
main.yaml
20
main.yaml
@@ -1,20 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
|
||||
roles:
|
||||
- role: zsh
|
||||
- role: tmux
|
||||
- role: neovim
|
||||
- role: git
|
||||
- role: python
|
||||
- role: wsl
|
||||
when: '"WSL" in ansible_kernel'
|
||||
|
||||
- hosts: windows
|
||||
|
||||
roles:
|
||||
- role: neovim
|
||||
- role: git
|
||||
- role: python
|
||||
- role: autohotkey
|
||||
- role: 1password
|
||||
@@ -8,16 +8,4 @@
|
||||
- the_silver_searcher
|
||||
state: latest
|
||||
|
||||
- name: clone config repo
|
||||
git:
|
||||
repo: git@code.infektor.net:config/vim.git
|
||||
dest: ~/.config/nvim
|
||||
version: master
|
||||
|
||||
# TODO: - name: set repo email
|
||||
|
||||
- name: install pip packages
|
||||
pip:
|
||||
name: '{{neovim_pip_packages}}'
|
||||
state: latest
|
||||
extra_args: --user
|
||||
- include_tasks: unix.yaml
|
||||
|
||||
11
roles/neovim/tasks/Debian-unstable.yaml
Normal file
11
roles/neovim/tasks/Debian-unstable.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: install Debian-unstable apt packages
|
||||
become: true
|
||||
apt:
|
||||
name:
|
||||
- neovim
|
||||
- clang-format
|
||||
- clang-tidy
|
||||
- clangd
|
||||
- silversearcher-ag
|
||||
state: latest
|
||||
@@ -1,28 +1,6 @@
|
||||
---
|
||||
- name: install apt package
|
||||
become: true
|
||||
apt:
|
||||
name:
|
||||
- neovim
|
||||
- clang-format
|
||||
- clang-tidy
|
||||
- clangd
|
||||
- silversearcher-ag
|
||||
state: latest
|
||||
|
||||
- name: clone config repo
|
||||
git:
|
||||
repo: git@code.infektor.net:config/vim.git
|
||||
dest: ~/.config/nvim
|
||||
version: master
|
||||
|
||||
# TODO: - name: set repo email
|
||||
|
||||
- name: install pip packages
|
||||
pip:
|
||||
name: '{{neovim_pip_packages}}'
|
||||
state: latest
|
||||
extra_args: --user
|
||||
- include_tasks: '{{ansible_distribution}}-{{ansible_distribution_version}}.yaml'
|
||||
- include_tasks: 'unix.yaml'
|
||||
|
||||
- name: nodejs get json containing latest version
|
||||
uri:
|
||||
|
||||
34
roles/neovim/tasks/Ubuntu-18.04.yaml
Normal file
34
roles/neovim/tasks/Ubuntu-18.04.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
- name: get releases json from github
|
||||
uri:
|
||||
url: https://api.github.com/repos/neovim/neovim/releases
|
||||
register: releases
|
||||
- name: query the latest stable release
|
||||
set_fact:
|
||||
stable: '{{releases.json | json_query("[?tag_name==`stable`]")}}'
|
||||
- name: query the nvim-linux64.deb.sha256sum asset
|
||||
set_fact:
|
||||
sha_asset: '{{stable[0].assets | json_query("[?name==`nvim-linux64.deb.sha256sum`]")}}'
|
||||
- name: query the nvim-linux64.deb asset
|
||||
set_fact:
|
||||
deb_asset: '{{stable[0].assets | json_query("[?name==`nvim-linux64.deb`]")}}'
|
||||
- name: create directory for downloads
|
||||
file:
|
||||
state: directory
|
||||
path: ~/.cache/nvim/deb
|
||||
- name: download nvim-linux64.deb with checksum
|
||||
get_url:
|
||||
url: '{{deb_asset[0].browser_download_url}}'
|
||||
dest: ~/.cache/nvim/deb/nvim-linux64.deb
|
||||
checksum: 'sha256:{{sha_asset[0].browser_download_url}}'
|
||||
|
||||
- name: install nvim-linux64.deb package
|
||||
become: true
|
||||
apt:
|
||||
deb: ~/.cache/nvim/deb/nvim-linux64.deb
|
||||
# TODO: clangd, clang-format, clang-tidy
|
||||
- name: install Ubuntu-18.04 apt packages
|
||||
become: true
|
||||
apt:
|
||||
name:
|
||||
- silversearcher-ag
|
||||
14
roles/neovim/tasks/unix.yaml
Normal file
14
roles/neovim/tasks/unix.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
- name: clone config repo
|
||||
git:
|
||||
repo: git@code.infektor.net:config/vim.git
|
||||
dest: ~/.config/nvim
|
||||
version: master
|
||||
|
||||
# TODO: - name: set repo email
|
||||
|
||||
- name: install pip packages
|
||||
pip:
|
||||
name: '{{neovim_pip_packages}}'
|
||||
state: latest
|
||||
extra_args: --user
|
||||
16
roles/powershell/tasks/main.yaml
Normal file
16
roles/powershell/tasks/main.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: clone config repos
|
||||
win_git:
|
||||
repo: git@code.infektor.net:config/WindowsPowerShell.git
|
||||
dest: '{{ansible_env.USERPROFILE}}/Documents/WindowsPowerShell'
|
||||
branch: master
|
||||
|
||||
- name: install chocolatey package
|
||||
win_chocolatey:
|
||||
name: Cmder
|
||||
state: latest
|
||||
|
||||
- name: install PsReadline module
|
||||
win_psmodule:
|
||||
name: PsReadline
|
||||
state: latest
|
||||
9
unix.yaml
Normal file
9
unix.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
|
||||
roles:
|
||||
- role: zsh
|
||||
- role: tmux
|
||||
- role: neovim
|
||||
- role: git
|
||||
- role: python
|
||||
20
windows.yaml
Normal file
20
windows.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- import_playbook: unix.yaml
|
||||
|
||||
- hosts: localhost
|
||||
|
||||
# FIXME: Roles which depend on the win_git module can't be in the same
|
||||
# playbook on the first run because the wsl role hasn't added the win_git
|
||||
# module to the modules path yet.
|
||||
roles:
|
||||
- role: wsl
|
||||
|
||||
- hosts: windows
|
||||
|
||||
roles:
|
||||
- role: powershell
|
||||
- role: neovim
|
||||
- role: git
|
||||
- role: python
|
||||
- role: autohotkey
|
||||
- role: 1password
|
||||
Reference in New Issue
Block a user