diff --git a/dashboard.yml b/dashboard.yml index 979ed4927..1865e478f 100644 --- a/dashboard.yml +++ b/dashboard.yml @@ -20,6 +20,12 @@ tags: ['ceph_update_config'] - import_role: name: ceph-container-engine + - import_role: + name: ceph-container-common + tasks_from: registry + when: + - not containerized_deployment | bool + - ceph_docker_registry_auth | bool - import_role: name: ceph-node-exporter diff --git a/roles/ceph-container-common/tasks/main.yml b/roles/ceph-container-common/tasks/main.yml index 7859ec2e6..f575b2fb6 100644 --- a/roles/ceph-container-common/tasks/main.yml +++ b/roles/ceph-container-common/tasks/main.yml @@ -15,10 +15,8 @@ ceph_docker_version: "{{ ceph_docker_version.stdout.split(' ')[2] }}" when: container_binary == 'docker' -- name: container registry authentication - command: '{{ container_binary }} login -u {{ ceph_docker_registry_username }} -p {{ ceph_docker_registry_password }} {{ ceph_docker_registry }}' - changed_when: false - no_log: true +- name: include registry.yml + include_tasks: registry.yml when: ceph_docker_registry_auth | bool - name: include fetch_image.yml diff --git a/roles/ceph-container-common/tasks/registry.yml b/roles/ceph-container-common/tasks/registry.yml new file mode 100644 index 000000000..4d757ad12 --- /dev/null +++ b/roles/ceph-container-common/tasks/registry.yml @@ -0,0 +1,5 @@ +--- +- name: container registry authentication + command: '{{ container_binary }} login -u {{ ceph_docker_registry_username }} -p {{ ceph_docker_registry_password }} {{ ceph_docker_registry }}' + changed_when: false + no_log: true