docker-distribution: Initial version of role

This commit is contained in:
Timo Makinen 2021-09-14 16:25:58 +00:00
parent 4547044a07
commit fd8e0e8558
3 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
- name: restart docker-distribution
service:
name: docker-distribution
state: restarted

View file

@ -0,0 +1,20 @@
---
- name: install packages
package:
name: docker-distribution
state: installed
- name: create config file
template:
dest: /etc/docker-distribution/registry/config.yml
src: config.yml.j2
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
notify: restart docker-distribution
- name: start service
service:
name: docker-distribution
state: started
enabled: true

View file

@ -0,0 +1,19 @@
version: 0.1
log:
fields:
service: registry
storage:
cache:
layerinfo: inmemory
filesystem:
rootdirectory: /srv/registry
http:
addr: :5000
tls:
certificate: {{ tls_certs }}/{{ inventory_hostname }}.crt
key: {{ tls_private }}/{{ inventory_hostname }}.key
clientcas:
- {{ tls_certs }}/ca.crt
minimumtls: 1.3
headers:
X-Content-Type-Options: [nosniff]