/raspberry-devops

Set of Ansible playbooks to setup a Raspberry PI (stretch) into a kiosk mode

Set of Ansible scripts to setup a Raspberry PI (stretch) into a kiosk mode.
If you uncomfortable with Ansible, please refer to text-instructions.md

Installation

  1. Add to hosts.ini domain name of a PI (for example: 1.local)

  2. In the folder hosts_vars create a file with a name of the domain (from a previous step) and put an ip address of the PI (on a local network)

    ansible_ssh_host: 192.168.1.36
    
  3. Change the password hash and public keys to yours!

- hosts: rasp_all
vars:
- pi_password: '$5$rounds=535000$iey7w7tUkDKMlx4v$/ahXsK.9hsoxHExPk1MMbXWtpfHGlEQh7travOSnwx4'
handlers:
- include: 'handlers/main.yml'
tasks:
- name: Check for pi_password
fail:
msg: "pi_password has not been defined"
when: pi_password|default(False) == False
- name: Add authorized pi key valia
authorized_key: user=pi
key="{{ item }}"
with_file:
- files/ssh_keys/valia.pub
- name: Add authorized pi key va
authorized_key: user=pi
key="{{ item }}"
with_file:
- files/ssh_keys/va.pub

  1. Run
    ansible-playbook -i hosts.ini --user pi --ask-pass -v 00_initial_setup.yml