Assumes Raspbian OS or equivalent.
Raspbian Jessie Lite can be downloaded from here https://www.raspberrypi.org/downloads/raspbian
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
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: ""
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: []
No dependencies on other Ansible roles.
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