Day 0 linux system config. Configures shell environment and installs useful cli tools and packages.
ansible-linux-day0 is a server and workstation configuration repo designed to automatically install useful tools and applications. This is an opinionated set of choices based on my personal experience managing Linux systems.
The playbook is designed to work on a baseline Ubuntu system. To get started,
clone the repo to your system and run the ./bootstrap.sh
file. This script
will install the latest version of ansible and the necessary ansible roles
defined in roles/requirements.yml
.
bootstrap.sh
:./bootstrap.sh
install-workstation.sh
to configure the current workstation:./install-workstation.sh
The playbook assumes you have a list of target servers defined in the
inventory/
directory.
ansible-playbook
:ansible-playbook -i inventory/server.yml day0-server.yml -K
The following roles install a variety of packages and applications and apply
configuration. The entry point for each role is the main.yml
file which
includes a series of tasks via ansible.builtin.include_tasks
. Each included
task has a corresponding variable which controls whether or not the tasks are
run.
Each role has a defaults/main.yml
file which contains the install_*
variables. To skip run an included task, simply set the install_*
variable
for the tasks you want to exclude to false
.
Example:
# vars.yml
# Don't install Regolith/i3
install_regolith: false
roles/common/tasks/main.yml
The common role is used to install packages and configuration on both workstations and servers.
install_packages.yml
install_packages: true
install_tmux.yml
install_tmux: true
tmux is a terminal multiplexer that allows users to manage multiple terminal sessions within a single window or session. With tmux, you can split a terminal into multiple panes, switch between them, and keep processes running in the background even if you disconnect from the session. It's especially useful for remote work, as you can disconnect from a session and reconnect later without losing any of the running processes.
install_zsh.yml
install_zsh: true
Zsh (Z shell) is an extended version of the Unix shell, with many improvements over the traditional Bash shell. It is widely used for interactive shell sessions due to its advanced features, ease of customization, and powerful scripting capabilities.
install_ssh_key.yml
install_ssh_key: true
An ssh key is generated for the ansible_user_id
with the type defined in the
openssh_keypair_type
variable. The default type is set to ed25519.
install_nodejs.yml
install_nodejs: true
NodeJS is installed via the Node Version Manager (nvm). The NodeJS version to
install is defined in the nodejs_version
variable.
install_aws_cli.yml
install_aws_cli: true
The latest version of the AWS CLI v2 is downloaded from awscli.amazonaws.com
and is installed via the ./aws/install
command.
roles/server_core/tasks/main.yml
.tmux.conf
.zshrc
roles/workstation_core/tasks/main.yml
install_dotfiles.yml
install_dotfiles: true
install_libraries.yml
install_libraries: true
install_luarocks.yml
install_luarocks: true
install_neovim.yml
install_neovim: true
install_python.yml
install_python: true
install_typescript.yml
install_typescript: true
install_fastfetch.yml
install_fastfetch: true
install_docker.yml
install_docker: true
install_lazydocker.yml
install_lazydocker: true
install_lazygit.yml
install_lazygit: true
install_minicom.yml
install_minicom: true
install_terraform.yml
install_terraform: true
roles/workstation_desktop/tasks/main.yml
install_alacritty.yml
install_alacritty: true
install_flameshot.yml
install_flameshot: true
install_regolith.yml
install_regolith: true
install_chrome.yml
install_chrome: true
install_microsoft_edge.yml
install_microsoft_edge: true
install_vscode.yml
install_vscode: true
install_ulauncher.yml
install_ulauncher: true
install_remmina.yml
install_remmina: true
install_keepassxc.yml
install_keepassxc: true