Add docker-distribution to registry hosts

This commit is contained in:
Timo Makinen 2021-09-14 16:54:04 +00:00
parent 6193276604
commit c8114b2594
2 changed files with 22 additions and 1 deletions

View file

@ -4,7 +4,7 @@ datadisks:
glusterfs_group: registry
firewall_in:
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
- {proto: tcp, port: 443}
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
- {proto: tcp, port: 5000, from: [172.20.20.0/22]}
- {proto: tcp, port: 24007, from: "{{ groups[glusterfs_group] | reject('equalto', inventory_hostname) | list }}"}
- {proto: tcp, port: "49152:49170", from: "{{ groups[glusterfs_group] | reject('equalto', inventory_hostname) | list }}"}

View file

@ -23,3 +23,24 @@
roles:
- base
- glusterfs
tasks:
- name: create /srv/registry
file:
path: /srv/registry
state: directory
mode: 0755
owner: root
group: "{{ ansible_wheel }}"
- name: mount /srv/registry
mount:
name: /srv/registry
src: "{{ inventory_hostname }}:/gv0"
fstype: glusterfs
opts: defaults
passno: "0"
dump: "0"
state: mounted
- import_role:
name: docker-distribution