Giter Site home page Giter Site logo

ansible-collection-rpi's Introduction

Build Status

Ansible Collection - colin_nolan.rpi

Collection of Ansible modules for managing Raspberry Pis. Contains modules to:

  • Set kernel boot parameters in /boot/cmdline.txt (or similar files).

Installation

This collection is not yet published on Ansible Galaxy but it can be installed from GitHub.

If you are using a requirements.yml file

collections:
  - name: git+https://github.com/colin-nolan/ansible-collection-rpi.git,1.0.1

else install from the command line using:

ansible-galaxy collection install git+https://github.com/colin-nolan/ansible-collection-rpi.git,1.0.1

Usage

Create a task in your role/playbook that uses the module, e.g.:

- name: Set kernel boot parameters
  become: true
  colin_nolan.rpi.boot_cmdline:
    state: present
    items:
      cgroup_memory: 1
      cgroup_enable: memory
      key_only: null
  notify: reboot

It is likely you will want to reboot handler to apply any changes, e.g.:

- name: Reboot the machine
  become: true
  ansible.builtin.reboot:
  listen: reboot

Development

Test

make test

Requires: pip install -r tests/unit/plugins/requirements.txt.

Linting

make lint

Requires: pip install -r requirements.style.txt.

Apply Format

make format

Build Distributable

make build

Requires: see Linting.

CI

The drone CLI can be used to run CI pipelines locally, e.g.

drone exec --pipeline=lint .drone.yml

Alternatives

  • escalate.cmdline: role for setting all parameters in /boot/cmdline.txt. Preserves root but resets all other parameters.
  • jm1.rpi_cmdline: role for setting all parameters in /boot/firmware/cmdline.txt.

Legal

MIT (contact for other licencing). Copyright 2023 Colin Nolan.

This work is in no way related to any company that I may work for.

ansible-collection-rpi's People

Contributors

colin-nolan avatar

Watchers

 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.