eeb69e7ba2
We were using the wrong filename and encryption type. Change-Id: I48d2a7288e5cd52e57f5632fee17f677429a1a9c
43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
- name: Synchronize docker-compose directory
|
|
synchronize:
|
|
src: registry-docker/
|
|
dest: /etc/registry-docker/
|
|
- name: Ensure registry volume directories exists
|
|
file:
|
|
state: directory
|
|
path: "/var/registry/{{ item }}"
|
|
loop:
|
|
- data
|
|
- certs
|
|
- auth
|
|
- name: Install passlib
|
|
package:
|
|
name:
|
|
- python3-passlib
|
|
- python3-bcrypt
|
|
state: present
|
|
- name: Write htpassword file
|
|
htpasswd:
|
|
create: true
|
|
crypt_scheme: bcrypt
|
|
path: /var/registry/auth/htpasswd
|
|
name: "{{ registry_user }}"
|
|
password: "{{ registry_password }}"
|
|
- name: Write TLS private key
|
|
copy:
|
|
content: "{{ registry_tls_key }}"
|
|
dest: /var/registry/certs/domain.key
|
|
- name: Write TLS certificate
|
|
copy:
|
|
content: "{{ registry_tls_cert }}{{ registry_tls_chain | default('') }}"
|
|
dest: /var/registry/certs/domain.crt
|
|
- name: Install docker-compose
|
|
package:
|
|
name:
|
|
- docker-compose
|
|
state: present
|
|
- name: Run docker-compose up
|
|
shell:
|
|
cmd: docker-compose up -d
|
|
chdir: /etc/registry-docker/
|