Skip to content

Ansible role for Docker installation on a Raspberry Pi

Notifications You must be signed in to change notification settings

ocrozo/ansible-docker-pi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible role: Docker-Pi

Build Status

###Ansible role for Docker installation on a Raspberry Pi

Requirements

Assumes Raspbian OS or equivalent.

Raspbian Jessie Lite can be downloaded from here https://www.raspberrypi.org/downloads/raspbian

Role Variables

###Varaibles are shown below along with their default values

####Install:

All tasks are run with privilege escalation by default. As per the Ansible documentation become_user defaults to the root user, so installation will be run as root by default.

# vars/main.yml

become: yes

####Login:

The Docker Hub username, password are required for login. The task will be skipped if any are missing.

This is also run as the root user by default. If a specific user needs to be logged in, register this under the docker_pi_user variable.

# defaults/main.yml

docker_pi_user: root

docker_pi_hub_username: ""
docker_pi_hub_password: ""

####Users:

List all users that need to be added to the docker group under the docker_pi_group_users variable. Users must already exist on the machine.

# defaults/main.yml

docker_pi_group_users: []

Dependencies

No dependencies on other Ansible roles.

Example Playbook

Basic installation, without login to Docker hub or adding additional 'docker' users:

- hosts: raspberry-pi
  roles:
    - role: Benaud12.docker-pi

Install with login and additional users:

- hosts: raspberry-pi
  roles:
    - role: Benaud12.docker-pi
      docker_pi_user: mick.dundee
      docker_pi_hub_username: croc_killer123
      docker_pi_hub_password: knifeySpoony
      docker_pi_group_users:
        - mick.dundee
        - sue.charlton
        - donk
        - pi

About

Ansible role for Docker installation on a Raspberry Pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published