add docker-x86

This commit is contained in:
pgrondek 2020-04-13 17:42:34 +02:00
parent 5efa2ccfce
commit ec6a74e24a
2 changed files with 55 additions and 12 deletions

38
docker/docker.yml Normal file
View File

@ -0,0 +1,38 @@
---
- name: install docker
hosts: node-x86.lan
become_method: sudo
become_user: root
become: yes
tasks:
- name: install needed packages
apt:
update_cache: yes
pkg:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- name: add docker gpg key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: add docker repo
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu {{release}} stable
state: present
filename: docker
- name: install docker
apt:
update_cache: yes
pkg:
- docker-ce
- docker-ce-cli
- containerd.io
- name: add current user to docker group
user:
name: "{{ansible_user_id}}"
groups: docker
append: yes

View File

@ -1,16 +1,21 @@
---
all:
hosts:
prusa.lan:
vars:
ansible_user: ubuntu
iron-man.lan:
children:
docker_swarm:
server:
hosts:
node-01.lan:
docker_node: node-01
node-02.lan:
docker_node: node-02
node-03.lan:
docker_node: node-03
prusa.lan:
ansible_user: ubuntu
iron-man.lan:
children:
docker_swarm:
hosts:
node-01.lan:
docker_node: node-01
node-02.lan:
docker_node: node-02
node-03.lan:
docker_node: node-03
node-x86.lan:
docker_node: node-x86
ansible_host: 192.168.50.186
release: bionic