geerlingguy.raspberry-pi

Ansible Role: Raspberry Pi

CI

This role helps set up a Raspberry Pi that is running Raspbian.

It changes some settings in the Raspberry Pi's configuration files, but it does not automatically restart the Pi. After running this role, you will usually need to reboot your Pi for the changes to take effect.

Requirements

No special requirements.

Role Variables

Here are some available settings you can use, along with their default values (check defaults/main.yml for more details):

raspberry_pi_boot_config_options:
  # Set the amount of memory for the GPU.
  - regexp: "^#?gpu_mem"
    line: "gpu_mem=16"
  # Allow 1200ma of USB power on newer models.
  - regexp: "^#?max_usb_current"
    line: "max_usb_current=1"

The lineinfile module in Ansible ensures these settings are in /boot/config.txt.

raspberry_pi_rc_local_options:
  # Turn off HDMI when starting up (to save power).
  - regexp: "^/usr/bin/tvservice"
    line: "/usr/bin/tvservice -o"

Again, the lineinfile module makes sure these settings are in /etc/rc.local.

Dependencies

No dependencies.

Example Playbook

Here’s an example of how to use this role:

- hosts: pi
  vars_files:
    - vars/main.yml
  roles:
    - { role: geerlingguy.raspberry-pi }

License

MIT / BSD

Author Information

This role was created in 2015 by Jeff Geerling, the author of Ansible for DevOps.

Informazioni sul progetto

Configures a Raspberry Pi.

Installa
ansible-galaxy install geerlingguy.raspberry-pi
Licenza
mit
Download
19.1k
Proprietario
Father, author, developer, maker. Sometimes called "an inflammatory enigma". #stl #drupal #ansible #k8s #raspberrypi #crohns