Cleanup the push-docker role and add some comment about the role

Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
Clement Verna 2018-08-24 11:38:29 +02:00
parent 0589f3790a
commit 098ccc4075
3 changed files with 18 additions and 20 deletions

View file

@ -109,8 +109,6 @@
# 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",
candidate_registry: "candidate-registry.stg.fedoraproject.org",
candidate_registry_osbs_username: "{{candidate_registry_osbs_stg_username}}",
candidate_registry_osbs_password: "{{candidate_registry_osbs_stg_password}}",
@ -119,8 +117,6 @@
}
- {
role: push-docker,
docker_cert_name: "containerstable",
docker_cert_dir: "/etc/docker/certs.d/registry.fedoraproject.org",
candidate_registry: "candidate-registry.fedoraproject.org",
candidate_registry_osbs_username: "{{candidate_registry_osbs_prod_username}}",
candidate_registry_osbs_password: "{{candidate_registry_osbs_prod_password}}",

View file

@ -60,14 +60,6 @@
key_src: "{{private}}/files/docker-registry/{{env}}/docker-registry-internal.key",
when: env == "staging"
}
- {
role: push-docker,
candidate_registry: "candidate-registry.fedoraproject.org",
candidate_registry_osbs_username: "{{candidate_registry_osbs_prod_username}}",
candidate_registry_osbs_password: "{{candidate_registry_osbs_prod_password}}",
docker_cert_dir: "/etc/docker/certs.d/candidate-registry.fedoraproject.org",
when: env == "production"
}
- {
role: "manage-container-images",
cert_dest_dir: "/etc/docker/certs.d/registry.fedoraproject.org",
@ -75,6 +67,20 @@
key_src: "{{private}}/files/docker-registry/{{env}}/pki/private/containerstable.key",
when: env == "production"
}
- {
role: push-docker,
candidate_registry: "candidate-registry.stg.fedoraproject.org",
candidate_registry_osbs_username: "{{candidate_registry_osbs_stg_username}}",
candidate_registry_osbs_password: "{{candidate_registry_osbs_stg_password}}",
when: env == "staging"
}
- {
role: push-docker,
candidate_registry: "candidate-registry.fedoraproject.org",
candidate_registry_osbs_username: "{{candidate_registry_osbs_prod_username}}",
candidate_registry_osbs_password: "{{candidate_registry_osbs_prod_password}}",
when: env == "production"
}
tasks:

View file

@ -1,16 +1,12 @@
---
# tasks file for push-docker
#
# tasks file for push-docker role
# This role is used to login to a registry using the
# docker client.
- name: install docker and python-docker
package: name="{{ item }}" state=present
with_items:
- docker
- python-docker
- name: ensure docker daemon cert dir exists
file:
path: "{{docker_cert_dir}}"
state: directory
- name: start and enable docker
service: name=docker state=started enabled=yes