Add docker to requirements for running docker containers, add insecure docker registry
This commit is contained in:
parent
8a1941fc58
commit
be8d9c68da
3 changed files with 33 additions and 0 deletions
3
ansible/host_vars/ivyking.minhas.io/main.yml
Normal file
3
ansible/host_vars/ivyking.minhas.io/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
docker_registry_mnt: /mnt/raid/docker_registry
|
||||
...
|
|
@ -3,6 +3,7 @@ certifi==2020.6.20
|
|||
cffi==1.14.2
|
||||
chardet==3.0.4
|
||||
cryptography==3.0
|
||||
docker==4.3.1
|
||||
hvac==0.10.5
|
||||
idna==2.10
|
||||
Jinja2==2.11.2
|
||||
|
@ -12,3 +13,4 @@ PyYAML==5.3.1
|
|||
requests==2.24.0
|
||||
six==1.15.0
|
||||
urllib3==1.25.10
|
||||
websocket-client==0.57.0
|
||||
|
|
28
ansible/roles/docker_registry/tasks/main.yml
Normal file
28
ansible/roles/docker_registry/tasks/main.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- name: debug
|
||||
debug:
|
||||
msg: "{{ lookup('hashi_vault', 'secret=pki_int/masked.name') }}"
|
||||
|
||||
- name: ensure docker registry dir
|
||||
file:
|
||||
path: "{{ docker_registry_mnt }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
|
||||
- name: ensure python-docker is installed
|
||||
apt:
|
||||
name: python3-docker
|
||||
state: present
|
||||
|
||||
- name: run docker registry
|
||||
docker_container:
|
||||
name: registry
|
||||
image: registry:2
|
||||
ports:
|
||||
- "5000:5000"
|
||||
volumes:
|
||||
- "{{ docker_registry_mnt }}:/var/lib/registry"
|
||||
restart_policy: always
|
||||
...
|
Loading…
Reference in a new issue