Cleaning up and documenting.

This commit is contained in:
Kyle Isom 2023-04-10 22:55:59 -07:00
parent 5668cd163d
commit 25cdd54e26
3 changed files with 44 additions and 2 deletions

View File

@ -39,3 +39,27 @@
desktop installs the heavier and GUI things that I'd want on a
desktop (or realistically, a laptop).
*** development
This installs a baseline of development tools; it also has
variables to control what else gets installed:
+ dev_full installs everything
+ dev_virt installs virtualisation stuff, including docker
+ dev_embedded installs various embedded toolchains.
*** dotfiles
Ye olde dotfiles, managed in Ansible. Was this a mistake? Nothing
I do is a mistake.
*** heavy
This is where stuff that takes a while to install goes. It's all
desktop stuff, so it really only makes sense with the ~desktop~
role.
*** tailscale
Almost everything is going to get this; it installs tailscale.

View File

@ -61,16 +61,19 @@
## virtualization and containerization
- name: ensure repository key is installed
when: dev_virt | dev_full
become: true
ansible.builtin.apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: ensure docker registry is available
when: dev_virt | dev_full
become: true
ansible.builtin.apt_repository: repo='deb https://download.docker.com/linux/ubuntu bionic stable' state=present
- name: rootfs building tools
when: dev_virt | dev_full
ansible.builtin.apt: name={{ item }} state=present
become: true
with_items:
@ -88,6 +91,7 @@
- syslinux-utils
- name: install container and virtualisation management
when: dev_virt | dev_full
become: true
ansible.builtin.apt: name={{ item }} state=present
with_items:
@ -114,18 +118,21 @@
notify: "restart docker service"
- name: Ensure kvm group exists
when: dev_virt | dev_full
become: true
ansible.builtin.group:
name: kvm
state: present
- name: Ensure docker group exists
when: dev_virt | dev_full
become: true
ansible.builtin.group:
name: docker
state: present
- name: add laptop user {{ laptop_user }} to docker group
when: dev_virt | dev_full
become: true
ansible.builtin.user:
name: "{{ laptop_user }}"
@ -135,6 +142,7 @@
## embedded dev stuff
- name: installed embedded dev tools
when: dev_embedded | dev_full
ansible.builtin.apt: name={{ item }} state=present
become: true
with_items:
@ -168,6 +176,7 @@
## vscode
- name: add VS Code repo key
when: dev_full
become: true
ansible.builtin.apt_key:
url: https://packages.microsoft.com/keys/microsoft.asc
@ -175,6 +184,7 @@
validate_certs: yes
- name: add VS Code repo
when: dev_full
become: true
ansible.builtin.apt_repository:
repo: deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
@ -182,18 +192,20 @@
validate_certs: yes
- name: install VS Code
when: dev_full
become: true
ansible.builtin.apt: name=code state=present
## rust
- name: check if cargo is installed
when: dev_full
shell: command -v cargo
register: cargo_exists
ignore_errors: yes
- name: Download Installer
when: cargo_exists is failed
when: dev_full and cargo_exists is failed
get_url:
url: https://sh.rustup.rs
dest: /tmp/sh.rustup.rs
@ -201,13 +213,14 @@
force: 'yes'
- name: install rust/cargo
when: cargo_exists is failed
when: dev_full and cargo_exists is failed
shell: /tmp/sh.rustup.rs -y
## AI/ML stuff
- name: install machine learning and AI tools
when: dev_full
become: true
ansible.builtin.apt:
name: "{{item}}"
@ -216,6 +229,7 @@
- jupyter-notebook
- name: install machine learning and AI python packages
when: dev_full
ansible.builtin.pip:
executable: pip3
name: "{{item}}"

View File

@ -2,18 +2,22 @@
roles:
- base
- dotfiles
- desktop
- development
- tailscale
- heavy
vars:
laptop_user: kyle
dev_full: true
- hosts: work-laptop
roles:
- base
- dotfiles
- desktop
- development
- tailscale
- heavy
vars:
laptop_user: k.isom
dev_virt: true