From cba75b4084d00c892157a6bae3421106e935fa62 Mon Sep 17 00:00:00 2001 From: SamYaple Date: Fri, 1 Jan 2016 04:23:32 +0000 Subject: [PATCH] Allow ceph role to pull images Change-Id: I7176bdc897e07f28684eedffb3c59e407eba322e Partially-Implements: blueprint pre-pull-images --- ansible/roles/ceph/tasks/deploy.yml | 21 +++++++++++++++++++++ ansible/roles/ceph/tasks/main.yml | 21 +-------------------- ansible/roles/ceph/tasks/pull.yml | 21 +++++++++++++++++++++ 3 files changed, 43 insertions(+), 20 deletions(-) create mode 100644 ansible/roles/ceph/tasks/deploy.yml create mode 100644 ansible/roles/ceph/tasks/pull.yml diff --git a/ansible/roles/ceph/tasks/deploy.yml b/ansible/roles/ceph/tasks/deploy.yml new file mode 100644 index 0000000000..403265af74 --- /dev/null +++ b/ansible/roles/ceph/tasks/deploy.yml @@ -0,0 +1,21 @@ +--- +- include: config.yml + +- include: bootstrap_mons.yml + when: inventory_hostname in groups['ceph-mon'] + +- include: distribute_keyrings.yml + +- include: start_mons.yml + when: inventory_hostname in groups['ceph-mon'] + +- include: bootstrap_osds.yml + when: inventory_hostname in groups['ceph-osd'] + +- include: start_osds.yml + when: inventory_hostname in groups['ceph-osd'] + +- include: start_rgws.yml + when: + - inventory_hostname in groups['ceph-rgw'] + - enable_ceph_rgw | bool diff --git a/ansible/roles/ceph/tasks/main.yml b/ansible/roles/ceph/tasks/main.yml index 403265af74..b017e8b4ad 100644 --- a/ansible/roles/ceph/tasks/main.yml +++ b/ansible/roles/ceph/tasks/main.yml @@ -1,21 +1,2 @@ --- -- include: config.yml - -- include: bootstrap_mons.yml - when: inventory_hostname in groups['ceph-mon'] - -- include: distribute_keyrings.yml - -- include: start_mons.yml - when: inventory_hostname in groups['ceph-mon'] - -- include: bootstrap_osds.yml - when: inventory_hostname in groups['ceph-osd'] - -- include: start_osds.yml - when: inventory_hostname in groups['ceph-osd'] - -- include: start_rgws.yml - when: - - inventory_hostname in groups['ceph-rgw'] - - enable_ceph_rgw | bool +- include: "{{ action }}.yml" diff --git a/ansible/roles/ceph/tasks/pull.yml b/ansible/roles/ceph/tasks/pull.yml new file mode 100644 index 0000000000..fde080f967 --- /dev/null +++ b/ansible/roles/ceph/tasks/pull.yml @@ -0,0 +1,21 @@ +--- +- name: Pulling ceph-mon image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ ceph_mon_image_full }}" + when: inventory_hostname in groups['ceph-mon'] + +- name: Pulling ceph-osd image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ ceph_osd_image_full }}" + when: inventory_hostname in groups['ceph-osd'] + +- name: Pulling ceph-rgw image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ ceph_rgw_image_full }}" + when: inventory_hostname in groups['ceph-rgw']