Skip to content
ProgrammingAce edited this page Dec 22, 2014 · 4 revisions

Table of Contents

Installing Ansible

We will be setting up the raspberry pi using Ansible. If you don't already have Ansible installed, it should be in the major repos already (mac homebrew, Fedora/EPEL, Ubuntu). Otherwise you can find instructions here:
http://docs.ansible.com/intro_installation.html

Finding your pi's IP address:

You will need the IP address of your raspberry pi in order for Ansible to install the configuration. The raspberry pi foundation gives several methods for finding your IP address here: http://www.raspberrypi.org/documentation/troubleshooting/hardware/networking/ip-address.md

Setting up communications between your PC and the Pi

If you have strict hostkey checking turned on for SSH (which you probably do), you'll need to SSH into the raspberry pi once before running these scripts. This will add the pi's hostkey to your SSH configuration. The default login is:
username: pi
password: raspberry


Setting up the configuration scripts

You will need to edit the 'inventory' file in the 'playbooks' folder of the repo. Under [raspberry_pi] replace the IP address with the address to your Pi.
Example:

[raspberry_pi]
192.168.1.101


Running the configuration scripts

There are several different configurations you can choose from that perform different tasks.

  • raspberry_pi.yml - Runs updates, sets up ssh keys, removes wolfram alpha packages, resizes SD card
  • env_monitor_no_screen.yml - Same as raspberry_pi.yml, plus sets up a temperature and humidity monitoring system
  • env_monitor_with_screen.yml - Same as above, but displays output on an adafruit LCD touchscreen
Configuring the Raspberry Pi: To configure the pi, run the following command. When prompted for a password, use 'raspberry'. Expect the build to take about half an hour:
ansible-playbook -i inventory <<select .yml file from the options above>> -u pi --ask-pass
Clone this wiki locally