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,8 +1,9 @@
|
||||
---
|
||||
all:
|
||||
children:
|
||||
server:
|
||||
hosts:
|
||||
prusa.lan:
|
||||
vars:
|
||||
ansible_user: ubuntu
|
||||
iron-man.lan:
|
||||
children:
|
||||
@ -14,3 +15,7 @@ all:
|
||||
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