klips/ansible/roles/docker/README.md

39 lines
899 B
Markdown
Raw Normal View History

2019-08-31 06:47:50 +00:00
docker
2019-08-29 07:27:08 +00:00
=========
2019-08-31 06:47:50 +00:00
A simple role for installing Docker and Docker Compose on a new Ubuntu host using Ansible.
2019-08-29 07:27:08 +00:00
Requirements
------------
2019-08-31 06:47:50 +00:00
Expects that the host is using apt package manager, and running a Debian / Ubuntu system.
2019-08-29 07:27:08 +00:00
Role Variables
--------------
2019-08-31 06:47:50 +00:00
Found in `.../roles/docker/defaults/main.yml`
```
---
docker_users: [user1, user2]
```
2019-08-29 07:27:08 +00:00
2019-08-31 07:01:59 +00:00
#### Docker Group Configuration Variable -
2019-08-31 06:47:50 +00:00
docker_users - A list of users to configure / add to the docker group
2019-08-29 07:27:08 +00:00
Example Playbook
----------------
2019-08-31 06:47:50 +00:00
After setting the users to configure with Docker in `.../defaults/main.yml`, create the following play.yml and run `ansible-playbook play.yml` after setting the correct hosts in your `/etc/ansible/hosts` file.
2019-08-29 07:27:08 +00:00
2019-08-31 06:47:50 +00:00
```
---
- hosts: docker-host
become: yes
roles:
- docker
```
2019-08-29 07:27:08 +00:00
2019-08-31 06:47:50 +00:00
Feel free to rename play.yml, hosts group name, etc. Just be sure it reflects to your settings in the related files.
2019-08-29 07:27:08 +00:00