Git Product home page Git Product logo

rasberry-pi-zero-ansible's Introduction

Ansible: Raspberry Pi Zero Provisioner

An Ansible provisioner for Raspberry Pi Zero W

1. Install Ansible

More Details: http://docs.ansible.com/ansible/latest/intro_installation.html#latest-releases-via-pip

  1. sudo easy_install pip
  2. sudo pip install ansible

2. Setup User Variables

In the vars/user.yml file you can copy and overwrite any variables listed in the vars/main.yml file. Most importantly, double check that the ssh key path and wifi connection details are correct for your setup. See all recommended variables below:

Variable Default Description
user Content from cell 1 Content from cell 2
ssh_directory /home/pi/.ssh The directory the install will create to store your authorized_key
nvm_version 0.33.2 Version of node version manager
node_version node Node version. NVM aliases like node or stable are also accepted.
ssh_key_path ~/.ssh/id_rsa.pub The path on your LOCAL machine where your public ssh key can be found. This will be copied to the pi as an authorized_key
dont_show_wifi_connections True Determines if wifi details will be logged to console during setup
wifi { ssid: 'testaddress', password: 'testpass' } An array of ssid and password combinations. Find available ssid using `sudo iwlist wlan0 scan
apt_packages git & vim apt-get packages you would like installed. Each package should be added on its own line (see example below).

Overwrite Example

In var/user.yml

node_version: 8.2.0

wifi:
  - { ssid: 'myactualssid', password: 'mywifipassword' }
  - { ssid: 'anotherwifissid', password: 'anotherpassword' }
  
apt_packages
  - git
  - vim

3. Run the Setup

cd into repository and run make to run the initial install. You will be prompted to enter your ssh password. By default, this should be raspberry. If you already have an ssh key setup or are running a subsequent time, use make setup. Other make commands and manual ansible commands if that's how you roll:

Ansible Command Make Command Use
ansible-playbook setup.yml --ask-pass make or make all Runs the full playbook. Should be used on the initial setup. For subsequent runs, use make setup so that you aren't prompted for a password.
ansible-playbook setup.yml make setup Runs the full install, but does not require a manual ssh password. Will error if run initially.
ansible-playbook setup.yml --tags=wifi make wifi Runs only the wifi section of the playbook. Great for quickly adding one or more wifi connections.

rasberry-pi-zero-ansible's People

Contributors

kolson25 avatar

Stargazers

enrique r grullon avatar Ivan Topor avatar Christopher Schmitz avatar

Watchers

 avatar

Forkers

andyrow123

rasberry-pi-zero-ansible's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.