Opensuse and maint
This commit is contained in:
parent
fa074581fa
commit
21734b5ed4
8 changed files with 100 additions and 17 deletions
|
@ -9,8 +9,8 @@ elif [[ $(uname) == "Linux" ]]; then
|
||||||
if [[ $(command -v pacman) ]]; then
|
if [[ $(command -v pacman) ]]; then
|
||||||
sudo pacman -Sy --noconfirm ansible
|
sudo pacman -Sy --noconfirm ansible
|
||||||
elif [[ $(command -v zypper) ]]; then
|
elif [[ $(command -v zypper) ]]; then
|
||||||
sudo zypper install -y ansible
|
sudo zypper install -y ansible
|
||||||
sudo ln -sf /usr/bin/python3 /usr/bin/python
|
sudo ln -sf /usr/bin/python3 /usr/bin/python
|
||||||
elif [[ $(command -v apt) ]]; then
|
elif [[ $(command -v apt) ]]; then
|
||||||
sudo apt install -y ansible python3-apt
|
sudo apt install -y ansible python3-apt
|
||||||
# ubuntu doesn't create a /usr/bin/python, so we have to make one ourselves
|
# ubuntu doesn't create a /usr/bin/python, so we have to make one ourselves
|
||||||
|
@ -24,4 +24,6 @@ elif [[ $(uname) == "Darwin" ]]; then
|
||||||
/usr/local/bin/brew install ansible
|
/usr/local/bin/brew install ansible
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ansible-galaxy install kewlfft.aur
|
||||||
ansible-playbook --ask-become-pass -i inventory main.yml
|
ansible-playbook --ask-become-pass -i inventory main.yml
|
||||||
|
|
||||||
|
|
2
playbooks/roles/arch/meta/main.yml
Normal file
2
playbooks/roles/arch/meta/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
dependencies:
|
||||||
|
- kewlfft.aur
|
|
@ -16,8 +16,18 @@
|
||||||
- cmake
|
- cmake
|
||||||
- tmux
|
- tmux
|
||||||
- gnupg
|
- gnupg
|
||||||
- neovim
|
|
||||||
- fzf
|
- fzf
|
||||||
|
- rsync
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- name: Install packaged neovim
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
when:
|
||||||
|
- dev_machine != true
|
||||||
|
pacman:
|
||||||
|
name:
|
||||||
|
- neovim
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
- name: Install Development Tools
|
- name: Install Development Tools
|
||||||
|
@ -31,10 +41,37 @@
|
||||||
- openssl
|
- openssl
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
|
- name: Create aur_builder user
|
||||||
|
when:
|
||||||
|
- dev_machine == true
|
||||||
|
user:
|
||||||
|
name: aur_builder
|
||||||
|
group: wheel
|
||||||
|
|
||||||
|
- name: aur_builder can run pacman without sudo
|
||||||
|
when:
|
||||||
|
- dev_machine == true
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/sudoers.d/11-install-aur_builder
|
||||||
|
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
||||||
|
create: yes
|
||||||
|
validate: 'visudo -cf %s'
|
||||||
|
|
||||||
|
- name: Create yay tmp directory
|
||||||
|
when:
|
||||||
|
- dev_machine == true
|
||||||
|
file:
|
||||||
|
dest: /tmp/yay
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
owner: aur_builder
|
||||||
|
group: wheel
|
||||||
|
|
||||||
- name: clone yay from github
|
- name: clone yay from github
|
||||||
when:
|
when:
|
||||||
- dev_machine == true
|
- dev_machine == true
|
||||||
become: false
|
become: true
|
||||||
|
become_user: aur_builder
|
||||||
git:
|
git:
|
||||||
repo: https://aur.archlinux.org/yay.git
|
repo: https://aur.archlinux.org/yay.git
|
||||||
dest: /tmp/yay
|
dest: /tmp/yay
|
||||||
|
@ -42,18 +79,14 @@
|
||||||
update: yes
|
update: yes
|
||||||
# notify: makepkg -si
|
# notify: makepkg -si
|
||||||
|
|
||||||
- name: makepkg --noconfirm -si
|
- name: Makepkg yay
|
||||||
when:
|
when:
|
||||||
- dev_machine == true
|
- dev_machine == true
|
||||||
become: false
|
become: yes
|
||||||
|
become_user: aur_builder
|
||||||
command: makepkg --noconfirm -si
|
command: makepkg --noconfirm -si
|
||||||
args:
|
args:
|
||||||
chdir: /tmp/yay
|
chdir: /tmp/yay
|
||||||
creates: /usr/bin/yay
|
creates: /usr/bin/yay
|
||||||
|
|
||||||
- name: Install hstr
|
- include_tasks: neovim-nightly.yml
|
||||||
when:
|
|
||||||
- dev_machine == true
|
|
||||||
command: yay -Sy --noconfirm --needed --cleanafter hstr
|
|
||||||
args:
|
|
||||||
creates: /usr/local/bin/hstr
|
|
||||||
|
|
6
playbooks/roles/arch/tasks/neovim-nightly.yml
Normal file
6
playbooks/roles/arch/tasks/neovim-nightly.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- aur: name=neovim-nightly
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
||||||
|
when:
|
||||||
|
- nightly_neovim == true
|
|
@ -20,7 +20,7 @@
|
||||||
- rsync
|
- rsync
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
- include_tasks: neovim-nightly.yaml
|
- include_tasks: neovim-nightly.yml
|
||||||
|
|
||||||
- name: Install @development-tools
|
- name: Install @development-tools
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -17,12 +17,11 @@
|
||||||
warn: false
|
warn: false
|
||||||
creates: /etc/yum.repos.d/_copr_agriffis_neovim-nightly.repo
|
creates: /etc/yum.repos.d/_copr_agriffis_neovim-nightly.repo
|
||||||
|
|
||||||
- name: Install neovim-nightly
|
- name: Install neovim
|
||||||
become: yes
|
become: yes
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
when:
|
|
||||||
- nightly_neovim == true
|
|
||||||
dnf:
|
dnf:
|
||||||
name:
|
name:
|
||||||
- neovim
|
- neovim
|
||||||
state: latest
|
state: latest
|
||||||
|
|
|
@ -16,10 +16,12 @@
|
||||||
- cmake
|
- cmake
|
||||||
- tmux
|
- tmux
|
||||||
- gpg
|
- gpg
|
||||||
- neovim
|
|
||||||
- fzf
|
- fzf
|
||||||
|
- rsync
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
|
- include_tasks: neovim-nightly.yml
|
||||||
|
|
||||||
- name: Install devel_*
|
- name: Install devel_*
|
||||||
when:
|
when:
|
||||||
- dev_machine == true
|
- dev_machine == true
|
||||||
|
|
39
playbooks/roles/opensuse/tasks/neovim-nightly.yml
Normal file
39
playbooks/roles/opensuse/tasks/neovim-nightly.yml
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
---
|
||||||
|
- name: Download neovim-nightly from github appimage
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
when:
|
||||||
|
- nightly_neovim == true
|
||||||
|
command:
|
||||||
|
cmd: curl -L -o /tmp/nvim.appimage 'https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage'
|
||||||
|
warn: false
|
||||||
|
|
||||||
|
- name: Ensure nvim.appimage has proper permissions
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
when:
|
||||||
|
- nightly_neovim == true
|
||||||
|
file:
|
||||||
|
path: /tmp/nvim.appimage
|
||||||
|
mode: u=rwx,g=rx,o=rx
|
||||||
|
|
||||||
|
- name: Install nvim.appimage into /usr/local/bin/nvim
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
when:
|
||||||
|
- nightly_neovim == true
|
||||||
|
synchronize:
|
||||||
|
src: /tmp/nvim.appimage
|
||||||
|
dest: /usr/local/bin/nvim
|
||||||
|
|
||||||
|
|
||||||
|
- name: Install neovim from repo
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
when:
|
||||||
|
- nightly_neovim == false
|
||||||
|
zypper:
|
||||||
|
name:
|
||||||
|
- neovim
|
||||||
|
state: latest
|
||||||
|
|
Loading…
Add table
Reference in a new issue