ansible/playbooks/registry.yml

41 lines
930 B
YAML

---
- import_playbook: "include/deploy-kvm-guest.yml myhosts=registry"
- name: configure instance
hosts: registry
user: root
gather_facts: true
vars_files:
- "{{ ansible_private }}/vars.yml"
roles:
- base
- glusterfs
tasks:
- name: run handlers to get interfaces configured
meta: flush_handlers
- 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
vars:
htpasswd: "{{ ansible_private }}/files/docker-distribution/htpasswd"
secret: "{{ docker_distribution_secret }}"