Skip to content
项目

clayshek/raspi-ubuntu-ansible

在 GitHub 查看

关于

Ubuntu Raspberry Pi provisioning (lab use), using Ansible pull from Git

系统与基础设施

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

raspi-ubuntu-ansible

Raspberry Pi Ubuntu lab provisioning with Ansible

Overview:

Repo contains necessary files to provision multiple Ubuntu Raspberry Pi in home lab. Each Pi SD card is flashed with the latest Ubuntu Server image for Ras Pi, and a user-data file with customized config (Ctrl-Shft-X in Raspbery Pi Imager) is copied to boot partition. Once booted, cloud-init with the custom user-data file will set the hostname, create a personalized user with associated ssh key (and locked password), and call ansible-pull to run the playbooks from this repo.

Ansible will further configure host networking (based on assigned hostname and assigned role & variables), setting IP, netmask, gateway, DNS server(s), and DNS search suffix(es) by creating a host-specific Netplan file from the included template. Ansible will, based on assigned role, install additional packages.

Usage:

  • Flash Raspberry Pi SD card with desired Ubuntu Server version - successfully tested on v24.04.1 LTS.
  • Copy user-data to boot partition of SD card (first customize hostname value, which should be reflected in Ansible inventory.yml file and have a .yml variables file in host_vars, do any user/ssh key modifications as necessary, and update Git repo location as appropriate)
  • Boot Raspberry Pi, after a few minutes, Pi should be provisioned (depending on Pi model and RAM, cloud-init / Ansible run could take 25+ minutes)
  • Watch 'cloud-init status'. Troubleshoot logs at /var/log/cloud-init-output.log & /var/log/cloud-init.log.

探索相关项目

加载中…