diff options
author | binary <me@rgoncalves.se> | 2021-01-06 14:05:33 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2021-01-06 14:05:33 +0100 |
commit | c324cb63afa5bd9135219b65e73491ea1471077c (patch) | |
tree | 52f71455a17ca44a4d9e77803ef1a80408c5e45a | |
parent | afcbc020bd78ba7257002846633a580aa5dd55dd (diff) | |
download | infrastructure-c324cb63afa5bd9135219b65e73491ea1471077c.tar.gz |
Break packages and per-distro tasks
-rw-r--r-- | roles/workstation/tasks/main.yml | 58 | ||||
-rw-r--r-- | roles/workstation/tasks/packages.yml | 35 | ||||
-rw-r--r-- | roles/workstation/tasks/setup_openbsd.yml | 43 |
3 files changed, 80 insertions, 56 deletions
diff --git a/roles/workstation/tasks/main.yml b/roles/workstation/tasks/main.yml index 41a640c..6aa3322 100644 --- a/roles/workstation/tasks/main.yml +++ b/roles/workstation/tasks/main.yml @@ -14,68 +14,14 @@ ansible_become_method: "{{ 'doas' if ws_become.stat.exists else 'sudo' }}" ansible_become_user: root -- name: download development packages - package: name="{{ item }}" state=present - loop: - # DEVEL - - base - - base-devel - - go - # EDITOR - - emacs - - neovim - - python-neovim - - py3-neovim - # PYTHON - - python-pip - - py3-pip - - python-requests - - py3-requests - - python-jedi - - py3-jedi - # UTILS - - i3 - - i3status - - gnupg - - py3-pip - - python-pip - - zsh - - zip - - unzip - - tar - - git - - curl - - wget - - wireguard - - wireguard-dkms - - wireguard-tools - # PRIVACY - - tor - - tor-browser - - torsocks - # MULTIMEDIA - - qutebrowser - - firefox - - feh - - imv - - mpv - - cmus - - vlc - - syncthing - failed_when: false - ignore_errors: true +- name: download packages + include_tasks: packages.yml tags: packages -- name: flush fonts cache - shell: fc-cache -fv - - name: check for distribution specific task stat: path="{{ role_path }}/tasks/setup_{{ ws_distribution }}.yml" register: ws_distribution_task -- debug: - var: ws_distribution_task - - name: include distribution specific task include_tasks: "setup_{{ ws_distribution }}.yml" when: ws_distribution_task.stat.exists diff --git a/roles/workstation/tasks/packages.yml b/roles/workstation/tasks/packages.yml new file mode 100644 index 0000000..4b38d4b --- /dev/null +++ b/roles/workstation/tasks/packages.yml @@ -0,0 +1,35 @@ + +# +# + +--- + +- name: download common packages + package: name="{{ item }}" state=present + loop: + - zip unzip tar git curl wget syncthing + - qutebrowser firefox feh mpv cmus vlc + - i3 i3status bemenu + - go rust ansible + - emacs neovim htop + - gnupg zsh + - tor + ignore_errors: true + +- name: download openbsd packages + package: name="{{ item }}" state=present + loop: + - py3-pip py3-requests py3-jedi py3-neovim + - free automake clang-tools-extra + - wireguard-tools + - tor-browser torsocks + when: ansible_distribution == "OpenBSD" + ignore_errors: true + +- name: download archlinux packages + package: name="{{ item }}" state=present + loop: + - python-pip python-requests python-jedi python-neovim + - wireguard-dkms + when: ansible_distribution == "Archlinux" + ignore_errors: true diff --git a/roles/workstation/tasks/setup_openbsd.yml b/roles/workstation/tasks/setup_openbsd.yml new file mode 100644 index 0000000..bf4fb6c --- /dev/null +++ b/roles/workstation/tasks/setup_openbsd.yml @@ -0,0 +1,43 @@ + +# workstation ~~ roles/workstation/tasks/main.yml +# init openbsd based workstation + +--- + +- name: ensure wsconsctl config file exists + file: + path: /etc/wsconsctl.conf + owner: root + group: wheel + mode: 0644 + state: touch + +- name: wsconsctl screen default screenbrightness + lineinfile: + path: /etc/wsconsctl.conf + regexp: ^screen.brightness= + line: screen.brightness=80 + +- name: wsconsctl keyboard default acceleration + lineinfile: + path: /etc/wsconsctl.conf + regexp: ^keyboard.repeat.del1= + line: keyboard.repeat.del1=180 + +- name: wsconsctl keyboard default acceleration + lineinfile: + path: /etc/wsconsctl.conf + regexp: ^keyboard.repeat.deln= + line: keyboard.repeat.deln=50 + +- name: wsconctl disable keyboard bell + lineinfile: + path: /etc/wsconsctl.conf + regexp: ^keyboard.bell.volume= + line: keyboard.bell.volume=0 + +- name: wsconctl enable touchpad tapping + lineinfile: + path: /etc/wsconsctl.conf + regexp: ^mouse.tp.tapping= + line: mouse.tp.tapping=1 |