Compare commits

...

5 Commits

3 changed files with 22 additions and 18 deletions

View File

@@ -89,9 +89,6 @@ packages:
pluma:
ubuntu: ["pluma"]
archlinux: ["pluma"]
vim:
ubuntu: ["vim"]
archlinux: ["gvim"]
neovim:
ubuntu: ["neovim"]
archlinux: ["neovim", "python-pynvim"]
@@ -148,7 +145,7 @@ packages:
archlinux: ["pandoc", "texlive-core", "texlive-fontsextra", "texlive-latexextra"]
libvirt:
ubuntu: ["virt-manager", "libvirt-daemon"]
archlinux: ["virt-manager", "libvirt", "dnsmasq", "ebtables"]
archlinux: ["virt-manager", "libvirt", "dnsmasq", "ebtables", "dmidecode"]
firefox:
ubuntu: ["firefox"]
archlinux: ["firefox"]
@@ -394,3 +391,6 @@ packages:
signal:
ubuntu: []
archlinux: ["signal-desktop"]
vim:
ubuntu: ["vim"]
archlinux: ["gvim"]

View File

@@ -15,29 +15,29 @@
tags:
- always
- name: Check for valid distro
- name: check for valid distro
assert:
that: distro in ('ubuntu', 'archlinux')
- block:
- block:
- name: Update apt cache
- name: update apt cache
apt:
update_cache: true
become: true
changed_when: false
- name: Upgrade system
- name: upgrade system
apt:
upgrade: dist
become: true
- name: Remove unused packages
- name: remove unused packages
apt:
autoremove: true
become: true
- name: Clean apt cache
- name: clean apt cache
apt:
autoclean: true
become: true
@@ -62,7 +62,7 @@
marker: "# {mark} ANSIBLE MANAGED parallel_download"
become: true
- name: Upgrade system
- name: upgrade system
pacman:
upgrade: true
update_cache: true
@@ -75,7 +75,7 @@
state: present
become: true
- name: Clean cache
- name: clean cache
command: paccache -rk2 -ruk0
become: true
changed_when: false
@@ -107,6 +107,7 @@
create_home: true
shell: /bin/bash
system: true
become: true
- name: create paru user on arch
user:
@@ -115,6 +116,7 @@
create_home: true
shell: /bin/bash
system: true
become: true
- name: configure passwordless sudo for paru user
copy:
@@ -180,6 +182,7 @@
- name: force-update iptables to iptables-nft on arch
shell: pacman -Q iptables-nft || yes | pacman -S iptables-nft
changed_when: false
become: true
when: distro == 'archlinux'
- set_fact:
@@ -433,11 +436,12 @@
force: true
become: true
- name: add go directory to PATH
- name: add go directory to PATH and set GOROOT
copy:
dest: /etc/profile.d/go.sh
content: |
PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
owner: root
group: root
mode: '0644'
@@ -504,7 +508,7 @@
when: not yubikey_touch_detector_binary.stat.exists
- name: build yubikey-touch-detector
shell: sh -c 'env GOPATH=$(pwd) PATH=/usr/local/go/bin:$PATH go get -u github.com/maximbaz/yubikey-touch-detector'
shell: sh -c 'PATH=/usr/local/go/bin:$PATH env GOROOT=/usr/local/go GOPATH=$(pwd) go get -u github.com/maximbaz/yubikey-touch-detector'
args:
chdir: "{{ yubikey_touch_detector_build_tempdir.path }}"
when: not yubikey_touch_detector_binary.stat.exists

View File

@@ -317,23 +317,23 @@
tags: [update]
- name: install vim plugins
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall'
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall'
register: vim_plugin_install
changed_when: vim_plugin_install.stderr != ""
- name: install go binaries for vim
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoInstallBinaries +qall'
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoInstallBinaries +qall'
changed_when: false
- name: update vim plugins
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugUpdate +qall'
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugUpdate +qall'
changed_when: false
register: vim_plugin_update
changed_when: vim_plugin_update.stderr != ""
tags: [update]
- name: update go binaries for vim
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
changed_when: false
tags: [update]