add docker-x86
This commit is contained in:
parent
5efa2ccfce
commit
ec6a74e24a
38
docker/docker.yml
Normal file
38
docker/docker.yml
Normal 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
|
@ -1,16 +1,21 @@
|
|||||||
---
|
---
|
||||||
all:
|
all:
|
||||||
hosts:
|
|
||||||
prusa.lan:
|
|
||||||
vars:
|
|
||||||
ansible_user: ubuntu
|
|
||||||
iron-man.lan:
|
|
||||||
children:
|
children:
|
||||||
docker_swarm:
|
server:
|
||||||
hosts:
|
hosts:
|
||||||
node-01.lan:
|
prusa.lan:
|
||||||
docker_node: node-01
|
ansible_user: ubuntu
|
||||||
node-02.lan:
|
iron-man.lan:
|
||||||
docker_node: node-02
|
children:
|
||||||
node-03.lan:
|
docker_swarm:
|
||||||
docker_node: node-03
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user