- Ansible playbook used for installing and configuring software after a system installation
- The playbook should be run as root user (-K flag) and the user name of the non-root user should be passed as an extra argument or defined in defaults/main.yaml.
- OS: Ubuntu 23.04. (tested with Kubuntu 23.04)
- Software:
ansible
- Install ansible
sudo apt install -y ansible unzip
- Check if the installation was correct by running
ansible --version
It should print out something similar to this this:
ansible 2.10.8
config file = None
configured module search path = ['/home/gninkovic/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
wget https://github.com/TerrorSquad/ansible-post-installation/archive/refs/heads/master.zip \
&& unzip master.zip \
&& cd ansible-post-installation-master
ansible-playbook ./playbook.yml -K -e username=$(whoami) -e=all=true
ansible-playbook ./playbook.yml -K -e=all=true -e username=$(whoami) -e "git_user_email='your@email.com'" -e "git_user_name='Your Name'"
ansible-playbook ./playbook.yml -K -e username=$(whoami)
ansible-playbook ./playbook.yml -K -e username=$(whoami) -e=gui=true -e=dev_tools_gui=true
-e all=true
- Installs everything.-e dev_tools_gui=true
- Installs developer tools fromdev_tools_gui.yaml
.-e gui=true
- Installs general tools fromgeneral_use_software_gui.yaml
.-e gestures=true
- Installs general tools fromlibinput_gestures.yaml
.-e rust=true
- Installs Rust fromrust.yaml
.-e golang=true
- Installs Golang fromgolang.yaml
.-e java=true
- Installs SDKMan fromjava.yaml
.-e git_user_email="your@email.com
- Sets git user.email config value.-e git_user_name="Your Name
- Sets git user.name config value.username
- defined indefaults/main.yaml
- can be overridden. Sets the username of the user for who the configuration should happen.-K
- flag used to ask for root password. Required mostly for installing apt packages and updating apt repositories.
- JetBrains Toolbox
- bat
- bottom
- broot
- btop
- code (Visual Studio Code)
- curl
- curlie
- dbeaver-ce
- delta
- docker
- docker-compose
- duf
- dust
- eza
- fd
- gh
- git
- git-quick-stats
- gitkraken
- gping
- graphviz
- guake
- htop
- httpstat
- hyperfine
- jq
- kcachegrind
- lazydocker
- libutempter0
- lnav
- make
- oha
- postman
- python3-pip
- redshift
- redshift-gtk
- rg
- ripgrep
- sd
- sdkman
- shellcheck
- sublime-text
- terminator
- tokei
- volta with latest nodejs
- xh
- bleachbit
- fd
- flameshot
- fzf
- google chrome
- httpie
- libinput-gestures
- mailspring
- ncdu
- nvim
- onlyoffice-desktopeditors
- openconnect
- papirus-icon-theme
- peco
- rescuetime
- skype
- slack
- thefuck
- tixati
- unified remote
- unzip
- variety
- viber
- vim
- vlc
- zip
- zoom
- Hack Mono Nerd Font
- Fira Code Nerd Font
- Fira Mono Nerd Font
- Roboto
In here you will find a Vagrantfile
and a playbook_vagrant.yml
files. These two are set up for working with Vagrant and testing the configuration.
-
Install Vagrant
sudo apt install -y vagrant virtualbox
-
Create a Vagrant box and provision it
vagrant up --provision
-
Force destroy and recreate the box
vagrant destroy --force && vagrant up --provision
Vagrantfile will use
playbook_vagrant.yml
file as theAnsible
entrypoint. Box nameubuntu/mantic64
- https://app.vagrantup.com/ubuntu/boxes/mantic64