Current state & start docs.
This commit is contained in:
		
							parent
							
								
									e2543baf2d
								
							
						
					
					
						commit
						5668cd163d
					
				| 
						 | 
				
			
			@ -0,0 +1,41 @@
 | 
			
		|||
#+TITLE: ansible config
 | 
			
		||||
#+AUTHOR: kyle
 | 
			
		||||
 | 
			
		||||
* wntrmute ansible
 | 
			
		||||
 | 
			
		||||
  This is my ansible configuration for setting up various machines.
 | 
			
		||||
 | 
			
		||||
** Assumptions
 | 
			
		||||
 | 
			
		||||
   The systems that I use with Ansible are virtually all Ubuntu, or at
 | 
			
		||||
   least Debian-ish systems. I do have some NixOS machines, but these
 | 
			
		||||
   use deep NixOS magic and their configuration is stored in the Elder
 | 
			
		||||
   Scrolls that would drive mortals mad to read.
 | 
			
		||||
 | 
			
		||||
   This is also for interactive systems, e.g. ones that I log into and
 | 
			
		||||
   do things. It expects that I will spend time in the shell doing shell
 | 
			
		||||
   things.
 | 
			
		||||
 | 
			
		||||
** Bootstrapping
 | 
			
		||||
 | 
			
		||||
   Run `./bootstrap.sh`.
 | 
			
		||||
 | 
			
		||||
** Makefile
 | 
			
		||||
 | 
			
		||||
   The Makefile has a few targets worth knowing about:
 | 
			
		||||
 | 
			
		||||
   + check: syntax checking
 | 
			
		||||
   + all (default target): Picard this thing (make it so).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
** Roles
 | 
			
		||||
 | 
			
		||||
*** base
 | 
			
		||||
 | 
			
		||||
    base is the stuff I don't really want to have to live without no
 | 
			
		||||
    matter what machine I'm on. It shouldn't expect graphical stuff.
 | 
			
		||||
 | 
			
		||||
*** desktop
 | 
			
		||||
 | 
			
		||||
    desktop installs the heavier and GUI things that I'd want on a
 | 
			
		||||
    desktop (or realistically, a laptop).
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
| 
						 | 
				
			
			@ -1,11 +0,0 @@
 | 
			
		|||
# KEYBOARD CONFIGURATION FILE
 | 
			
		||||
 | 
			
		||||
# Consult the keyboard(5) manual page.
 | 
			
		||||
 | 
			
		||||
XKBMODEL="pc105"
 | 
			
		||||
XKBLAYOUT="us"
 | 
			
		||||
XKBVARIANT=""
 | 
			
		||||
XKBOPTIONS="ctrl:swapcaps,compose:ralt"
 | 
			
		||||
 | 
			
		||||
BACKSPACE="guess"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,35 +1,15 @@
 | 
			
		|||
- name: set up keyboard controls
 | 
			
		||||
  become: true
 | 
			
		||||
  ansible.builtin.copy:
 | 
			
		||||
    dest: /etc/default/keyboard
 | 
			
		||||
    owner: root
 | 
			
		||||
    group: root
 | 
			
		||||
    mode: 0644
 | 
			
		||||
    content: |
 | 
			
		||||
      # KEYBOARD CONFIGURATION FILE
 | 
			
		||||
      # Consult the keyboard(5) manual page.
 | 
			
		||||
      # managed by ansible
 | 
			
		||||
 | 
			
		||||
      XKBMODEL="pc105"
 | 
			
		||||
      XKBLAYOUT="us"
 | 
			
		||||
      XKBVARIANT=""
 | 
			
		||||
      XKBOPTIONS="ctrl:swapcaps,compose:ralt"
 | 
			
		||||
 | 
			
		||||
      BACKSPACE="guess"
 | 
			
		||||
 | 
			
		||||
- name: set up common tools
 | 
			
		||||
  become: true
 | 
			
		||||
  ansible.builtin.apt: name={{ item }} state=present
 | 
			
		||||
  with_items:
 | 
			
		||||
    - acpitool
 | 
			
		||||
    - curl
 | 
			
		||||
    - emacs
 | 
			
		||||
    - htop
 | 
			
		||||
    - iftop
 | 
			
		||||
    - iotop
 | 
			
		||||
    - imagemagick
 | 
			
		||||
    - keychain
 | 
			
		||||
    - mg
 | 
			
		||||
    - nvi
 | 
			
		||||
    - pandoc
 | 
			
		||||
    - par
 | 
			
		||||
    - powertop
 | 
			
		||||
| 
						 | 
				
			
			@ -44,24 +24,4 @@
 | 
			
		|||
    - tmux
 | 
			
		||||
    - tree
 | 
			
		||||
    - unzip
 | 
			
		||||
    - vim-gtk
 | 
			
		||||
    - zsh
 | 
			
		||||
 | 
			
		||||
- name: set up desktop environments
 | 
			
		||||
  become: true
 | 
			
		||||
  ansible.builtin.apt: name={{ item }} state=present
 | 
			
		||||
  with_items:
 | 
			
		||||
    - i3
 | 
			
		||||
    - i3lock
 | 
			
		||||
 | 
			
		||||
- name: set up xprogs
 | 
			
		||||
  become: true
 | 
			
		||||
  ansible.builtin.apt: name={{ item }} state=present
 | 
			
		||||
  with_items:
 | 
			
		||||
    - arandr
 | 
			
		||||
    - evince
 | 
			
		||||
    - feh
 | 
			
		||||
    - firefox
 | 
			
		||||
    - gparted
 | 
			
		||||
    - scrot
 | 
			
		||||
    - vlc
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,45 @@
 | 
			
		|||
- name: set up keyboard controls
 | 
			
		||||
  become: true
 | 
			
		||||
  ansible.builtin.copy:
 | 
			
		||||
    dest: /etc/default/keyboard
 | 
			
		||||
    owner: root
 | 
			
		||||
    group: root
 | 
			
		||||
    mode: 0644
 | 
			
		||||
    content: |
 | 
			
		||||
      # KEYBOARD CONFIGURATION FILE
 | 
			
		||||
      # Consult the keyboard(5) manual page.
 | 
			
		||||
      # managed by ansible
 | 
			
		||||
 | 
			
		||||
      XKBMODEL="pc105"
 | 
			
		||||
      XKBLAYOUT="us"
 | 
			
		||||
      XKBVARIANT=""
 | 
			
		||||
      XKBOPTIONS="ctrl:swapcaps,compose:ralt"
 | 
			
		||||
 | 
			
		||||
      BACKSPACE="guess"
 | 
			
		||||
 | 
			
		||||
- name: set up common desktop tools
 | 
			
		||||
  become: true
 | 
			
		||||
  ansible.builtin.apt: name={{ item }} state=present
 | 
			
		||||
  with_items:
 | 
			
		||||
    - acpitool
 | 
			
		||||
    - emacs
 | 
			
		||||
    - vim-gtk
 | 
			
		||||
 | 
			
		||||
- name: set up desktop environments
 | 
			
		||||
  become: true
 | 
			
		||||
  ansible.builtin.apt: name={{ item }} state=present
 | 
			
		||||
  with_items:
 | 
			
		||||
    - i3
 | 
			
		||||
    - i3lock
 | 
			
		||||
 | 
			
		||||
- name: set up xprogs
 | 
			
		||||
  become: true
 | 
			
		||||
  ansible.builtin.apt: name={{ item }} state=present
 | 
			
		||||
  with_items:
 | 
			
		||||
    - arandr
 | 
			
		||||
    - evince
 | 
			
		||||
    - feh
 | 
			
		||||
    - firefox
 | 
			
		||||
    - gparted
 | 
			
		||||
    - scrot
 | 
			
		||||
    - vlc
 | 
			
		||||
| 
						 | 
				
			
			@ -79,7 +79,6 @@
 | 
			
		|||
    - genext2fs
 | 
			
		||||
    - genisoimage
 | 
			
		||||
    - genromfs
 | 
			
		||||
    - initramfs-tools
 | 
			
		||||
    - makebootfat
 | 
			
		||||
    - mmdebstrap
 | 
			
		||||
    - proot
 | 
			
		||||
| 
						 | 
				
			
			@ -186,6 +185,26 @@
 | 
			
		|||
  become: true
 | 
			
		||||
  ansible.builtin.apt: name=code state=present
 | 
			
		||||
 | 
			
		||||
## rust
 | 
			
		||||
 | 
			
		||||
- name: check if cargo is installed
 | 
			
		||||
  shell: command -v cargo
 | 
			
		||||
  register: cargo_exists
 | 
			
		||||
  ignore_errors: yes
 | 
			
		||||
 | 
			
		||||
- name: Download Installer
 | 
			
		||||
  when: cargo_exists is failed
 | 
			
		||||
  get_url:
 | 
			
		||||
    url: https://sh.rustup.rs
 | 
			
		||||
    dest: /tmp/sh.rustup.rs
 | 
			
		||||
    mode: '0755'
 | 
			
		||||
    force: 'yes'
 | 
			
		||||
 | 
			
		||||
- name: install rust/cargo
 | 
			
		||||
  when: cargo_exists is failed
 | 
			
		||||
  shell: /tmp/sh.rustup.rs -y
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## AI/ML stuff
 | 
			
		||||
 | 
			
		||||
- name: install machine learning and AI tools
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,6 +27,7 @@
 | 
			
		|||
    - .gitignore_global
 | 
			
		||||
    - .hgrc
 | 
			
		||||
    - .mg
 | 
			
		||||
    - .profile_custom
 | 
			
		||||
    - .vimrc
 | 
			
		||||
    - .XCompose
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,16 @@
 | 
			
		|||
- name: check if tailscale is installed
 | 
			
		||||
  shell: command -v tailscale
 | 
			
		||||
  register: tailscale_exists
 | 
			
		||||
  ignore_errors: yes
 | 
			
		||||
 | 
			
		||||
- name: download tailscale installer
 | 
			
		||||
  when: tailscale_exists is failed
 | 
			
		||||
  get_url:
 | 
			
		||||
    url: https://tailscale.com/install.sh
 | 
			
		||||
    dest: /tmp/tailscale.sh
 | 
			
		||||
    mode: '0755'
 | 
			
		||||
    force: 'yes'
 | 
			
		||||
 | 
			
		||||
- name: install tailscale
 | 
			
		||||
  when: tailscale_exists is failed
 | 
			
		||||
  shell: /tmp/tailscale.sh
 | 
			
		||||
		Loading…
	
		Reference in New Issue