Installing rust in your own ansible playbook will make sure that you can get consistent installs accross all the machines you may use, or replicate your development machine if it ever goes down.
I try to install everything that I will want to use for more than just a trial inside of my ansible playbook. This way I always get the same setup across my work and home machines, and anytime I might setup a throw away vm.
This is how rust reccomends that you install it on Ubuntu. First update your system, then run their installer, and finally check that the install was successful.
# system update sudo apt update sudo apt upgrade # download and run the rust installer curl https://sh.rustup.rs -sSf | sh # confirm your installation is successful rustc --version
Ansible Install #
The first thing I do in my playbooks is to check if the tool is already installed. Here I chose to look for cargo, you could also look for rustc.
...
