Skip to content

dougpark/ansible_for_raspberrypi

Repository files navigation

Ansible for Raspberry Pi

Ansible is a tool to help you manage multiple Raspberry Pi's.

Special Thanks

Step 1 - Install Ansible

  • Install python3
  • Install pip3
  • pip install ansible
  • For more information read Jeff's book

Step 2 - Create ansible.cfg

  • Steps for basic ansible working dir
mkdir ansible
cd ansible
touch ansible.cfg
code ansible.cfg
  • Create inventory file
touch inventory
code inventory
  • Base ansible.cfg file
  • Tell ansible where to find inventory file
[defaults]
INVENTORY = inventory

Step 3 - Create inventory

  • The inventory file contains a list of hosts that you want to work with ansible
  • You can us IP address or name
  • You must have ssh access
  • Preferably have a common login id
  • In my case I use pi, which is noted here
[local]
frodo.local

[all]
frodo.local
link.local
solo.local
pihole.local
zelda.local

[all:vars]
ansible_user=pi

Step 4 - Run your first ad-hoc command

  • This command will return the memory space for all hosts listed in the [all] section of the inventory file
ansible all -a "free -m"

Step 5 - Create a Playbook

Step 6 - Run your first Playbook

More Information

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published