Ansible is a tool that allows you to setup easily computers. As a PiRogue is a computer and as we want its setup the easiest as possible,
Any Raspberry pi from v2 to v3B+ should work.
You will need to flash a raspbian-lite image on your sdcard.
You can download raspbian from https://www.raspberrypi.org/downloads/raspbian/
Then follow the setup guide here : https://www.raspberrypi.org/documentation/installation/installing-images/README.md
Once raspbian is installed (you can login with pi/raspberry), we should do two things:
- configure keyboard disposition
- change pi password
- change root password
- enable ssh (Ansible will use ssh to setup your pi)
- get you raspberrypi IP address
type sudo raspi-config
:
pi@raspberry$ sudo raspi-config
Then choose Localisation Options
and Change Keyboard Layout
Configure your keyboard then exit raspi-config
type passwd
command:
pi@raspberry$ passwd
enter a new password and its confirmation
type sudo passwd root
command:
pi@raspberry$ sudo passwd root
enter a new password and its confirmation
type sudo raspi-config
:
pi@raspberry$ sudo raspi-config
Choose Interfacing Options
then SSH
, answer yes
to "Would you like the SSH server to be enabled?" question.
Connect your raspberrypi with a network wire to your internet router.
then type the following command on your pi:
pi@raspberry$ ip a s dev eth0 | grep inet
inet 192.168.1.20/24 brd 192.168.1.255 scope global eth0
inet6 fe80::ba27:ebff:feeb:4f08/64 scope link
Here, our raspberrypi has 192.168.1.20 IP address. You must remember this address has we will use it to tell Ansible which computer it must PiRogue tools on.
The following steps must be conducted on a computer which will remotely install the PiRogue customization on your fresh Raspbian GNU/Linux install.
To install ansible, please follow the Ansible documentation guide.
Edit the file inventory.ini
and correct the IP address (the one you got at Get your raspberrypi IP address section of this readme file) specified just after ansible_host=
. It should look like:
pirogue_1 ansible_host=192.168.1.20 ansible_ssh_user=root
Edit roles/pirogue/defaults/main.yml to match you requirements passwords, wifi settings, ...
Simply run the following command:
ansible-playbook -i inventory.ini --become --ask-become-pass --ask-pass --diff pirogue.yml
It will ask you an SSH password, use toor
if you do not have changed your password on your PiRogue, otherwise, use your new password.