Git Product home page Git Product logo

ansible-raspberry-pi's Introduction

ansible-raspberry-pi

setting up my raspberry pi 3 (RASPBIAN STRETCH LITE) using ansible.

Prerequisite

Install Raspbian Stretch Lite on SD

  • Insert SD card into USB card reader and connect to your Mac.
  • Format SD card with SD Card Formatter.
  • Check your SD card device path.
$ diskutil list
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *32.2 GB    disk2
   1:             Windows_FAT_32 XXX                     32.2 GB    disk2s1
  • Unmount SD card.
$ sudo diskutil umount /dev/disk2s1
  • Write Raspbian Image to SD card.
$ sudo dd if=2018-04-18-raspbian-stretch-lite.img of=/dev/rdisk2 bs=1m

  • SD will be mounted automatically, Enable SSH in advanced.
$ touch /Volumes/boot/ssh
  • Unmount SD card and eject.
$ sudo diskutil umount /dev/disk2s1

2. Boot your RPi3 and login.

  • Connect RPi3 to your network.
  • Boot. While booting, Must check your IP address assigned to RPi3.
  • SSH RPi3
    • User: pi
    • Password: raspberry
$ ssh [email protected]
[email protected]'s password:
pi@raspberrypi:~ $

3. Set up minimum networking setttings.

IP address

For networking, I prefer physical interface and fixed IP rather than Wi-Fi and DHCP.

$ sudo vi /etc/dhcpcd.conf

~~~~~~~~

interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

Reboot

$ reboot

Usage

$ git clone https://github.com/kun432/ansible-raspberry-pi.git

fix hosts to be suitable for your environment.

$ ansible-playbook -v -i hosts site.yaml --ask-pass -u pi

ansible-raspberry-pi's People

Contributors

kun432 avatar

Watchers

 avatar  avatar  avatar

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.