Modified: 2022-01
Ansible automation for setup and teardown of hyperion servers for raspbian lite.
Install ansible
python3 -m pip install ansible
Run the prelink directive passing the hostname and ip address of the pi. On rasbian the default hostname is pi
. For example:
./scripts/prelink.sh -u pi -a 192.168.2.19
This essentially just adds your host systems public key to the list of authorized keys on the pi which is required to run ansible.
By default the script will look in
~/.ssh
for anid_rsa.pub
file but you can pass a custom ssh keypath with the -p flag:./scripts/prelink.sh -u $HOSTNAME -a $IP_ADDRESS -p $SSH_KEYPATH
Create an inventory file from the example to describe automation targets:
cp inventory/example.inventory.yaml inventory/inventory.yaml
Be sure to update the host and target ip.
Run hyperion server deployment automation:
ansible-playbook main.yml -e '{ teardown: False }' -K
And teardown:
ansible-playbook main.yml -e '{ teardown: True }' -K
Free to use through the MIT License