Skip to content
Snippets Groups Projects
Commit 7cd81798 authored by Rémi - Le Filament's avatar Rémi - Le Filament
Browse files

Add docker registry auth if needed

parent 0295cf58
No related branches found
Tags v1.0.0
No related merge requests found
......@@ -30,6 +30,7 @@ This role makes use of a few variables which are set in case the target server i
* docker_odoo
* extra_app
* metabase
* docker_registry_auth : configuration for connecting to docker registry (goes in /root/.docker/config.json)
Note : all variables defined in defualts_main.yml might be useful in another role, in that case, it would be better to have them overwritten at play or host_vars level in order to make sure the same value is provided to each independant role
......
......@@ -73,6 +73,24 @@
mode: '0644'
notify: restart docker daemon
- name: Create .docker repo
file:
name: /root/.docker
state: directory
owner: root
group: root
mode: '0755'
when: docker_registry_auth is defined
- name: add specific repo auth
copy:
content: "{{ docker_registry_auth }}"
dest: /root/.docker/config.json
owner: root
group: root
mode: '0644'
when: docker_registry_auth is defined
- name: Create docker repo
file:
name: /home/docker/backups
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment