aboutsummaryrefslogtreecommitdiffstats
path: root/roles/_workstation/packages
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-02-27 10:30:33 +0100
committerbinary <me@rgoncalves.se>2021-02-27 10:30:33 +0100
commit5acdc00aaf6c65c1353cc02a59f33e0d6ba9a281 (patch)
tree8bb7737b3efd6055dbf098105858c43c7453fbd6 /roles/_workstation/packages
parentd776d9820aeeb2fb84a4a47ce5eacf3a40823591 (diff)
downloadinfrastructure-5acdc00aaf6c65c1353cc02a59f33e0d6ba9a281.tar.gz
Break workstation role in sub-roles
Diffstat (limited to 'roles/_workstation/packages')
-rw-r--r--roles/_workstation/packages/tasks/main.yml49
-rw-r--r--roles/_workstation/packages/vars/main.yml80
2 files changed, 129 insertions, 0 deletions
diff --git a/roles/_workstation/packages/tasks/main.yml b/roles/_workstation/packages/tasks/main.yml
new file mode 100644
index 0000000..798eafa
--- /dev/null
+++ b/roles/_workstation/packages/tasks/main.yml
@@ -0,0 +1,49 @@
+
+# workstation ~~ roles/_workstation/packages/tasks/main.yml
+# install packages for all distributions
+
+---
+
+- name: install packages for Archlinux
+ shell: |
+ pacman --noconfirm --needed -Sy {{ item | join(" ") }}
+ loop:
+ - "{{ pkgs_common }}"
+ - "{{ pkgs_archlinux }}"
+ no_log: true
+ register: out
+ ignore_errors: true
+ when: ansible_distribution == "Archlinux"
+
+- name: install packages for OpenBSD
+ shell: pkg_add -z {{ item | join(" ") }}
+ loop:
+ - "{{ pkgs_common }}"
+ - "{{ pkgs_openbsd }}"
+ no_log: true
+ register: out
+ ignore_errors: true
+ when: ansible_distribution == "OpenBSD"
+
+- name: packages installation output
+ debug:
+ msg: |
+ {% for item in out.results %}
+ - {{ item.cmd }}
+ {% for type in ["stdout_lines", "stderr_lines"] if item[type] %}
+ -- {{ type }}
+ {% for line in item[type] %}
+ --- {{ line }}
+ {% endfor %}
+ {% endfor %}
+ {% endfor %}
+ when: out is defined
+
+- name: show installation informations
+ debug:
+ msg: |
+ {% if out is defined %}
+ Installed all packages for system : {{ ansible_distribution }}
+ {% else %}
+ No installation methode for system : {{ ansible_distribution }}. Please patch and commit.
+ {% endif %}
diff --git a/roles/_workstation/packages/vars/main.yml b/roles/_workstation/packages/vars/main.yml
new file mode 100644
index 0000000..a94de67
--- /dev/null
+++ b/roles/_workstation/packages/vars/main.yml
@@ -0,0 +1,80 @@
+
+# roles/_workstation/packages/vars/main.yml
+#
+
+---
+
+pkgs_common:
+ # desktop (backup over dwm)
+ - bemenu
+ - i3status
+ # editor
+ - neovim
+ # files
+ - curl
+ - git
+ - syncthing
+ - tar
+ - unzip
+ - wget
+ - zip
+ # lang
+ - ansible
+ - go
+ - rust
+ # multimedia
+ - cmus
+ - feh
+ - firefox
+ - mpv
+ - qutebrowser
+ - vlc
+ - weechat
+ # tools
+ - gnupg
+ - htop
+ - ipmitool
+ - tor
+ - zsh
+
+pkgs_archlinux:
+ # desktop
+ - i3-wm
+ # editor
+ - emacs
+ # sys
+ - opendoas
+ # python
+ - python-jedi
+ - python-neovim
+ - python-pip
+ - python-requests
+ # net
+ - wireguard-dkms
+
+pkgs_openbsd:
+ # desktop
+ - i3
+ # devel
+ - automake--%1.16
+ - clang-tools-extra
+ - cmake
+ - gmake
+ - free
+ # editor
+ - emacs--no_x11%emacs
+ # net
+ - tor-browser
+ - torsocks
+ - wireguard-tools
+ # multimedia
+ - weechat-lua
+ - weechat-python
+ # python
+ - py3-jedi
+ - py3-neovim
+ - py3-pip
+ - py3-requests
+ # security
+ - pcsc-lite
+ - pcsc-tools
remember that computers suck.