Ansible playbook for provisioning RaspAP
# install ansible
sudo apt update
sudo apt install software-properties-common python3-pip
pip3 install ansible
# [OPTIONAL] install sshpass if login to raspberry pi is made with password instead of ssh key
sudo apt install sshpass
In inventory
folder:
hosts
: default configuration will handle only one Raspberry Pi, so optionally add Raspberry Pi(s) that will be configured, with incremental numbers (e.g. raspberrypi01, raspberrypi02, ...)host_vars
: for all hosts inhosts
create araspberrypiXX.yaml
with inside itsansible_host: <ip_address>
group_vars
: choose betweenansible_ssh_pass
oransible_ssh_private_key_file
and give it the correct value, then configure the other parameters to match the desired configuration
To configure RaspAP in the chosen Raspberry Pi(s):
ansible-playbook site.yaml
To rollback what site.yaml
did:
ansible-playbook site-rollback.yaml