• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

garthvh/ansible-raspi-playbooks: Playbooks for setup and updating of raspberry p ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

garthvh/ansible-raspi-playbooks

开源软件地址:

https://github.com/garthvh/ansible-raspi-playbooks

开源编程语言:

Shell 100.0%

开源软件介绍:

Automated Raspberry Pi Setup and Updates

This is my collection of some pibakery xml, and ansible playbooks for setup and configuration of my assorted raspberry pi projects. Many common raspberry pi configuration options can be set using the raspi-config noint (non-interactive) mode and for anything else I have found the Ansible lineinfile module is perfect for automating configuration that is done via text files.

Astro Pi Playbook Screenshot

The goal is to do as little manual setup of my raspberry pi projects as possible as well as creating a record of the setup and configuration that can be run again if there is a problem with the SD card, or if I need build more copies of a project.

There is an easy built in way in Ansible to complete every step of the setup for my projects. There are a ton of well documented modules in ansible and I was able to easily handle apt, many raspi-config options, git, boot/config.txt settings, making reusable tasks and handlers, setting up wifi with a template, and collecting sensitive inputs with prompts.

Prepare the SD Card using PiBakery

The first step now for all devices is setting up the sd card basics with PiBakery a code blocks pi sd card setup app which is available on Windows, Mac and Linux. This lets you configure wifi, a public ssh key, locale, keyboard and hostname without having to connect or power on the pi. My settings for PiBakery are available at here. If your project is not too complex, you may be able to save all the required settings to xml using PiBakery and not even have to use Ansible.

PiBakery  Screenshot

Ansible Semaphore

Semaphore is an open source web ui for ansible that is an alternative to the Ansible Tower product offered by redhat. I run it in a container and find it a better fit for my home network than tower which needs a more powerful server and has device limits. Semaphore has a simple ui that maps nicely to the structures in Ansible and tracks playbook runs and groups inventory in sensible ways.

Semaphore Task Templates Screenshot

All of my playbooks run fine with or without a Semaphore server, I use it because it lets me keep better track of when playbooks run on what devices.

For playbooks that use vars_prompts I am passing the prompt variable into the playbook using the "Extra CLI Arguments" box on the semaphore task template. Using the -e (extra vars) CLI argument I am passing in the vars that would be prompted for when running the playbook in bash. I use PiBakery instead of the inital setup script now, but I have kept the new-default playbook up to date.

["-e","hostname='your_hostname' wifi_ssid='your_ssid' wifi_password='your_pass'"]

Project Playbooks wiki

I have added the individual project playbook documentation to the wiki for this repo.

Creating additional playbooks

I am happy to accept pull requests for additional playbooks or tasks for Pi projects




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap