From: Marcos Amorim Date: Thu, 4 Apr 2019 18:21:10 +0000 (-0400) Subject: Prevent pull images for prometheus and grafana X-Git-Tag: v2.0.3~2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=126a729708841ce70a4db322e5607cf34fe89958;p=cephmetrics.git Prevent pull images for prometheus and grafana This patch add a new prometheus and grafana variable to allow install when the images already pulled on docker. Signed-off-by: Marcos Amorim --- diff --git a/ansible/roles/ceph-grafana/defaults/main.yml b/ansible/roles/ceph-grafana/defaults/main.yml index cd454d6..95227cd 100644 --- a/ansible/roles/ceph-grafana/defaults/main.yml +++ b/ansible/roles/ceph-grafana/defaults/main.yml @@ -14,6 +14,7 @@ defaults: version: latest uid: 472 datasource: Local + pull_image: true # You need to change these in the web UI on an already deployed machine, first # New deployments work fine admin_user: admin diff --git a/ansible/roles/ceph-grafana/tasks/setup_container.yml b/ansible/roles/ceph-grafana/tasks/setup_container.yml index 966d38f..35d1f19 100644 --- a/ansible/roles/ceph-grafana/tasks/setup_container.yml +++ b/ansible/roles/ceph-grafana/tasks/setup_container.yml @@ -39,7 +39,7 @@ networks: - name: "{{ docker.network_name }}" keep_volumes: true - pull: true + pull: "{{ grafana.pull_image }}" cpu_period: "{{ grafana.container_cpu_period }}" # As of ansible-2.5.2, this module doesn't support the equivalent of the # --cpus flag, so we must use period/quota for now diff --git a/ansible/roles/ceph-prometheus/defaults/main.yml b/ansible/roles/ceph-prometheus/defaults/main.yml index 442d827..f1692be 100644 --- a/ansible/roles/ceph-prometheus/defaults/main.yml +++ b/ansible/roles/ceph-prometheus/defaults/main.yml @@ -9,6 +9,7 @@ defaults: # This is passed directly to the docker_container module. It is only used # for containerized deployments. etc_hosts: {} + pull_image: true version: latest data_dir: /var/lib/cephmetrics user_id: '65534' # This is the UID used by the prom/prometheus docker image diff --git a/ansible/roles/ceph-prometheus/tasks/setup_container.yml b/ansible/roles/ceph-prometheus/tasks/setup_container.yml index d87c3e5..1c8d8e6 100644 --- a/ansible/roles/ceph-prometheus/tasks/setup_container.yml +++ b/ansible/roles/ceph-prometheus/tasks/setup_container.yml @@ -21,7 +21,7 @@ etc_hosts: "{{ prometheus.etc_hosts }}" user: "{{ prometheus.user_id }}" keep_volumes: true - pull: true + pull: "{{ prometheus.pull_image }}" cpu_period: "{{ prometheus.container_cpu_period }}" # As of ansible-2.5.2, this module doesn't support the equivalent of the # --cpus flag, so we must use period/quota for now