diff --git a/Makefile b/Makefile index d6b32da..eaf1b65 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ install: upgrade: ansible-playbook upgrade-playbook.yml +yttrx: + ansible-playbook yttrx-playbook.yml + mastodon-first-install: ansible-playbook mastodon-playbook.yml --tags install,configure --extra-vars "first_install=True" diff --git a/mastodon-playbook.yml b/mastodon-playbook.yml index 2d7ae5f..d3b6b60 100644 --- a/mastodon-playbook.yml +++ b/mastodon-playbook.yml @@ -2,17 +2,11 @@ - name: Configure yttrx mastodon server hosts: [mastodon] vars: - first_install: False install_sidekiq: False install_webapp: False install_frontend: False roles: - - when: first_install | bool - role: yttrx - tags: - - firstinstall - - role: mastodon - when: install_sidekiq| bool diff --git a/roles/yttrx/tasks/main.yml b/roles/yttrx/tasks/main.yml index 9d12180..ff7e855 100644 --- a/roles/yttrx/tasks/main.yml +++ b/roles/yttrx/tasks/main.yml @@ -12,3 +12,5 @@ dest: /root/fzf clone: yes update: yes + +- import_tasks: nvim.yml diff --git a/roles/yttrx/tasks/nvim.yml b/roles/yttrx/tasks/nvim.yml new file mode 100644 index 0000000..ddf47d6 --- /dev/null +++ b/roles/yttrx/tasks/nvim.yml @@ -0,0 +1,46 @@ +--- +# tasks file for yttrx-nvim + +- name: Create nvim appimage directory + file: + path: /opt/nvim + state: directory + mode: 0755 + +- name: Download neovim appimage from github + ansible.builtin.get_url: + url: https://github.com/neovim/neovim/releases/download/v0.8.2/nvim.appimage + dest: /opt/nvim/nvim.appimage + +- name: Ensure that nvim.appimage is executable + file: + path: /opt/nvim/nvim.appimage + mode: 0755 + +- name: Create symlink to nvim.appimage + file: + src: /opt/nvim/nvim.appimage + dest: /usr/local/bin/nvim + state: link + +- name: check if lazy.vim exists + stat: + path: /root/.config/nvim + register: lazyvim_check + +- name: Clone lazy.vim for user root + ansible.builtin.git: + repo: https://github.com/LazyVim/starter + dest: /root/.config/nvim + when: not lazyvim_check.stat.exists + +# Needed by lazy.vim +- name: Install unzip + package: + name: unzip + state: present + +- name: Install python3.10-venv + package: + name: python3.10-venv + state: present diff --git a/yttrx-playbook.yml b/yttrx-playbook.yml new file mode 100644 index 0000000..152a0a9 --- /dev/null +++ b/yttrx-playbook.yml @@ -0,0 +1,5 @@ +--- +- name: Configure yttrx mastodon server + hosts: [mastodon] + roles: + - role: yttrx