This Ansible role is designed to bootstrap a development server running Ubuntu 22.04 LTS.
- Minimum Ansible version:
2.10
cache_valid_time: 3600
apt_packages:
- apt-transport-https
- avahi-daemon
- avahi-utils
- byobu
- ca-certificates
- curl
- direnv
- git
- gnupg-agent
- htop
- iotop
- jq
- lsb-release
- make
- multitail
- podman
- python3
- python3-pip
- software-properties-common
- unzip
- wget
- whois
pyenv_version: 2.3.17
python_version: 3.10.11 # default Python for user
pipx_packages:
- awscli
- cookiecutter
- detect-secrets
- pre-commit
- yq
asdf_version: 0.11.3
asdf_plugins:
- name: github-cli
repo: https://github.com/bartlomiejdanek/asdf-github-cli.git
- name: lazydocker
repo: https://github.com/comdotlinux/asdf-lazydocker.git
- name: nodejs
repo: https://github.com/asdf-vm/asdf-nodejs.git
- name: packer
repo: https://github.com/asdf-community/asdf-hashicorp.git
- name: sops
repo: https://github.com/feniix/asdf-sops.git
- name: terraform
repo: https://github.com/asdf-community/asdf-hashicorp.git
- name: terraform-docs
repo: https://github.com/looztra/asdf-terraform-docs
- name: terragrunt
repo: https://github.com/ohmer/asdf-terragrunt
- name: tflint
repo: https://github.com/skyzyx/asdf-tflint
asdf_global:
- name: lazydocker
version: latest
- name: github-cli
version: latest
- name: sops
version: latest- asdf - Install
asdf,asdf_pluginsandasdf_globaltools, configure.bashrc. - base - Install
apt_packages, configure.bashrcand.ssh/configfor user. - docker - Configure official Docker repository as
aptsource, installdockertools and services. - pipx - Install
pipixandpipx_packages, configure.bashrc. - poetry - Install/update
poetry, configure.bashrc. - psql - Configure official
PostgreSQLrepository asaptsource, installpsqlclient. - python - Install/update
pyenv, build Pythonpython_version, and configure it as global for user. - vagrant - Install
virtualboxandvagrant.
Create requirements.yml file:
# requirements.yml
roles:
- src: git+ssh://git@github.com/cachuperia/ansible-role-server-bootstrap.git
scm: git
version: v1.1.0Install role:
ansible-galaxy install -r requirements.ymlCreate playbook.yml:
# playbook.yml
- hosts: servers
roles:
- role: ansible-role-server-bootstrap
default_user_python_version: 3.11.11Run playbook:
ansible-playbook playbook.yml --extra-vars "ansible_sudo_pass=<sudo password>" --tags "<tag1>,<tag2>" --skip-tags "<tag>"Commit message style - Conventional Commits.
Tools to install: git, pre-commit, vagrant and detect-secrets.
You can use this playbook for automated tools installation.
git clone git@github.com:cachuperia/ansible-role-server-bootstrap.git
cd ansible-role-server-bootstrap
make initRun make to list all available targets.
make test