GithubHelp home page GithubHelp logo

ansible-role-raspberry-pi's Introduction

ansible-role-raspberry-pi

This role configures Raspberry Pi OS.

Requirements

None.

Role Variables

All default variables are set in defaults/main.yml. To change auto upgrade configuration use following variables:

# auto upgrade
pi_auto_upgrade_reboot: "true"
pi_auto_upgrade_reboot_time: "03:00"
pi_auto_upgrade_blacklist: []

Boot config template contains only settings for PoE fan speeds, wifi, bt, audio, hdmi and gpu. This template is appended to existing file.

# boot config
pi_boot_config_template: "config.txt.j2"

Fail2ban configuration uses template and port, you can change those with following variables:

# fail2ban
pi_fail2ban_configuration_template: "jail.local.j2"
pi_sshd_port: 22

Raspberry Pi host name can be set with pi_hostname variable, you can override this with host_vars in case there's more then one.

# hostname
pi_hostname: "raspberry"

System upgrade and package installation is controlled with following two variables:

# install
pi_upgrade_system: true
pi_packages: []

Localization configuration is set with these three variables:

# localization
pi_locale: "en_US.UTF-8"
pi_timezone: "Europe/Belgrade"
pi_keyboard_layout: "us"

To configure sshd, use following variables:

# sshd
pi_sshd_allowtcpforwarding: "yes"
pi_sshd_allowusers:
  - pi
pi_sshd_challengeresponseauthentication: "no"
pi_sshd_maxsessions: 2
pi_sshd_passwordauthentication: "no"
pi_sshd_permitemptypasswords: "no"
pi_sshd_permitrootlogin: "no"
pi_sshd_permittunnel: "no"
pi_sshd_pubkeyauthentication: "yes"
pi_sshd_x11forwarding: "no"

pi_sshd_config:
 - {key: AllowTcpForwarding, value: "{{ pi_sshd_allowtcpforwarding }}"}
 - {key: AllowUsers, value: "{{ pi_sshd_allowusers | join(' ') }}"}
 - {key: ChallengeResponseAuthentication, value: "{{ pi_sshd_challengeresponseauthentication }}"}
 - {key: MaxSessions, value: "{{ pi_sshd_maxsessions }}" }
 - {key: PasswordAuthentication, value: "{{ pi_sshd_passwordauthentication }}"}
 - {key: PermitEmptyPasswords, value: "{{ pi_sshd_permitemptypasswords }}"}
 - {key: PermitRootLogin, value: "{{ pi_sshd_permitrootlogin }}"}
 - {key: PermitTunnel, value: "{{ pi_sshd_permittunnel }}"}
 - {key: PubkeyAuthentication, value: "{{ pi_sshd_pubkeyauthentication }}"}
 - {key: X11Forwarding, value: "{{ pi_sshd_x11forwarding }}"}

User account variables are set with following:

# user accounts
pi_sudoers_passwordless: []
pi_ssh_user: pi
pi_authorized_key: "~/.ssh/id_ed25519.pub"

Dependencies

None.

Example Playbook

- hosts: pi
  roles:
    - ansible-role-raspberry-pi

License

MIT

Author Information

Created by frennky.

ansible-role-raspberry-pi's People

Contributors

frennky 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.