diff --git a/ansible/roles/glance/tasks/deploy.yml b/ansible/roles/glance/tasks/deploy.yml new file mode 100644 index 0000000000..450db4f932 --- /dev/null +++ b/ansible/roles/glance/tasks/deploy.yml @@ -0,0 +1,25 @@ +--- +- include: ceph.yml + when: + - enable_ceph | bool + - inventory_hostname in groups['ceph-mon'] or + inventory_hostname in groups['glance-api'] or + inventory_hostname in groups['glance-registry'] + +- include: register.yml + when: inventory_hostname in groups['glance-api'] + +- include: config.yml + when: inventory_hostname in groups['glance-api'] or + inventory_hostname in groups['glance-registry'] + +- include: bootstrap.yml + when: inventory_hostname in groups['glance-api'] + +- include: start.yml + when: inventory_hostname in groups['glance-api'] or + inventory_hostname in groups['glance-registry'] + +- include: check.yml + when: inventory_hostname in groups['glance-api'] or + inventory_hostname in groups['glance-registry'] diff --git a/ansible/roles/glance/tasks/main.yml b/ansible/roles/glance/tasks/main.yml index 450db4f932..b017e8b4ad 100644 --- a/ansible/roles/glance/tasks/main.yml +++ b/ansible/roles/glance/tasks/main.yml @@ -1,25 +1,2 @@ --- -- include: ceph.yml - when: - - enable_ceph | bool - - inventory_hostname in groups['ceph-mon'] or - inventory_hostname in groups['glance-api'] or - inventory_hostname in groups['glance-registry'] - -- include: register.yml - when: inventory_hostname in groups['glance-api'] - -- include: config.yml - when: inventory_hostname in groups['glance-api'] or - inventory_hostname in groups['glance-registry'] - -- include: bootstrap.yml - when: inventory_hostname in groups['glance-api'] - -- include: start.yml - when: inventory_hostname in groups['glance-api'] or - inventory_hostname in groups['glance-registry'] - -- include: check.yml - when: inventory_hostname in groups['glance-api'] or - inventory_hostname in groups['glance-registry'] +- include: "{{ action }}.yml" diff --git a/ansible/roles/glance/tasks/pull.yml b/ansible/roles/glance/tasks/pull.yml new file mode 100644 index 0000000000..0a3ebeb581 --- /dev/null +++ b/ansible/roles/glance/tasks/pull.yml @@ -0,0 +1,14 @@ +--- +- name: Pulling glance-api image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ glance_api_image_full }}" + when: inventory_hostname in groups['glance-api'] + +- name: Pulling glance-registry image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ glance_registry_image_full }}" + when: inventory_hostname in groups['glance-registry']