Files
fedora-infra_ansible/playbooks/groups/docker-registry.yml
Adam Miller 794ab5d43f enable candidate-registry for osbs in prod
Signed-off-by: Adam Miller <admiller@redhat.com>
2016-09-02 14:24:33 +00:00

99 lines
2.7 KiB
YAML

# create an osbs server
- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=docker-registry:docker-registry-stg"
- name: make the box be real
hosts: docker-registry:docker-registry-stg
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles:
- base
- rkhunter
- nagios/client
- hosts
- fas_client
- collectd/base
- rsyncd
- sudo
- { role: openvpn/client,
when: env != "staging" }
tasks:
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"
handlers:
- include: "{{ handlers }}/restart_services.yml"
- name: setup docker distribution registry
hosts: docker-registry:docker-registry-stg
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- /srv/private/ansible/vars.yml
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
# NOTE: tls is disabled for docker-distribution because we are listening only
# on localhost and all external connections will be through httpd which
# will be SSL enalbed.
roles:
- {
role: docker-distribution,
conf_path: "/etc/docker-distribution/registry/config.yml",
tls: {
enabled: False,
},
log: {
fields: {
service: "registry"
}
},
storage: {
cache: {
layerinfo: "inmemory"
},
filesystem: {
rootdirectory: "/srv/"
}
},
http: {
addr: ":5000"
}
}
# Setup compose-x86-01 push docker images to registry
- {
role: push-docker,
docker_cert_name: "containerstable",
docker_cert_dir: "/etc/docker/certs.d/registry.stg.fedoraproject.org",
when: env == "staging",
delegate_to: compose-x86-01.phx2.fedoraproject.org
}
- {
role: push-docker,
docker_cert_name: "containerbuild",
docker_cert_dir: "/etc/docker/certs.d/candidate-registry.stg.fedoraproject.org",
when: env == "staging",
delegate_to: compose-x86-01.phx2.fedoraproject.org
}
- {
role: push-docker,
docker_cert_name: "containerstable",
docker_cert_dir: "/etc/docker/certs.d/registry.fedoraproject.org",
when: env == "production",
delegate_to: compose-x86-01.phx2.fedoraproject.org
}
- {
role: push-docker,
docker_cert_name: "containerbuild",
docker_cert_dir: "/etc/docker/certs.d/candidate-registry.fedoraproject.org",
when: env == "production",
delegate_to: compose-x86-01.phx2.fedoraproject.org
}